1. May 07, 2021
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · aef511fb
      Linus Torvalds authored
      Pull input updates from Dmitry Torokhov:
      
       - three new touchscreen drivers: Hycon HY46XX, ILITEK Lego Series,
         and MStar MSG2638
      
       - a new driver for Azoteq IQS626A proximity and touch controller
      
       - addition of Amazon Game Controller to the list of devices handled
         by the xpad driver
      
       - Elan touchscreen driver will avoid binding to devices described as
         I2CHID compatible in ACPI tables
      
       - various driver fixes
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (56 commits)
        Input: xpad - add support for Amazon Game Controller
        Input: ili210x - add missing negation for touch indication on ili210x
        MAINTAINERS: repair reference in HYCON HY46XX TOUCHSCREEN SUPPORT
        Input: add driver for the Hycon HY46XX touchpanel series
        dt-bindings: touchscreen: Add HY46XX bindings
        dt-bindings: Add Hycon Technology vendor prefix
        Input: cyttsp - flag the device properly
        Input: cyttsp - set abs params for ABS_MT_TOUCH_MAJOR
        Input: cyttsp - drop the phys path
        Input: cyttsp - reduce reset pulse timings
        Input: cyttsp - error message on boot mode exit error
        Input: apbps2 - remove useless variable
        Input: mms114 - support MMS136
        Input: mms114 - convert bindings to YAML and extend
        Input: Add support for ILITEK Lego Series
        dt-bindings: input: touchscreen: ilitek_ts_i2c: Add bindings
        Input: add MStar MSG2638 touchscreen driver
        dt-bindings: input/touchscreen: add bindings for msg2638
        Input: silead - add workaround for x86 BIOS-es which bring the chip up in a stuck state
        Input: elants_i2c - do not bind to i2c-hid compatible ACPI instantiated devices
        ...
      aef511fb
    • Matt Reynolds's avatar
      Input: xpad - add support for Amazon Game Controller · 05665cef
      Matt Reynolds authored
      
      
      The Amazon Luna controller (product name "Amazon Game Controller") behaves
      like an Xbox 360 controller when connected over USB.
      
      Signed-off-by: default avatarMatt Reynolds <mattreynolds@chromium.org>
      Reviewed-by: default avatarHarry Cutts <hcutts@chromium.org>
      Link: https://lore.kernel.org/r/20210429103548.1.If5f9a44cb81e25b9350f7c6c0b3c88b4ecd81166@changeid
      
      
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      05665cef
    • Hansem Ro's avatar
      Input: ili210x - add missing negation for touch indication on ili210x · ac05a8a9
      Hansem Ro authored
      
      
      This adds the negation needed for proper finger detection on Ilitek
      ili2107/ili210x. This fixes polling issues (on Amazon Kindle Fire)
      caused by returning false for the cooresponding finger on the touchscreen.
      
      Signed-off-by: default avatarHansem Ro <hansemro@outlook.com>
      Fixes: e3559442
      
       ("ili210x - rework the touchscreen sample processing")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      ac05a8a9
    • Linus Torvalds's avatar
      Merge tag 's390-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · e4866123
      Linus Torvalds authored
      Pull more s390 updates from Heiko Carstens:
      
       - add support for system call stack randomization
      
       - handle stale PCI deconfiguration events
      
       - couple of defconfig updates
      
       - some fixes and cleanups
      
      * tag 's390-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility
        s390/entry: add support for syscall stack randomization
        s390/configs: change CONFIG_VIRTIO_CONSOLE to "m"
        s390/cio: remove invalid condition on IO_SCH_UNREG
        s390/cpumf: remove call to perf_event_update_userpage
        s390/cpumf: move counter set size calculation to common place
        s390/cpumf: beautify if-then-else indentation
        s390/configs: enable CONFIG_PCI_IOV
        s390/pci: handle stale deconfiguration events
        s390/pci: rename zpci_configure_device()
      e4866123
    • Linus Torvalds's avatar
      Merge tag 'vfio-v5.13-rc1pt2' of git://github.com/awilliam/linux-vfio · a2de4bbd
      Linus Torvalds authored
      Pull more VFIO updates from Alex Williamson:
       "A second small set of commits for this merge window, primarily to
        unbreak some deletions from our uAPI header.
      
         - Additional mdev sample driver cleanup (Dan Carpenter)
      
         - Doc fix (Alyssa Ross)
      
         - Unbreak uAPI from NVLink2 support removal (Alex Williamson)"
      
      * tag 'vfio-v5.13-rc1pt2' of git://github.com/awilliam/linux-vfio:
        docs: vfio: fix typo
        vfio/pci: Revert nvlink removal uAPI breakage
        vfio/mdev: remove unnecessary NULL check in mbochs_create()
      a2de4bbd
    • Linus Torvalds's avatar
      Merge branch 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux · 38182162
      Linus Torvalds authored
      Pull pcmcia updates from Dominik Brodowski:
       "A number of patches fixing W=1 kernel build warnings, and one patch
        removing an always-false NULL check"
      
      * 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux:
        pcmcia: rsrc_nonstatic: Fix call-back function as reference formatting
        pcmcia: pcmcia_resource: Fix some kernel-doc formatting/disparities and demote others
        pcmcia: ds: Fix function name disparity in header
        pcmcia: pcmcia_cis: Demote non-conforming kernel-doc headers to standard kernel-doc
        pcmcia: cistpl: Demote non-conformant kernel-doc headers to standard comments
        pcmcia: rsrc_nonstatic: Demote kernel-doc abuses
        pcmcia: ds: Remove if with always false condition
      38182162
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-5.13-rc1' of git://github.com/ceph/ceph-client · 7ac86b3d
      Linus Torvalds authored
      Pull ceph updates from Ilya Dryomov:
       "Notable items here are
      
         - a series to take advantage of David Howells' netfs helper library
           from Jeff
      
         - three new filesystem client metrics from Xiubo
      
         - ceph.dir.rsnaps vxattr from Yanhu
      
         - two auth-related fixes from myself, marked for stable.
      
        Interspersed is a smattering of assorted fixes and cleanups across the
        filesystem"
      
      * tag 'ceph-for-5.13-rc1' of git://github.com/ceph/ceph-client: (24 commits)
        libceph: allow addrvecs with a single NONE/blank address
        libceph: don't set global_id until we get an auth ticket
        libceph: bump CephXAuthenticate encoding version
        ceph: don't allow access to MDS-private inodes
        ceph: fix up some bare fetches of i_size
        ceph: convert some PAGE_SIZE invocations to thp_size()
        ceph: support getting ceph.dir.rsnaps vxattr
        ceph: drop pinned_page parameter from ceph_get_caps
        ceph: fix inode leak on getattr error in __fh_to_dentry
        ceph:...
      7ac86b3d
    • Linus Torvalds's avatar
      Merge tag 'ecryptfs-5.13-rc1-updates' of... · 682a8e2b
      Linus Torvalds authored
      Merge tag 'ecryptfs-5.13-rc1-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs
      
      Pull ecryptfs updates from Tyler Hicks:
       "Code cleanups and a bug fix
      
         - W=1 compiler warning cleanups
      
         - Mutex initialization simplification
      
         - Protect against NULL pointer exception during mount"
      
      * tag 'ecryptfs-5.13-rc1-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
        ecryptfs: fix kernel panic with null dev_name
        ecryptfs: remove unused helpers
        ecryptfs: Fix typo in message
        eCryptfs: Use DEFINE_MUTEX() for mutex lock
        ecryptfs: keystore: Fix some kernel-doc issues and demote non-conformant headers
        ecryptfs: inode: Help out nearly-there header and demote non-conformant ones
        ecryptfs: mmap: Help out one function header and demote other abuses
        ecryptfs: crypto: Supply some missing param descriptions and demote abuses
        ecryptfs: miscdev: File headers are not good kernel-doc candidates
        ecryptfs: main: Demote a bunch of non-conformant kernel-doc headers
        ecryptfs: messaging: Add missing param descriptions and demote abuses
        ecryptfs: super: Fix formatting, naming and kernel-doc abuses
        ecryptfs: file: Demote kernel-doc abuses
        ecryptfs: kthread: Demote file header and provide description for 'cred'
        ecryptfs: dentry: File headers are not good candidates for kernel-doc
        ecryptfs: debug: Demote a couple of kernel-doc abuses
        ecryptfs: read_write: File headers do not make good candidates for kernel-doc
        ecryptfs: use DEFINE_MUTEX() for mutex lock
        eCryptfs: add a semicolon
      682a8e2b
    • Linus Torvalds's avatar
      Merge tag 'trace-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 7ec901b6
      Linus Torvalds authored
      Pull tracing fix from Steven Rostedt:
       "Fix probes written to the set_ftrace_filter file
      
        Now that there's a library that accesses the tracefs file system
        (libtracefs), the way the files are interacted with is slightly
        different than the command line. For instance, the write() system call
        is used directly instead of an echo. This exposes some old bugs.
      
        If a probe is written to "set_ftrace_filter" without any white space
        after it, it will be ignored. This is because the write expects that a
        string written to it that does not end with white spaces thinks there
        is more to come. But if the file is closed, the release function needs
        to finish it. The "set_ftrace_filter" release function handles the
        filter part of the "set_ftrace_filter" file, but did not handle the
        probe part"
      
      * tag 'trace-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        ftrace: Handle commands when closing set_ftrace_filter file
      7ec901b6
    • Linus Torvalds's avatar
      Merge tag 'acpi-5.13-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 164e64ad
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "These revert one recent commit that turned out to be problematic,
        address two issues in the ACPI "custom method" interface and update
        GPIO properties documentation.
      
        Specifics:
      
         - Revent recent commit related to the handling of ACPI power
           resources during initialization, because it turned out to cause
           problems to occur on some systems (Rafael Wysocki).
      
         - Fix potential use-after-free and potential memory leak in the ACPI
           "custom method" debugfs interface (Mark Langsdorf).
      
         - Update ACPI GPIO properties documentation to cover assumptions
           regarding GPIO polarity (Andy Shevchenko)"
      
      * tag 'acpi-5.13-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        Revert "ACPI: scan: Turn off unused power resources during initialization"
        ACPI: custom_method: fix a possible memory leak
        ACPI: custom_method: fix potential use-after-free issue
        Documentation: firmware-guide: gpio-properties: Add note to SPI CS case
      164e64ad
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 2423e142
      Linus Torvalds authored
      Pull devicetree fixes from Rob Herring:
      
       - Several Renesas binding fixes to fix warnings
      
       - Remove duplicate compatibles in 8250 binding
      
       - Remove orphaned Sigma Designs Tango bindings
      
       - Fix bcm2711-hdmi binding to use 'additionalProperties'
      
       - Fix idt,32434-pic warning for missing 'interrupts' property
      
       - Fix 'stored but not read' warnings in DT overlay code
      
      * tag 'devicetree-fixes-for-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        dt-bindings: net: renesas,etheravb: Fix optional second clock name
        dt-bindings: display: renesas,du: Add missing power-domains property
        dt-bindings: media: renesas,vin: Make resets optional on R-Car Gen1
        dt-bindings: PCI: rcar-pci-host: Document missing R-Car H1 support
        of: overlay: Remove redundant assignment to ret
        dt-bindings: serial: 8250: Remove duplicated compatible strings
        dt-bindings: Remove unused Sigma Designs Tango bindings
        dt-bindings: bcm2711-hdmi: Fix broken schema
        dt-bindings: interrupt-controller: idt,32434-pic: Add missing interrupts property
      2423e142
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm · 322a3b84
      Linus Torvalds authored
      Pull ARM updates from Russell King:
      
       - Fix BSS size calculation for LLVM
      
       - Improve robustness of kernel entry around v7_invalidate_l1
      
       - Fix and update kprobes assembly
      
       - Correct breakpoint overflow handler check
      
       - Pause function graph tracer when suspending a CPU
      
       - Switch to generic syscallhdr.sh and syscalltbl.sh
      
       - Remove now unused set_kernel_text_r[wo] functions
      
       - Updates for ptdump (__init marking and using DEFINE_SHOW_ATTRIBUTE)
      
       - Fix for interrupted SMC (secure) calls
      
       - Remove Compaq Personal Server platform
      
      * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: footbridge: remove personal server platform
        ARM: 9075/1: kernel: Fix interrupted SMC calls
        ARM: 9074/1: ptdump: convert to DEFINE_SHOW_ATTRIBUTE
        ARM: 9073/1: ptdump: add __init section marker to three functions
        ARM: 9072/1: mm: remove set_kernel_text_r[ow]()
        ARM: 9067/1: syscalls: switch to generic syscallhdr.sh
        ARM: 9068/1: syscalls: switch to generic syscalltbl.sh
        ARM: 9066/1: ftrace: pause/unpause function graph tracer in cpu_suspend()
        ARM: 9064/1: hw_breakpoint: Do not directly check the event's overflow_handler hook
        ARM: 9062/1: kprobes: rewrite test-arm.c in UAL
        ARM: 9061/1: kprobes: fix UNPREDICTABLE warnings
        ARM: 9060/1: kexec: Remove unused kexec_reinit callback
        ARM: 9059/1: cache-v7: get rid of mini-stack
        ARM: 9058/1: cache-v7: refactor v7_invalidate_l1 to avoid clobbering r5/r6
        ARM: 9057/1: cache-v7: add missing ISB after cache level selection
        ARM: 9056/1: decompressor: fix BSS size calculation for LLVM ld.lld
      322a3b84
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.13-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 939b7cbc
      Linus Torvalds authored
      Pull RISC-V updates from Palmer Dabbelt:
      
       - Support for the memtest= kernel command-line argument.
      
       - Support for building the kernel with FORTIFY_SOURCE.
      
       - Support for generic clockevent broadcasts.
      
       - Support for the buildtar build target.
      
       - Some build system cleanups to pass more LLVM-friendly arguments.
      
       - Support for kprobes.
      
       - A rearranged kernel memory map, the first part of supporting sv48
         systems.
      
       - Improvements to kexec, along with support for kdump and crash
         kernels.
      
       - An alternatives-based errata framework, along with support for
         handling a pair of errata that manifest on some SiFive designs
         (including the HiFive Unmatched).
      
       - Support for XIP.
      
       - A device tree for the Microchip PolarFire ICICLE SoC and associated
         dev board.
      
      ... along with a bunch of cleanups.  There are already a handful of fixes
      on the list so there will likely be a part 2.
      
      * tag 'riscv-for-linus-5.13-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (45 commits)
        RISC-V: Always define XIP_FIXUP
        riscv: Remove 32b kernel mapping from page table dump
        riscv: Fix 32b kernel build with CONFIG_DEBUG_VIRTUAL=y
        RISC-V: Fix error code returned by riscv_hartid_to_cpuid()
        RISC-V: Enable Microchip PolarFire ICICLE SoC
        RISC-V: Initial DTS for Microchip ICICLE board
        dt-bindings: riscv: microchip: Add YAML documentation for the PolarFire SoC
        RISC-V: Add Microchip PolarFire SoC kconfig option
        RISC-V: enable XIP
        RISC-V: Add crash kernel support
        RISC-V: Add kdump support
        RISC-V: Improve init_resources()
        RISC-V: Add kexec support
        RISC-V: Add EM_RISCV to kexec UAPI header
        riscv: vdso: fix and clean-up Makefile
        riscv/mm: Use BUG_ON instead of if condition followed by BUG.
        riscv/kprobe: fix kernel panic when invoking sys_read traced by kprobe
        riscv: Set ARCH_HAS_STRICT_MODULE_RWX if MMU
        riscv: module: Create module allocations without exec permissions
        riscv: bpf: Avoid breaking W^X
        ...
      939b7cbc
  2. May 06, 2021
    • Linus Torvalds's avatar
      Merge tag 'hexagon-5.13-0' of git://git.kernel.org/pub/scm/linux/kernel/git/bcain/linux · 5e5948e5
      Linus Torvalds authored
      Pull Hexagon updates from Brian Cain:
       "Hexagon architecture build fixes + builtins
      
        Small build fixes applied:
      
         - use -mlong-calls to build
      
         - extend jumps in futex_atomic_*
      
         - etc
      
        Also, for convenience and portability, the hexagon compiler builtin
        functions like memcpy etc have been added to the kernel -- following
        the idiom used by other architectures"
      
      * tag 'hexagon-5.13-0' of git://git.kernel.org/pub/scm/linux/kernel/git/bcain/linux:
        Hexagon: add target builtins to kernel
        Hexagon: remove DEBUG from comet config
        Hexagon: change jumps to must-extend in futex_atomic_*
        Hexagon: fix build errors
      5e5948e5
    • Linus Torvalds's avatar
      Merge tag 'docs-5.13-2' of git://git.lwn.net/linux · a3f53e8a
      Linus Torvalds authored
      Pull documentation fixes from Jonathan Corbet:
       "A few late-arriving documentation fixes, including some oprofile
        cleanup, a kernel-doc fix, some regression-reporting updates, and the
        usual minor fixes"
      
      * tag 'docs-5.13-2' of git://git.lwn.net/linux:
        Enlisted oprofile version line removed
        oprofiled version output line removed from the list
        Removed the oprofiled version option
        docs: reporting-issues.rst: CC subsystem and maintainers on regressions
        docs: correct URL to bios and kernel developer's guide
        docs/core-api: Consistent code style
        docs/zh_CN: Adjust order and content of zh_CN/index.rst
        Documentation: input: joydev file corrections
        docs: Fix typo in Documentation/x86/x86_64/5level-paging.rst
        kernel-doc: Add support for __deprecated
      a3f53e8a
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-pm' and 'acpi-docs' · 3da53c75
      Rafael J. Wysocki authored
      * acpi-pm:
        Revert "ACPI: scan: Turn off unused power resources during initialization"
      
      * acpi-docs:
        Documentation: firmware-guide: gpio-properties: Add note to SPI CS case
      3da53c75
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 8404c9fb
      Linus Torvalds authored
      Merge more updates from Andrew Morton:
       "The remainder of the main mm/ queue.
      
        143 patches.
      
        Subsystems affected by this patch series (all mm): pagecache, hugetlb,
        userfaultfd, vmscan, compaction, migration, cma, ksm, vmstat, mmap,
        kconfig, util, memory-hotplug, zswap, zsmalloc, highmem, cleanups, and
        kfence"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (143 commits)
        kfence: use power-efficient work queue to run delayed work
        kfence: maximize allocation wait timeout duration
        kfence: await for allocation using wait_event
        kfence: zero guard page after out-of-bounds access
        mm/process_vm_access.c: remove duplicate include
        mm/mempool: minor coding style tweaks
        mm/highmem.c: fix coding style issue
        btrfs: use memzero_page() instead of open coded kmap pattern
        iov_iter: lift memzero_page() to highmem.h
        mm/zsmalloc: use BUG_ON instead of if condition followed by BUG.
        mm/zswap.c: switch from strlcpy to strscpy
        arm64/Kconfig: introduce ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE
        x86/Kconfig: introduce ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE
        mm,memory_hotplug: add kernel boot option to enable memmap_on_memory
        acpi,memhotplug: enable MHP_MEMMAP_ON_MEMORY when supported
        mm,memory_hotplug: allocate memmap from the added memory range
        mm,memory_hotplug: factor out adjusting present pages into adjust_present_page_count()
        mm,memory_hotplug: relax fully spanned sections check
        drivers/base/memory: introduce memory_block_{online,offline}
        mm/memory_hotplug: remove broken locking of zone PCP structures during hot remove
        ...
      8404c9fb
    • Linus Torvalds's avatar
      Merge tag 'nfsd-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux · a79cdfba
      Linus Torvalds authored
      Pull more nfsd updates from Chuck Lever:
       "Additional fixes and clean-ups for NFSD since tags/nfsd-5.13,
        including a fix to grant read delegations for files open for writing"
      
      * tag 'nfsd-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
        SUNRPC: Fix null pointer dereference in svc_rqst_free()
        SUNRPC: fix ternary sign expansion bug in tracing
        nfsd: Fix fall-through warnings for Clang
        nfsd: grant read delegations to clients holding writes
        nfsd: reshuffle some code
        nfsd: track filehandle aliasing in nfs4_files
        nfsd: hash nfs4_files by inode number
        nfsd: ensure new clients break delegations
        nfsd: removed unused argument in nfsd_startup_generic()
        nfsd: remove unused function
        svcrdma: Pass a useful error code to the send_err tracepoint
        svcrdma: Rename goto labels in svc_rdma_sendto()
        svcrdma: Don't leak send_ctxt on Send errors
      a79cdfba
    • Linus Torvalds's avatar
      Merge tag '5.13-rc-smb3-part2' of git://git.samba.org/sfrench/cifs-2.6 · 7c9e41e0
      Linus Torvalds authored
      Pull cifs updates from Steve French:
       "Ten CIFS/SMB3 changes - including two marked for stable - including
        some important multichannel fixes, as well as support for handle
        leases (deferred close) and shutdown support:
      
         - some important multichannel fixes
      
         - support for handle leases (deferred close)
      
         - shutdown support (which is also helpful since it enables multiple
           xfstests)
      
         - enable negotiating stronger encryption by default (GCM256)
      
         - improve wireshark debugging by allowing more options for root to
           dump decryption keys
      
        SambaXP and the SMB3 Plugfest test event are going on now so I am
        expecting more patches over the next few days due to extra testing
        (including more multichannel fixes)"
      
      * tag '5.13-rc-smb3-part2' of git://git.samba.org/sfrench/cifs-2.6:
        fs/cifs: Fix resource leak
        Cifs: Fix kernel oops caused by deferred close for files.
        cifs: fix regression when mounting shares with prefix paths
        cifs: use echo_interval even when connection not ready.
        cifs: detect dead connections only when echoes are enabled.
        smb3.1.1: allow dumping keys for multiuser mounts
        smb3.1.1: allow dumping GCM256 keys to improve debugging of encrypted shares
        cifs: add shutdown support
        cifs: Deferred close for files
        smb3.1.1: enable negotiating stronger encryption by default
      7c9e41e0
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 16bb86b5
      Linus Torvalds authored
      Pull virtio updates from Michael Tsirkin:
       "A bunch of new drivers including vdpa support for block and
        virtio-vdpa.
      
        Beginning of vq kick (aka doorbell) mapping support.
      
        Misc fixes"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (40 commits)
        virtio_pci_modern: correct sparse tags for notify
        virtio_pci_modern: __force cast the notify mapping
        vDPA/ifcvf: get_config_size should return dev specific config size
        vDPA/ifcvf: enable Intel C5000X-PL virtio-block for vDPA
        vDPA/ifcvf: deduce VIRTIO device ID when probe
        vdpa_sim_blk: add support for vdpa management tool
        vdpa_sim_blk: handle VIRTIO_BLK_T_GET_ID
        vdpa_sim_blk: implement ramdisk behaviour
        vdpa: add vdpa simulator for block device
        vhost/vdpa: Remove the restriction that only supports virtio-net devices
        vhost/vdpa: use get_config_size callback in vhost_vdpa_config_validate()
        vdpa: add get_config_size callback in vdpa_config_ops
        vdpa_sim: cleanup kiovs in vdpasim_free()
        vringh: add vringh_kiov_length() helper
        vringh: implement vringh_kiov_advance()
        vringh: explain more about cleaning riov and wiov
        vringh: reset kiov 'consumed' field in __vringh_iov()
        vringh: add 'iotlb_lock' to synchronize iotlb accesses
        vdpa_sim: use iova module to allocate IOVA addresses
        vDPA/ifcvf: deduce VIRTIO device ID from pdev ids
        ...
      16bb86b5
    • Linus Torvalds's avatar
      Merge tag 'pci-v5.13-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 57151b50
      Linus Torvalds authored
      Pull pci updates from Bjorn Helgaas:
       "Enumeration:
         - Release OF node when pci_scan_device() fails (Dmitry Baryshkov)
         - Add pci_disable_parity() (Bjorn Helgaas)
         - Disable Mellanox Tavor parity reporting (Heiner Kallweit)
         - Disable N2100 r8169 parity reporting (Heiner Kallweit)
         - Fix RCiEP device to RCEC association (Qiuxu Zhuo)
         - Convert sysfs "config", "rom", "reset", "label", "index",
           "acpi_index" to static attributes to help fix races in device
           enumeration (Krzysztof Wilczyński)
         - Convert sysfs "vpd" to static attribute (Heiner Kallweit, Krzysztof
           Wilczyński)
         - Use sysfs_emit() in "show" functions (Krzysztof Wilczyński)
         - Remove unused alloc_pci_root_info() return value (Krzysztof
           Wilczyński)
      
        PCI device hotplug:
         - Fix acpiphp reference count leak (Feilong Lin)
      
        Power management:
         - Fix acpi_pci_set_power_state() debug message (Rafael J. Wysocki)
         - Fix runtime PM imbalance (Dinghao Liu)
      
        Virtualization:
         - Increase delay after FLR to work around Intel DC P4510 NVMe erratum
           (Raphael Norwitz)
      
        MSI:
         - Convert rcar, tegra, xilinx to MSI domains (Marc Zyngier)
         - For rcar, xilinx, use controller address as MSI doorbell (Marc
           Zyngier)
         - Remove unused hv msi_controller struct (Marc Zyngier)
         - Remove unused PCI core msi_controller support (Marc Zyngier)
         - Remove struct msi_controller altogether (Marc Zyngier)
         - Remove unused default_teardown_msi_irqs() (Marc Zyngier)
         - Let host bridges declare their reliance on MSI domains (Marc
           Zyngier)
         - Make pci_host_common_probe() declare its reliance on MSI domains
           (Marc Zyngier)
         - Advertise mediatek lack of built-in MSI handling (Thomas Gleixner)
         - Document ways of ending up with NO_MSI (Marc Zyngier)
         - Refactor HT advertising of NO_MSI flag (Marc Zyngier)
      
        VPD:
         - Remove obsolete Broadcom NIC VPD length-limiting quirk (Heiner
           Kallweit)
         - Remove sysfs VPD size checking dead code (Heiner Kallweit)
         - Convert VPF sysfs file to static attribute (Heiner Kallweit)
         - Remove unnecessary pci_set_vpd_size() (Heiner Kallweit)
         - Tone down "missing VPD" message (Heiner Kallweit)
      
        Endpoint framework:
         - Fix NULL pointer dereference when epc_features not implemented
           (Shradha Todi)
         - Add missing destroy_workqueue() in endpoint test (Yang Yingliang)
      
        Amazon Annapurna Labs PCIe controller driver:
         - Fix compile testing without CONFIG_PCI_ECAM (Arnd Bergmann)
         - Fix "no symbols" warnings when compile testing with
           CONFIG_TRIM_UNUSED_KSYMS (Arnd Bergmann)
      
        APM X-Gene PCIe controller driver:
         - Fix cfg resource mapping regression (Dejin Zheng)
      
        Broadcom iProc PCIe controller driver:
         - Return zero for success of iproc_msi_irq_domain_alloc() (Pali
           Rohár)
      
        Broadcom STB PCIe controller driver:
         - Add reset_control_rearm() stub for !CONFIG_RESET_CONTROLLER (Jim
           Quinlan)
         - Fix use of BCM7216 reset controller (Jim Quinlan)
         - Use reset/rearm for Broadcom STB pulse reset instead of
           deassert/assert (Jim Quinlan)
         - Fix brcm_pcie_probe() error return for unsupported revision (Wei
           Yongjun)
      
        Cavium ThunderX PCIe controller driver:
         - Fix compile testing (Arnd Bergmann)
         - Fix "no symbols" warnings when compile testing with
           CONFIG_TRIM_UNUSED_KSYMS (Arnd Bergmann)
      
        Freescale Layerscape PCIe controller driver:
         - Fix ls_pcie_ep_probe() syntax error (comma for semicolon)
           (Krzysztof Wilczyński)
         - Remove layerscape-gen4 dependencies on OF and ARM64, add dependency
           on ARCH_LAYERSCAPE (Geert Uytterhoeven)
      
        HiSilicon HIP PCIe controller driver:
         - Remove obsolete HiSilicon PCIe DT description (Dongdong Liu)
      
        Intel Gateway PCIe controller driver:
         - Remove unused pcie_app_rd() (Jiapeng Chong)
      
        Intel VMD host bridge driver:
         - Program IRTE with Requester ID of VMD endpoint, not child device
           (Jon Derrick)
         - Disable VMD MSI-X remapping when possible so children can use more
           MSI-X vectors (Jon Derrick)
      
        MediaTek PCIe controller driver:
         - Configure FC and FTS for functions other than 0 (Ryder Lee)
         - Add YAML schema for MediaTek (Jianjun Wang)
         - Export pci_pio_to_address() for module use (Jianjun Wang)
         - Add MediaTek MT8192 PCIe controller driver (Jianjun Wang)
         - Add MediaTek MT8192 INTx support (Jianjun Wang)
         - Add MediaTek MT8192 MSI support (Jianjun Wang)
         - Add MediaTek MT8192 system power management support (Jianjun Wang)
         - Add missing MODULE_DEVICE_TABLE (Qiheng Lin)
      
        Microchip PolarFlare PCIe controller driver:
         - Make several symbols static (Wei Yongjun)
      
        NVIDIA Tegra PCIe controller driver:
         - Add MCFG quirks for Tegra194 ECAM errata (Vidya Sagar)
         - Make several symbols const (Rikard Falkeborn)
         - Fix Kconfig host/endpoint typo (Wesley Sheng)
      
        SiFive FU740 PCIe controller driver:
         - Add pcie_aux clock to prci driver (Greentime Hu)
         - Use reset-simple in prci driver for PCIe (Greentime Hu)
         - Add SiFive FU740 PCIe host controller driver and DT binding (Paul
           Walmsley, Greentime Hu)
      
        Synopsys DesignWare PCIe controller driver:
         - Move MSI Receiver init to dw_pcie_host_init() so it is
           re-initialized along with the RC in resume (Jisheng Zhang)
         - Move iATU detection earlier to fix regression (Hou Zhiqiang)
      
        TI J721E PCIe driver:
         - Add DT binding and TI j721e support for refclk to PCIe connector
           (Kishon Vijay Abraham I)
         - Add host mode and endpoint mode DT bindings for TI AM64 SoC (Kishon
           Vijay Abraham I)
      
        TI Keystone PCIe controller driver:
         - Use generic config accessors for TI AM65x (K3) to fix regression
           (Kishon Vijay Abraham I)
      
        Xilinx NWL PCIe controller driver:
         - Add support for coherent PCIe DMA traffic using CCI (Bharat Kumar
           Gogada)
         - Add optional "dma-coherent" DT property (Bharat Kumar Gogada)
      
        Miscellaneous:
         - Fix kernel-doc warnings (Krzysztof Wilczyński)
         - Remove unused MicroGate SyncLink device IDs (Jiri Slaby)
         - Remove redundant dev_err() for devm_ioremap_resource() failure
           (Chen Hui)
         - Remove redundant initialization (Colin Ian King)
         - Drop redundant dev_err() for platform_get_irq() errors (Krzysztof
           Wilczyński)"
      
      * tag 'pci-v5.13-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (98 commits)
        riscv: dts: Add PCIe support for the SiFive FU740-C000 SoC
        PCI: fu740: Add SiFive FU740 PCIe host controller driver
        dt-bindings: PCI: Add SiFive FU740 PCIe host controller
        MAINTAINERS: Add maintainers for SiFive FU740 PCIe driver
        clk: sifive: Use reset-simple in prci driver for PCIe driver
        clk: sifive: Add pcie_aux clock in prci driver for PCIe driver
        PCI: brcmstb: Use reset/rearm instead of deassert/assert
        ata: ahci_brcm: Fix use of BCM7216 reset controller
        reset: add missing empty function reset_control_rearm()
        PCI: Allow VPD access for QLogic ISP2722
        PCI/VPD: Add helper pci_get_func0_dev()
        PCI/VPD: Remove pci_vpd_find_tag() SRDT handling
        PCI/VPD: Remove pci_vpd_find_tag() 'offset' argument
        PCI/VPD: Change pci_vpd_init() return type to void
        PCI/VPD: Make missing VPD message less alarming
        PCI/VPD: Remove pci_set_vpd_size()
        x86/PCI: Remove unused alloc_pci_root_info() return value
        MAINTAINERS: Add Jianjun Wang as MediaTek PCI co-maintainer
        PCI: mediatek-gen3: Add system PM support
        PCI: mediatek-gen3: Add MSI support
        ...
      57151b50
    • Linus Torvalds's avatar
      Merge tag 'pwm/for-5.13-rc1' of... · 7b9df264
      Linus Torvalds authored
      Merge tag 'pwm/for-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
      
      Pull pwm updates from Thierry Reding:
       "This adds support for the PWM controller found on Toshiba Visconti
        SoCs and converts a couple of drivers to the atomic API.
      
        There's also a bunch of cleanups and minor fixes across the board"
      
      * tag 'pwm/for-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (35 commits)
        pwm: Reword docs about pwm_apply_state()
        pwm: atmel: Improve duty cycle calculation in .apply()
        pwm: atmel: Fix duty cycle calculation in .get_state()
        pwm: visconti: Add Toshiba Visconti SoC PWM support
        dt-bindings: pwm: Add bindings for Toshiba Visconti PWM Controller
        arm64: dts: rockchip: Remove clock-names from PWM nodes
        ARM: dts: rockchip: Remove clock-names from PWM nodes
        dt-bindings: pwm: rockchip: Add more compatible strings
        dt-bindings: pwm: Convert pwm-rockchip.txt to YAML
        pwm: mediatek: Remove unused function
        pwm: pca9685: Improve runtime PM behavior
        pwm: pca9685: Support hardware readout
        pwm: pca9685: Switch to atomic API
        pwm: lpss: Don't modify HW state in .remove callback
        pwm: sti: Free resources only after pwmchip_remove()
        pwm: sti: Don't modify HW state in .remove callback
        pwm: lpc3200: Don't modify HW state in .remove callback
        pwm: lpc18xx-sct: Free resources only after pwmchip_remove()
        pwm: bcm-kona: Don't modify HW state in .remove callback
        pwm: bcm2835: Free resources only after pwmchip_remove()
        ...
      7b9df264
    • Linus Torvalds's avatar
      Merge tag 'thermal-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux · 583f2bcf
      Linus Torvalds authored
      Pull thermal updates from Daniel Lezcano:
      
       - Remove duplicate error message for the amlogic driver (Tang Bin)
      
       - Fix spellos in comments for the tegra and sun8i (Bhaskar Chowdhury)
      
       - Add the missing fifth node on the rcar_gen3 sensor (Niklas Söderlund)
      
       - Remove duplicate include in ti-bandgap (Zhang Yunkai)
      
       - Assign error code in the error path in the function
         thermal_of_populate_bind_params() (Jia-Ju Bai)
      
       - Fix spelling mistake in a comment 'disabed' -> 'disabled' (Colin Ian
         King)
      
       - Use the device name instead of auto-numbering for a better
         identification of the cooling device (Daniel Lezcano)
      
       - Improve a bit the division accuracy in the power allocator governor
         (Jeson Gao)
      
       - Enable the missing third sensor on msm8976 (Konrad Dybcio)
      
       - Add QCom tsens driver co-maintainer (Thara Gopinath)
      
       - Fix memory leak and use after free errors in the core code (Daniel
         Lezcano)
      
       - Add the MDM9607 compatible bindings (Konrad Dybcio)
      
       - Fix trivial spello in the copyright name for Hisilicon (Hao Fang)
      
       - Fix negative index array access when converting the frequency to
         power in the energy model (Brian-sy Yang)
      
       - Add support for Gen2 new PMIC support for Qcom SPMI (David Collins)
      
       - Update maintainer file for CPU cooling device section (Lukasz Luba)
      
       - Fix missing put_device on error in the Qcom tsens driver (Guangqing
         Zhu)
      
       - Add compatible DT binding for sm8350 (Robert Foss)
      
       - Add support for the MDM9607's tsens driver (Konrad Dybcio)
      
       - Remove duplicate error messages in thermal_mmio and the bcm2835
         driver (Ruiqi Gong)
      
       - Add the Thermal Temperature Cooling driver (Zhang Rui)
      
       - Remove duplicate error messages in the Hisilicon sensor driver (Ye
         Bin)
      
       - Use the devm_platform_ioremap_resource_byname() function instead of a
         couple of corresponding calls (dingsenjie)
      
       - Sort the headers alphabetically in the ti-bandgap driver (Zhen Lei)
      
       - Add missing property in the DT thermal sensor binding (Rafał Miłecki)
      
       - Remove dead code in the ti-bandgap sensor driver (Lin Ruizhe)
      
       - Convert the BRCM DT bindings to the yaml schema (Rafał Miłecki)
      
       - Replace the thermal_notify_framework() call by a call to the
         thermal_zone_device_update() function. Remove the function as well as
         the corresponding documentation (Thara Gopinath)
      
       - Add support for the ipq8064-tsens sensor along with a set of cleanups
         and code preparation (Ansuel Smith)
      
       - Add a lockless __thermal_cdev_update() function to improve the
         locking scheme in the core code and governors (Lukasz Luba)
      
       - Fix multiple cooling device notification changes (Lukasz Luba)
      
       - Remove unneeded variable initialization (Colin Ian King)
      
      * tag 'thermal-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (55 commits)
        thermal/drivers/mtk_thermal: Remove redundant initializations of several variables
        thermal/core/power allocator: Use the lockless __thermal_cdev_update() function
        thermal/core/fair share: Use the lockless __thermal_cdev_update() function
        thermal/core/fair share: Lock the thermal zone while looping over instances
        thermal/core/power_allocator: Update once cooling devices when temp is low
        thermal/core/power_allocator: Maintain the device statistics from going stale
        thermal/core: Create a helper __thermal_cdev_update() without a lock
        dt-bindings: thermal: tsens: Document ipq8064 bindings
        thermal/drivers/tsens: Add support for ipq8064-tsens
        thermal/drivers/tsens: Drop unused define for msm8960
        thermal/drivers/tsens: Replace custom 8960 apis with generic apis
        thermal/drivers/tsens: Fix bug in sensor enable for msm8960
        thermal/drivers/tsens: Use init_common for msm8960
        thermal/drivers/tsens: Add VER_0 tsens version
        thermal/drivers/tsens: Convert msm8960 to reg_field
        thermal/drivers/tsens: Don't hardcode sensor slope
        Documentation: driver-api: thermal: Remove thermal_notify_framework from documentation
        thermal/core: Remove thermal_notify_framework
        iwlwifi: mvm: tt: Replace thermal_notify_framework
        dt-bindings: thermal: brcm,ns-thermal: Convert to the json-schema
        ...
      583f2bcf
    • Linus Torvalds's avatar
      Merge tag 'gpio-updates-for-v5.13-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 5d6a1b84
      Linus Torvalds authored
      Pull gpio updates from Bartosz Golaszewski:
      
       - new driver for the Realtek Otto GPIO controller
      
       - ACPI support for gpio-mpc8xxx
      
       - edge event support for gpio-sch (+ Kconfig fixes)
      
       - Kconfig improvements in gpio-ich
      
       - fixes to older issues in gpio-mockup
      
       - ACPI quirk for ignoring EC wakeups on Dell Venue 10 Pro 5055
      
       - improve the GPIO aggregator code by using more generic interfaces
         instead of reimplementing them in the driver
      
       - convert the DT bindings for gpio-74x164 to yaml
      
       - documentation improvements
      
       - a slew of other minor fixes and improvements to GPIO drivers
      
      * tag 'gpio-updates-for-v5.13-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (34 commits)
        dt-bindings: gpio: add YAML description for rockchip,gpio-bank
        gpio: mxs: remove useless function
        dt-bindings: gpio: fairchild,74hc595: Convert to json-schema
        gpio: it87: remove unused code
        gpio: 104-dio-48e: Fix coding style issues
        gpio: mpc8xxx: Add ACPI support
        gpio: ich: Switch to be dependent on LPC_ICH
        gpio: sch: Drop MFD_CORE selection
        gpio: sch: depends on LPC_SCH
        gpiolib: acpi: Add quirk to ignore EC wakeups on Dell Venue 10 Pro 5055
        gpio: sch: Hook into ACPI GPE handler to catch GPIO edge events
        gpio: sch: Add edge event support
        gpio: aggregator: Replace custom get_arg() with a generic next_arg()
        lib/cmdline: Export next_arg() for being used in modules
        gpio: omap: Use device_get_match_data() helper
        gpio: Add Realtek Otto GPIO support
        dt-bindings: gpio: Binding for Realtek Otto GPIO
        docs: kernel-parameters: Add gpio_mockup_named_lines
        docs: kernel-parameters: Move gpio-mockup for alphabetic order
        lib: bitmap: provide devm_bitmap_alloc() and devm_bitmap_zalloc()
        ...
      5d6a1b84
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.13-rc1-round2' of... · 5a5bcd43
      Linus Torvalds authored
      Merge tag 'char-misc-5.13-rc1-round2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
      
      Pull char/misc driver fixes from Greg KH:
       "Here are two char/misc fixes for 5.13-rc1 to resolve reported issues.
      
        The first is a bugfix for the nitro_enclaves driver that fixed some
        important problems. The second was a dyndbg bugfix that resolved some
        reported problems in dynamic debugging control.
      
        Both have been in linux-next for a while with no reported issues"
      
      * tag 'char-misc-5.13-rc1-round2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        dyndbg: fix parsing file query without a line-range suffix
        nitro_enclaves: Fix stale file descriptors on failed usercopy
      5a5bcd43
    • Linus Torvalds's avatar
      Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux · d8cb379c
      Linus Torvalds authored
      Pull turbostat updates from Len Brown:
       "Bug fixes and a smattering of features"
      
      * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (21 commits)
        tools/power turbostat: version 2021.05.04
        tools/power turbostat: Support "turbostat --hide idle"
        tools/power turbostat: elevate priority of interval mode
        tools/power turbostat: formatting
        tools/power turbostat: rename tcc variables
        tools/power turbostat: add TCC Offset support
        tools/power turbostat: save original CPU model
        tools/power turbostat: Fix Core C6 residency on Atom CPUs
        tools/power turbostat: Print the C-state Pre-wake settings
        tools/power turbostat: Enable tsc_tweak for Elkhart Lake and Jasper Lake
        tools/power turbostat: unmark non-kernel-doc comment
        tools/power/turbostat: Remove Package C6 Retention on Ice Lake Server
        tools/power turbostat: Fix offset overflow issue in index converting
        tools/power/turbostat: Fix turbostat for AMD Zen CPUs
        tools/power turbostat: update version number
        tools/power turbostat: Fix DRAM Energy Unit on SKX
        Revert "tools/power turbostat: adjust for temperature offset"
        tools/power turbostat: Support Ice Lake D
        tools/power turbostat: Support Alder Lake Mobile
        tools/power turbostat: print microcode patch level
        ...
      d8cb379c
    • Linus Torvalds's avatar
      Merge tag 'ktest-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest · dd8c86c6
      Linus Torvalds authored
      Pull ktest updates from Steven Rostedt:
      
       - Added a KTEST section in the MAINTAINERS file
      
       - Included John Hawley as a co-maintainer
      
       - Add an example config that would work with VMware workstation guests
      
       - Cleanups to the code
      
      * tag 'ktest-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
        ktest: Add KTEST section to MAINTAINERS file
        ktest: Re-arrange the code blocks for better discoverability
        ktest: Further consistency cleanups
        ktest: Fixing indentation to match expected pattern
        ktest: Adding editor hints to improve consistency
        ktest: Add example config for using VMware VMs
        ktest: Minor cleanup with uninitialized variable $build_options
      dd8c86c6
    • Linus Torvalds's avatar
      Merge tag 'safesetid-5.13' of git://github.com/micah-morton/linux · d29c9bb0
      Linus Torvalds authored
      Pull SafeSetID update from Micah Morton:
       "Simple code cleanup
      
        This just has a single three-line code cleanup to eliminate some
        unnecessary 'break' statements"
      
      * tag 'safesetid-5.13' of git://github.com/micah-morton/linux:
        LSM: SafeSetID: Fix code specification by scripts/checkpatch.pl
      d29c9bb0
    • Marco Elver's avatar
      kfence: use power-efficient work queue to run delayed work · 36f0b35d
      Marco Elver authored
      Use the power-efficient work queue, to avoid the pathological case where
      we keep pinning ourselves on the same possibly idle CPU on systems that
      want to be power-efficient (https://lwn.net/Articles/731052/).
      
      Link: https://lkml.kernel.org/r/20210421105132.3965998-4-elver@google.com
      
      
      Signed-off-by: default avatarMarco Elver <elver@google.com>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Hillf Danton <hdanton@sina.com>
      Cc: Jann Horn <jannh@google.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      36f0b35d
    • Marco Elver's avatar
      kfence: maximize allocation wait timeout duration · 37c9284f
      Marco Elver authored
      The allocation wait timeout was initially added because of warnings due to
      CONFIG_DETECT_HUNG_TASK=y [1].  While the 1 sec timeout is sufficient to
      resolve the warnings (given the hung task timeout must be 1 sec or larger)
      it may cause unnecessary wake-ups if the system is idle:
      
        https://lkml.kernel.org/r/CADYN=9J0DQhizAGB0-jz4HOBBh+05kMBXb4c0cXMS7Qi5NAJiw@mail.gmail.com
      
      Fix it by computing the timeout duration in terms of the current
      sysctl_hung_task_timeout_secs value.
      
      Link: https://lkml.kernel.org/r/20210421105132.3965998-3-elver@google.com
      
      
      Signed-off-by: default avatarMarco Elver <elver@google.com>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Hillf Danton <hdanton@sina.com>
      Cc: Jann Horn <jannh@google.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      37c9284f
    • Marco Elver's avatar
      kfence: await for allocation using wait_event · 407f1d8c
      Marco Elver authored
      Patch series "kfence: optimize timer scheduling", v2.
      
      We have observed that mostly-idle systems with KFENCE enabled wake up
      otherwise idle CPUs, preventing such to enter a lower power state.
      Debugging revealed that KFENCE spends too much active time in
      toggle_allocation_gate().
      
      While the first version of KFENCE was using all the right bits to be
      scheduling optimal, and thus power efficient, by simply using wait_event()
      + wake_up(), that code was unfortunately removed.
      
      As KFENCE was exposed to various different configs and tests, the
      scheduling optimal code slowly disappeared.  First because of hung task
      warnings, and finally because of deadlocks when an allocation is made by
      timer code with debug objects enabled.  Clearly, the "fixes" were not too
      friendly for devices that want to be power efficient.
      
      Therefore, let's try a little harder to fix the hung task and deadlock
      problems that we have with wait_event() + wake_up(), while remaining as
      scheduling friendly and power efficient as possible.
      
      Crucially, we need to defer the wake_up() to an irq_work, avoiding any
      potential for deadlock.
      
      The result with this series is that on the devices where we observed a
      power regression, power usage returns back to baseline levels.
      
      This patch (of 3):
      
      On mostly-idle systems, we have observed that toggle_allocation_gate() is
      a cause of frequent wake-ups, preventing an otherwise idle CPU to go into
      a lower power state.
      
      A late change in KFENCE's development, due to a potential deadlock [1],
      required changing the scheduling-friendly wait_event_timeout() and
      wake_up() to an open-coded wait-loop using schedule_timeout().  [1]
      https://lkml.kernel.org/r/000000000000c0645805b7f982e4@google.com
      
      To avoid unnecessary wake-ups, switch to using wait_event_timeout().
      
      Unfortunately, we still cannot use a version with direct wake_up() in
      __kfence_alloc() due to the same potential for deadlock as in [1].
      Instead, add a level of indirection via an irq_work that is scheduled if
      we determine that the kfence_timer requires a wake_up().
      
      Link: https://lkml.kernel.org/r/20210421105132.3965998-1-elver@google.com
      Link: https://lkml.kernel.org/r/20210421105132.3965998-2-elver@google.com
      Fixes: 0ce20dd8
      
       ("mm: add Kernel Electric-Fence infrastructure")
      Signed-off-by: default avatarMarco Elver <elver@google.com>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Jann Horn <jannh@google.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Hillf Danton <hdanton@sina.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      407f1d8c
    • Marco Elver's avatar
      kfence: zero guard page after out-of-bounds access · 94868a1e
      Marco Elver authored
      After an out-of-bounds accesses, zero the guard page before re-protecting
      in kfence_guarded_free().  On one hand this helps make the failure mode of
      subsequent out-of-bounds accesses more deterministic, but could also
      prevent certain information leaks.
      
      Link: https://lkml.kernel.org/r/20210312121653.348518-1-elver@google.com
      
      
      Signed-off-by: default avatarMarco Elver <elver@google.com>
      Acked-by: default avatarAlexander Potapenko <glider@google.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Andrey Konovalov <andreyknvl@google.com>
      Cc: Jann Horn <jannh@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      94868a1e
    • Zhang Yunkai's avatar
      mm/process_vm_access.c: remove duplicate include · 0c4ff27a
      Zhang Yunkai authored
      'linux/compat.h' included in 'process_vm_access.c' is duplicated.
      
      Link: https://lkml.kernel.org/r/20210306132122.220431-1-zhang.yunkai@zte.com.cn
      
      
      Signed-off-by: default avatarZhang Yunkai <zhang.yunkai@zte.com.cn>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0c4ff27a
    • Zhiyuan Dai's avatar
      mm/mempool: minor coding style tweaks · 68d68ff6
      Zhiyuan Dai authored
      Various coding style tweaks to various files under mm/
      
      [daizhiyuan@phytium.com.cn: mm/swapfile: minor coding style tweaks]
        Link: https://lkml.kernel.org/r/1614223624-16055-1-git-send-email-daizhiyuan@phytium.com.cn
      [daizhiyuan@phytium.com.cn: mm/sparse: minor coding style tweaks]
        Link: https://lkml.kernel.org/r/1614227288-19363-1-git-send-email-daizhiyuan@phytium.com.cn
      [daizhiyuan@phytium.com.cn: mm/vmscan: minor coding style tweaks]
        Link: https://lkml.kernel.org/r/1614227649-19853-1-git-send-email-daizhiyuan@phytium.com.cn
      [daizhiyuan@phytium.com.cn: mm/compaction: minor coding style tweaks]
        Link: https://lkml.kernel.org/r/1614228218-20770-1-git-send-email-daizhiyuan@phytium.com.cn
      [daizhiyuan@phytium.com.cn: mm/oom_kill: minor coding style tweaks]
        Link: https://lkml.kernel.org/r/1614228360-21168-1-git-send-email-daizhiyuan@phytium.com.cn
      [daizhiyuan@phytium.com.cn: mm/shmem: minor coding style tweaks]
        Link: https://lkml.kernel.org/r/1614228504-21491-1-git-send-email-daizhiyuan@phytium.com.cn
      [daizhiyuan@phytium.com.cn: mm/page_alloc: minor coding style tweaks]
        Link: https://lkml.kernel.org/r/1614228613-21754-1-git-send-email-daizhiyuan@phytium.com.cn
      [daizhiyuan@phytium.com.cn: mm/filemap: minor coding style tweaks]
        Link: https://lkml.kernel.org/r/1614228936-22337-1-git-send-email-daizhiyuan@phytium.com.cn
      [daizhiyuan@phytium.com.cn: mm/mlock: minor coding style tweaks]
        Link: https://lkml.kernel.org/r/1613956588-2453-1-git-send-email-daizhiyuan@phytium.com.cn
      [daizhiyuan@phytium.com.cn: mm/frontswap: minor coding style tweaks]
        Link: https://lkml.kernel.org/r/1613962668-15045-1-git-send-email-daizhiyuan@phytium.com.cn
      [daizhiyuan@phytium.com.cn: mm/vmalloc: minor coding style tweaks]
        Link: https://lkml.kernel.org/r/1613963379-15988-1-git-send-email-daizhiyuan@phytium.com.cn
      [daizhiyuan@phytium.com.cn: mm/memory_hotplug: minor coding style tweaks]
        Link: https://lkml.kernel.org/r/1613971784-24878-1-git-send-email-daizhiyuan@phytium.com.cn
      [daizhiyuan@phytium.com.cn: mm/mempolicy: minor coding style tweaks]
        Link: https://lkml.kernel.org/r/1613972228-25501-1-git-send-email-daizhiyuan@phytium.com.cn
      
      Link: https://lkml.kernel.org/r/1614222374-13805-1-git-send-email-daizhiyuan@phytium.com.cn
      
      
      Signed-off-by: default avatarZhiyuan Dai <daizhiyuan@phytium.com.cn>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      68d68ff6
    • songqiang's avatar
      9727688d
    • Ira Weiny's avatar
      btrfs: use memzero_page() instead of open coded kmap pattern · d048b9c2
      Ira Weiny authored
      There are many places where kmap/memset/kunmap patterns occur.
      
      Use the newly lifted memzero_page() to eliminate direct uses of kmap and
      leverage the new core functions use of kmap_local_page().
      
      The development of this patch was aided by the following coccinelle
      script:
      
      // <smpl>
      // SPDX-License-Identifier: GPL-2.0-only
      // Find kmap/memset/kunmap pattern and replace with memset*page calls
      //
      // NOTE: Offsets and other expressions may be more complex than what the script
      // will automatically generate.  Therefore a catchall rule is provided to find
      // the pattern which then must be evaluated by hand.
      //
      // Confidence: Low
      // Copyright: (C) 2021 Intel Corporation
      // URL: http://coccinelle.lip6.fr/
      // Comments:
      // Options:
      
      //
      // Then the memset pattern
      //
      @ memset_rule1 @
      expression page, V, L, Off;
      identifier ptr;
      type VP;
      @@
      
      (
      -VP ptr = kmap(page);
      |
      -ptr = kmap(page);
      |
      -VP ptr = kmap_atomic(page);
      |
      -ptr = kmap_atomic(page);
      )
      <+...
      (
      -memset(ptr, 0, L);
      +memzero_page(page, 0, L);
      |
      -memset(ptr + Off, 0, L);
      +memzero_page(page, Off, L);
      |
      -memset(ptr, V, L);
      +memset_page(page, V, 0, L);
      |
      -memset(ptr + Off, V, L);
      +memset_page(page, V, Off, L);
      )
      ...+>
      (
      -kunmap(page);
      |
      -kunmap_atomic(ptr);
      )
      
      // Remove any pointers left unused
      @
      depends on memset_rule1
      @
      identifier memset_rule1.ptr;
      type VP, VP1;
      @@
      
      -VP ptr;
      	... when != ptr;
      ? VP1 ptr;
      
      //
      // Catch all
      //
      @ memset_rule2 @
      expression page;
      identifier ptr;
      expression GenTo, GenSize, GenValue;
      type VP;
      @@
      
      (
      -VP ptr = kmap(page);
      |
      -ptr = kmap(page);
      |
      -VP ptr = kmap_atomic(page);
      |
      -ptr = kmap_atomic(page);
      )
      <+...
      (
      //
      // Some call sites have complex expressions within the memset/memcpy
      // The follow are catch alls which need to be evaluated by hand.
      //
      -memset(GenTo, 0, GenSize);
      +memzero_pageExtra(page, GenTo, GenSize);
      |
      -memset(GenTo, GenValue, GenSize);
      +memset_pageExtra(page, GenValue, GenTo, GenSize);
      )
      ...+>
      (
      -kunmap(page);
      |
      -kunmap_atomic(ptr);
      )
      
      // Remove any pointers left unused
      @
      depends on memset_rule2
      @
      identifier memset_rule2.ptr;
      type VP, VP1;
      @@
      
      -VP ptr;
      	... when != ptr;
      ? VP1 ptr;
      
      // </smpl>
      
      Link: https://lkml.kernel.org/r/20210309212137.2610186-4-ira.weiny@intel.com
      
      
      Signed-off-by: default avatarIra Weiny <ira.weiny@intel.com>
      Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
      Cc: Chris Mason <clm@fb.com>
      Cc: Josef Bacik <josef@toxicpanda.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d048b9c2
    • Ira Weiny's avatar
      iov_iter: lift memzero_page() to highmem.h · 28961998
      Ira Weiny authored
      Patch series "btrfs: Convert kmap/memset/kunmap to memzero_user()".
      
      Lifting memzero_user(), convert it to kmap_local_page() and then use it
      in btrfs.
      
      This patch (of 3):
      
      memzero_page() can replace the kmap/memset/kunmap pattern in other
      places in the code.  While zero_user() has the same interface it is not
      the same call and its use should be limited and some of those calls may
      be better converted from zero_user() to memzero_page().[1] But that is
      not addressed in this series.
      
      Lift memzero_page() to highmem.
      
      [1] https://lore.kernel.org/lkml/CAHk-=wijdojzo56FzYqE5TOYw2Vws7ik3LEMGj9SPQaJJ+Z73Q@mail.gmail.com/
      
      Link: https://lkml.kernel.org/r/20210309212137.2610186-1-ira.weiny@intel.com
      Link: https://lkml.kernel.org/r/20210309212137.2610186-2-ira.weiny@intel.com
      
      
      Signed-off-by: default avatarIra Weiny <ira.weiny@intel.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: David Sterba <dsterba@suse.com>
      Cc: Chris Mason <clm@fb.com>
      Cc: Josef Bacik <josef@toxicpanda.com>
      Cc: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      28961998
    • zhouchuangao's avatar
      mm/zsmalloc: use BUG_ON instead of if condition followed by BUG. · ecfc2bda
      zhouchuangao authored
      It can be optimized at compile time.
      
      Link: https://lkml.kernel.org/r/1616727798-9110-1-git-send-email-zhouchuangao@vivo.com
      
      
      Signed-off-by: default avatarzhouchuangao <zhouchuangao@vivo.com>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ecfc2bda
    • Zhiyuan Dai's avatar
      mm/zswap.c: switch from strlcpy to strscpy · 79cd4202
      Zhiyuan Dai authored
      strlcpy is marked as deprecated in Documentation/process/deprecated.rst,
      and there is no functional difference when the caller expects truncation
      (when not checking the return value).  strscpy is relatively better as
      it also avoids scanning the whole source string.
      
      Link: https://lkml.kernel.org/r/1614227981-20367-1-git-send-email-daizhiyuan@phytium.com.cn
      
      
      Signed-off-by: default avatarZhiyuan Dai <daizhiyuan@phytium.com.cn>
      Cc: Seth Jennings <sjenning@redhat.com>
      Cc: Dan Streetman <ddstreet@ieee.org>
      Cc: Vitaly Wool <vitaly.wool@konsulko.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      79cd4202
    • Oscar Salvador's avatar
      arm64/Kconfig: introduce ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE · ca6e51d5
      Oscar Salvador authored
      Enable arm64 platform to use the MHP_MEMMAP_ON_MEMORY feature.
      
      Link: https://lkml.kernel.org/r/20210421102701.25051-9-osalvador@suse.de
      
      
      Signed-off-by: default avatarOscar Salvador <osalvador@suse.de>
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      Cc: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ca6e51d5