1. 10 Jul, 2021 1 commit
  2. 09 Jul, 2021 16 commits
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.14-2021-07-09' of git://git.kernel.dk/linux-block · 50be9417
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "A few fixes that should go into this merge.
      
        One fixes a regression introduced in this release, others are just
        generic fixes, mostly related to handling fallback task_work"
      
      * tag 'io_uring-5.14-2021-07-09' of git://git.kernel.dk/linux-block:
        io_uring: remove dead non-zero 'poll' check
        io_uring: mitigate unlikely iopoll lag
        io_uring: fix drain alloc fail return code
        io_uring: fix exiting io_req_task_work_add leaks
        io_uring: simplify task_work func
        io_uring: fix stuck fallback reqs
      50be9417
    • Linus Torvalds's avatar
      Merge tag 'block-5.14-2021-07-08' of git://git.kernel.dk/linux-block · a022f7d5
      Linus Torvalds authored
      Pull more block updates from Jens Axboe:
       "A combination of changes that ended up depending on both the driver
        and core branch (and/or the IDE removal), and a few late arriving
        fixes. In detail:
      
         - Fix io ticks wrap-around issue (Chunguang)
      
         - nvme-tcp sock locking fix (Maurizio)
      
         - s390-dasd fixes (Kees, Christoph)
      
         - blk_execute_rq polling support (Keith)
      
         - blk-cgroup RCU iteration fix (Yu)
      
         - nbd backend ID addition (Prasanna)
      
         - Partition deletion fix (Yufen)
      
         - Use blk_mq_alloc_disk for mmc, mtip32xx, ubd (Christoph)
      
         - Removal of now dead block request types due to IDE removal
           (Christoph)
      
         - Loop probing and control device cleanups (Christoph)
      
         - Device uevent fix (Christoph)
      
         - Misc cleanups/fixes (Tetsuo, Christoph)"
      
      * tag 'block-5.14-2021-07-08' of git://git.kernel.dk/linux-block: (34 commits)
        blk-cgroup: prevent rcu_sched detected stalls warnings while iterating blkgs
        block: fix the problem of io_ticks becoming smaller
        nvme-tcp: can't set sk_user_data without write_lock
        loop: remove unused variable in loop_set_status()
        block: remove the bdgrab in blk_drop_partitions
        block: grab a device refcount in disk_uevent
        s390/dasd: Avoid field over-reading memcpy()
        dasd: unexport dasd_set_target_state
        block: check disk exist before trying to add partition
        ubd: remove dead code in ubd_setup_common
        nvme: use return value from blk_execute_rq()
        block: return errors from blk_execute_rq()
        nvme: use blk_execute_rq() for passthrough commands
        block: support polling through blk_execute_rq
        block: remove REQ_OP_SCSI_{IN,OUT}
        block: mark blk_mq_init_queue_data static
        loop: rewrite loop_exit using idr_for_each_entry
        loop: split loop_lookup
        loop: don't allow deleting an unspecified loop device
        loop: move loop_ctl_mutex locking into loop_add
        ...
      a022f7d5
    • Linus Torvalds's avatar
      Merge tag 'sound-fix-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 3de62951
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Just a collection of small fixes here: the most outstanding one is the
        re-application of USB-audio lowlatency support that was reverted in
        the previous PR. The rest are device-specific quirks/fixes, spelling
        fixes and a regression fix for the old intel8x0 driver"
      
      * tag 'sound-fix-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: intel8x0: Fix breakage at ac97 clock measurement
        ALSA: usb-audio: Reduce latency at playback start, take#2
        ALSA: isa: Fix error return code in snd_cmi8330_probe()
        ALSA: emux: fix spelling mistakes
        ALSA: usb-audio: fix spelling mistakes
        ALSA: bebob: correct duplicated entries with TerraTec OUI
        ALSA: usx2y: fix spelling mistakes
        ALSA: x86: fix spelling mistakes
        ALSA: hda/realtek: fix mute led of the HP Pavilion 15-eh1xxx series
      3de62951
    • Linus Torvalds's avatar
      Merge tag 'trace-v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 5a7f7fc5
      Linus Torvalds authored
      Pull tracing fix and cleanup from Steven Rostedt:
       "Tracing fix for histograms and a clean up in ftrace:
      
         - Fixed a bug that broke the .sym-offset modifier and added a test to
           make sure nothing breaks it again.
      
         - Replace a list_del/list_add() with a list_move()"
      
      * tag 'trace-v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        ftrace: Use list_move instead of list_del/list_add
        tracing/selftests: Add tests to test histogram sym and sym-offset modifiers
        tracing/histograms: Fix parsing of "sym-offset" modifier
      5a7f7fc5
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 1eb8df18
      Linus Torvalds authored
      Pull virtio,vhost,vdpa updates from Michael Tsirkin:
      
       - Doorbell remapping for ifcvf, mlx5
      
       - virtio_vdpa support for mlx5
      
       - Validate device input in several drivers (for SEV and friends)
      
       - ZONE_MOVABLE aware handling in virtio-mem
      
       - Misc fixes, cleanups
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (48 commits)
        virtio-mem: prioritize unplug from ZONE_MOVABLE in Big Block Mode
        virtio-mem: simplify high-level unplug handling in Big Block Mode
        virtio-mem: prioritize unplug from ZONE_MOVABLE in Sub Block Mode
        virtio-mem: simplify high-level unplug handling in Sub Block Mode
        virtio-mem: simplify high-level plug handling in Sub Block Mode
        virtio-mem: use page_zonenum() in virtio_mem_fake_offline()
        virtio-mem: don't read big block size in Sub Block Mode
        virtio/vdpa: clear the virtqueue state during probe
        vp_vdpa: allow set vq state to initial state after reset
        virtio-pci library: introduce vp_modern_get_driver_features()
        vdpa: support packed virtqueue for set/get_vq_state()
        virtio-ring: store DMA metadata in desc_extra for split virtqueue
        virtio: use err label in __vring_new_virtqueue()
        virtio_ring: introduce virtqueue_desc_add_split()
        virtio_ring: secure handling of mapping errors
        virtio-ring: factor out desc_extra allocation
        virtio_ring: rename vring_desc_extra_packed
        virtio-ring: maintain next in extra state for packed virtqueue
        vdpa/mlx5: Clear vq ready indication upon device reset
        vdpa/mlx5: Add support for doorbell bypassing
        ...
      1eb8df18
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · d8dc121e
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
      
       - Regression fix in drbg due to missing self-test for new default
         algorithm
      
       - Add ratelimit on user-triggerable message in qat
      
       - Fix build failure due to missing dependency in sl3516
      
       - Remove obsolete PageSlab checks
      
       - Fix bogus hardware register writes on Kunpeng920 in hisilicon/sec
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: hisilicon/sec - fix the process of disabling sva prefetching
        crypto: sl3516 - Add dependency on ARCH_GEMINI
        crypto: sl3516 - Typo s/Stormlink/Storlink/
        crypto: drbg - self test for HMAC(SHA-512)
        crypto: omap - Drop obsolete PageSlab check
        crypto: scatterwalk - Remove obsolete PageSlab check
        crypto: qat - ratelimit invalid ioctl message and print the invalid cmd
      d8dc121e
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.14-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 9b76d71f
      Linus Torvalds authored
      Pull RISC-V updates from Palmer Dabbelt:
       "We have a handful of new features for 5.14:
      
         - Support for transparent huge pages.
      
         - Support for generic PCI resources mapping.
      
         - Support for the mem= kernel parameter.
      
         - Support for KFENCE.
      
         - A handful of fixes to avoid W+X mappings in the kernel.
      
         - Support for VMAP_STACK based overflow detection.
      
         - An optimized copy_{to,from}_user"
      
      * tag 'riscv-for-linus-5.14-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (37 commits)
        riscv: xip: Fix duplicate included asm/pgtable.h
        riscv: Fix PTDUMP output now BPF region moved back to module region
        riscv: __asm_copy_to-from_user: Optimize unaligned memory access and pipeline stall
        riscv: add VMAP_STACK overflow detection
        riscv: ptrace: add argn syntax
        riscv: mm: fix build errors caused by mk_pmd()
        riscv: Introduce structure that group all variables regarding kernel mapping
        riscv: Map the kernel with correct permissions the first time
        riscv: Introduce set_kernel_memory helper
        riscv: Enable KFENCE for riscv64
        RISC-V: Use asm-generic for {in,out}{bwlq}
        riscv: add ASID-based tlbflushing methods
        riscv: pass the mm_struct to __sbi_tlb_flush_range
        riscv: Add mem kernel parameter support
        riscv: Simplify xip and !xip kernel address conversion macros
        riscv: Remove CONFIG_PHYS_RAM_BASE_FIXED
        riscv: Only initialize swiotlb when necessary
        riscv: fix typo in init.c
        riscv: Cleanup unused functions
        riscv: mm: Use better bitmap_zalloc()
        ...
      9b76d71f
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 1459718d
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "Fix crashes on 64-bit Book3E due to use of Book3S only mtmsrd
        instruction.
      
        Fix "scheduling while atomic" warnings at boot due to preempt count
        underflow.
      
        Two commits fixing our handling of BPF atomic instructions.
      
        Fix error handling in xive when allocating an IPI.
      
        Fix lockup on kernel exec fault on 603.
      
        Thanks to Bharata B Rao, Cédric Le Goater, Christian Zigotzky,
        Christophe Leroy, Guenter Roeck, Jiri Olsa, Naveen N. Rao, Nicholas
        Piggin, and Valentin Schneider"
      
      * tag 'powerpc-5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/preempt: Don't touch the idle task's preempt_count during hotplug
        powerpc/64e: Fix system call illegal mtmsrd instruction
        powerpc/xive: Fix error handling when allocating an IPI
        powerpc/bpf: Reject atomic ops in ppc32 JIT
        powerpc/bpf: Fix detecting BPF atomic instructions
        powerpc/mm: Fix lockup on kernel exec fault
      1459718d
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml · dcf3c935
      Linus Torvalds authored
      Pull UML updates from Richard Weinberger:
      
       - Support for optimized routines based on the host CPU
      
       - Support for PCI via virtio
      
       - Various fixes
      
      * tag 'for-linus-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
        um: remove unneeded semicolon in um_arch.c
        um: Remove the repeated declaration
        um: fix error return code in winch_tramp()
        um: fix error return code in slip_open()
        um: Fix stack pointer alignment
        um: implement flush_cache_vmap/flush_cache_vunmap
        um: add a UML specific futex implementation
        um: enable the use of optimized xor routines in UML
        um: Add support for host CPU flags and alignment
        um: allow not setting extra rpaths in the linux binary
        um: virtio/pci: enable suspend/resume
        um: add PCI over virtio emulation driver
        um: irqs: allow invoking time-travel handler multiple times
        um: time-travel/signals: fix ndelay() in interrupt
        um: expose time-travel mode to userspace side
        um: export signals_enabled directly
        um: remove unused smp_sigio_handler() declaration
        lib: add iomem emulation (logic_iomem)
        um: allow disabling NO_IOMEM
      dcf3c935
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs · 7a400bf2
      Linus Torvalds authored
      Pull UBIFS updates from Richard Weinberger:
      
       - Fix for a race xattr list and modification
      
       - Various minor fixes (spelling, return codes, ...)
      
      * tag 'for-linus-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs:
        ubifs: Set/Clear I_LINKABLE under i_lock for whiteout inode
        ubifs: Fix spelling mistakes
        ubifs: Remove ui_mutex in ubifs_xattr_get and change_xattr
        ubifs: Fix races between xattr_{set|get} and listxattr operations
        ubifs: fix snprintf() checking
        ubifs: journal: Fix error return code in ubifs_jnl_write_inode()
      7a400bf2
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · e49d68ce
      Linus Torvalds authored
      Pull ext4 updates from Ted Ts'o:
       "Ext4 regression and bug fixes"
      
      * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: inline jbd2_journal_[un]register_shrinker()
        ext4: fix flags validity checking for EXT4_IOC_CHECKPOINT
        ext4: fix possible UAF when remounting r/o a mmp-protected file system
        ext4: use ext4_grp_locked_error in mb_find_extent
        ext4: fix WARN_ON_ONCE(!buffer_uptodate) after an error writing the superblock
        Revert "ext4: consolidate checks for resize of bigalloc into ext4_resize_begin"
      e49d68ce
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-5.14-rc1' of git://github.com/ceph/ceph-client · 47a7ce62
      Linus Torvalds authored
      Pull ceph updates from Ilya Dryomov:
       "We have new filesystem client metrics for reporting I/O sizes from
        Xiubo, two patchsets from Jeff that begin to untangle some heavyweight
        blocking locks in the filesystem and a bunch of code cleanups"
      
      * tag 'ceph-for-5.14-rc1' of git://github.com/ceph/ceph-client:
        ceph: take reference to req->r_parent at point of assignment
        ceph: eliminate ceph_async_iput()
        ceph: don't take s_mutex in ceph_flush_snaps
        ceph: don't take s_mutex in try_flush_caps
        ceph: don't take s_mutex or snap_rwsem in ceph_check_caps
        ceph: eliminate session->s_gen_ttl_lock
        ceph: allow ceph_put_mds_session to take NULL or ERR_PTR
        ceph: clean up locking annotation for ceph_get_snap_realm and __lookup_snap_realm
        ceph: add some lockdep assertions around snaprealm handling
        ceph: decoding error in ceph_update_snap_realm should return -EIO
        ceph: add IO size metrics support
        ceph: update and rename __update_latency helper to __update_stdev
        ceph: simplify the metrics struct
        libceph: fix doc warnings in cls_lock_client.c
        libceph: remove unnecessary ret variable in ceph_auth_init()
        libceph: fix some spelling mistakes
        libceph: kill ceph_none_authorizer::reply_buf
        ceph: make ceph_queue_cap_snap static
        ceph: make ceph_netfs_read_ops static
        ceph: remove bogus checks and WARN_ONs from ceph_set_page_dirty
      47a7ce62
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-5.14-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 96890bc2
      Linus Torvalds authored
      Pull NFS client updates from Trond Myklebust:
       "Highlights include:
      
        Features:
      
         - Multiple patches to add support for fcntl() leases over NFSv4.
      
         - A sysfs interface to display more information about the various
           transport connections used by the RPC client
      
         - A sysfs interface to allow a suitably privileged user to offline a
           transport that may no longer point to a valid server
      
         - A sysfs interface to allow a suitably privileged user to change the
           server IP address used by the RPC client
      
        Stable fixes:
      
         - Two sunrpc fixes for deadlocks involving privileged rpc_wait_queues
      
        Bugfixes:
      
         - SUNRPC: Avoid a KASAN slab-out-of-bounds bug in xdr_set_page_base()
      
         - SUNRPC: prevent port reuse on transports which don't request it.
      
         - NFSv3: Fix memory leak in posix_acl_create()
      
         - NFS: Various fixes to attribute revalidation timeouts
      
         - NFSv4: Fix handling of non-atomic change attribute updates
      
         - NFSv4: If a server is down, don't cause mounts to other servers to
           hang as well
      
         - pNFS: Fix an Oops in pnfs_mark_request_commit() when doing O_DIRECT
      
         - NFS: Fix mount failures due to incorrect setting of the
           has_sec_mnt_opts filesystem flag
      
         - NFS: Ensure nfs_readpage returns promptly when an internal error
           occurs
      
         - NFS: Fix fscache read from NFS after cache error
      
         - pNFS: Various bugfixes around the LAYOUTGET operation"
      
      * tag 'nfs-for-5.14-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (46 commits)
        NFSv4/pNFS: Return an error if _nfs4_pnfs_v3_ds_connect can't load NFSv3
        NFSv4/pNFS: Don't call _nfs4_pnfs_v3_ds_connect multiple times
        NFSv4/pnfs: Clean up layout get on open
        NFSv4/pnfs: Fix layoutget behaviour after invalidation
        NFSv4/pnfs: Fix the layout barrier update
        NFS: Fix fscache read from NFS after cache error
        NFS: Ensure nfs_readpage returns promptly when internal error occurs
        sunrpc: remove an offlined xprt using sysfs
        sunrpc: provide showing transport's state info in the sysfs directory
        sunrpc: display xprt's queuelen of assigned tasks via sysfs
        sunrpc: provide multipath info in the sysfs directory
        NFSv4.1 identify and mark RPC tasks that can move between transports
        sunrpc: provide transport info in the sysfs directory
        SUNRPC: take a xprt offline using sysfs
        sunrpc: add dst_attr attributes to the sysfs xprt directory
        SUNRPC for TCP display xprt's source port in sysfs xprt_info
        SUNRPC query transport's source port
        SUNRPC display xprt's main value in sysfs's xprt_info
        SUNRPC mark the first transport
        sunrpc: add add sysfs directory per xprt under each xprt_switch
        ...
      96890bc2
    • Linus Torvalds's avatar
      Merge tag 'f2fs-for-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs · 227c4d50
      Linus Torvalds authored
      Pull f2fs updates from Jaegeuk Kim:
       "In this round, we've improved the compression support especially for
        Android such as allowing compression for mmap files, replacing the
        immutable bit with internal bit to prohibits data writes explicitly,
        and adding a mount option, "compress_cache", to improve random reads.
        And, we added "readonly" feature to compact the partition w/
        compression enabled, which will be useful for Android RO partitions.
      
        Enhancements:
         - support compression for mmap file
         - use an f2fs flag instead of IMMUTABLE bit for compression
         - support RO feature w/ extent_cache
         - fully support swapfile with file pinning
         - improve atgc tunability
         - add nocompress extensions to unselect files for compression
      
        Bug fixes:
         - fix false alaram on iget failure during GC
         - fix race condition on global pointers when there are multiple f2fs
           instances
         - add MODULE_SOFTDEP for initramfs
      
        As usual, we've also cleaned up some places for better code
        readability (e.g., sysfs/feature, debugging messages, slab cache
        name, and docs)"
      
      * tag 'f2fs-for-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (32 commits)
        f2fs: drop dirty node pages when cp is in error status
        f2fs: initialize page->private when using for our internal use
        f2fs: compress: add nocompress extensions support
        MAINTAINERS: f2fs: update my email address
        f2fs: remove false alarm on iget failure during GC
        f2fs: enable extent cache for compression files in read-only
        f2fs: fix to avoid adding tab before doc section
        f2fs: introduce f2fs_casefolded_name slab cache
        f2fs: swap: support migrating swapfile in aligned write mode
        f2fs: swap: remove dead codes
        f2fs: compress: add compress_inode to cache compressed blocks
        f2fs: clean up /sys/fs/f2fs/<disk>/features
        f2fs: add pin_file in feature list
        f2fs: Advertise encrypted casefolding in sysfs
        f2fs: Show casefolding support only when supported
        f2fs: support RO feature
        f2fs: logging neatening
        f2fs: introduce FI_COMPRESS_RELEASED instead of using IMMUTABLE bit
        f2fs: compress: remove unneeded preallocation
        f2fs: atgc: export entries for better tunability via sysfs
        ...
      227c4d50
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · bd9c3506
      Linus Torvalds authored
      Pull yet more updates from Andrew Morton:
       "54 patches.
      
        Subsystems affected by this patch series: lib, mm (slub, secretmem,
        cleanups, init, pagemap, and mremap), and debug"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (54 commits)
        powerpc/mm: enable HAVE_MOVE_PMD support
        powerpc/book3s64/mm: update flush_tlb_range to flush page walk cache
        mm/mremap: allow arch runtime override
        mm/mremap: hold the rmap lock in write mode when moving page table entries.
        mm/mremap: use pmd/pud_poplulate to update page table entries
        mm/mremap: don't enable optimized PUD move if page table levels is 2
        mm/mremap: convert huge PUD move to separate helper
        selftest/mremap_test: avoid crash with static build
        selftest/mremap_test: update the test to handle pagesize other than 4K
        mm: rename p4d_page_vaddr to p4d_pgtable and make it return pud_t *
        mm: rename pud_page_vaddr to pud_pgtable and make it return pmd_t *
        kdump: use vmlinux_build_id to simplify
        buildid: fix kernel-doc notation
        buildid: mark some arguments const
        scripts/decode_stacktrace.sh: indicate 'auto' can be used for base path
        scripts/decode_stacktrace.sh: silence stderr messages from addr2line/nm
        scripts/decode_stacktrace.sh: support debuginfod
        x86/dumpstack: use %pSb/%pBb for backtrace printing
        arm64: stacktrace: use %pSb for backtrace printing
        module: add printk formats to add module build ID to stacktraces
        ...
      bd9c3506
    • Jens Axboe's avatar
      io_uring: remove dead non-zero 'poll' check · 9ce85ef2
      Jens Axboe authored
      Colin reports that Coverity complains about checking for poll being
      non-zero after having dereferenced it multiple times. This is a valid
      complaint, and actually a leftover from back when this code was based
      on the aio poll code.
      
      Kill the redundant check.
      
      Link: https://lore.kernel.org/io-uring/fe70c532-e2a7-3722-58a1-0fa4e5c5ff2c@canonical.com/Reported-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      9ce85ef2
  3. 08 Jul, 2021 23 commits
    • Pavel Begunkov's avatar
      io_uring: mitigate unlikely iopoll lag · 8f487ef2
      Pavel Begunkov authored
      We have requests like IORING_OP_FILES_UPDATE that don't go through
      ->iopoll_list but get completed in place under ->uring_lock, and so
      after dropping the lock io_iopoll_check() should expect that some CQEs
      might have get completed in a meanwhile.
      
      Currently such events won't be accounted in @nr_events, and the loop
      will continue to poll even if there is enough of CQEs. It shouldn't be a
      problem as it's not likely to happen and so, but not nice either. Just
      return earlier in this case, it should be enough.
      Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
      Link: https://lore.kernel.org/r/66ef932cc66a34e3771bbae04b2953a8058e9d05.1625747741.git.asml.silence@gmail.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      8f487ef2
    • Linus Torvalds's avatar
      Merge tag 'drm-next-2021-07-08-1' of git://anongit.freedesktop.org/drm/drm · f5596657
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Some fixes for rc1 that came in the past weeks, mainly a bunch of
        amdgpu fixes, some i915 and the rest are misc around the place. I'm
        sending this a bit early so some more stuff may show up, but I'll
        probably take tomorrow off.
      
        dma-buf:
         - doc fixes
      
        amdgpu:
         - Misc Navi fixes
         - Powergating fix
         - Yellow Carp updates
         - Beige Goby updates
         - S0ix fix
         - Revert overlay validation fix
         - GPU reset fix for DC
         - PPC64 fix
         - Add new dimgrey cavefish DID
         - RAS fix
         - TTM fixes
      
        amdkfd:
         - SVM fixes
      
        radeon:
         - Fix missing drm_gem_object_put in error path
         - NULL ptr deref fix
      
        i915:
         - display DP VSC fix
         - DG1 display fix
         - IRQ fixes
         - IRQ demidlayering
      
        gma500:
         - bo leaks in error paths fixed"
      
      * tag 'drm-next-2021-07-08-1' of git://anongit.freedesktop.org/drm/drm: (52 commits)
        drm/i915: Drop all references to DRM IRQ midlayer
        drm/i915: Use the correct IRQ during resume
        drm/i915/display/dg1: Correctly map DPLLs during state readout
        drm/i915/display: Do not zero past infoframes.vsc
        drm/amdgpu: Conditionally reset SDMA RAS error counts
        drm/amdkfd: Maintain svm_bo reference in page->zone_device_data
        drm/amdkfd: add invalid pages debug at vram migration
        drm/amdkfd: skip migration for pages already in VRAM
        drm/amdkfd: skip invalid pages during migrations
        drm/amdkfd: classify and map mixed svm range pages in GPU
        drm/amdkfd: use hmm range fault to get both domain pfns
        drm/amdgpu: get owner ref in validate and map
        drm/amdkfd: set owner ref to svm range prefault
        drm/amdkfd: add owner ref param to get hmm pages
        drm/amdkfd: device pgmap owner at the svm migrate init
        drm/amdkfd: inc counter on child ranges with xnack off
        drm/amd/display: Extend DMUB diagnostic logging to DCN3.1
        drm/amdgpu: Update NV SIMD-per-CU to 2
        drm/amdgpu: add new dimgrey cavefish DID
        drm/amd/pm: skip PrepareMp1ForUnload message in s0ix
        ...
      f5596657
    • Linus Torvalds's avatar
      Merge tag 'pwm/for-5.14-rc1' of... · 8c1bfd74
      Linus Torvalds authored
      Merge tag 'pwm/for-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
      
      Pull pwm updates from Thierry Reding:
       "This contains mostly various fixes, cleanups and some conversions to
        the atomic API. One noteworthy change is that PWM consumers can now
        pass a hint to the PWM core about the PWM usage, enabling PWM
        providers to implement various optimizations.
      
        There's also a fair bit of simplification here with the addition of
        some device-managed helpers as well as unification between the DT and
        ACPI firmware interfaces"
      
      * tag 'pwm/for-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (50 commits)
        pwm: Remove redundant assignment to pointer pwm
        pwm: ep93xx: Fix read of uninitialized variable ret
        pwm: ep93xx: Prepare clock before using it
        pwm: ep93xx: Unfold legacy callbacks into ep93xx_pwm_apply()
        pwm: ep93xx: Implement .apply callback
        pwm: vt8500: Only unprepare the clock after the pwmchip was removed
        pwm: vt8500: Drop if with an always false condition
        pwm: tegra: Assert reset only after the PWM was unregistered
        pwm: tegra: Don't needlessly enable and disable the clock in .remove()
        pwm: tegra: Don't modify HW state in .remove callback
        pwm: tegra: Drop an if block with an always false condition
        pwm: core: Simplify some devm_*pwm*() functions
        pwm: core: Remove unused devm_pwm_put()
        pwm: core: Unify fwnode checks in the module
        pwm: core: Reuse fwnode_to_pwmchip() in ACPI case
        pwm: core: Convert to use fwnode for matching
        docs: firmware-guide: ACPI: Add a PWM example
        dt-bindings: pwm: pwm-tiecap: Add compatible string for AM64 SoC
        dt-bindings: pwm: pwm-tiecap: Convert to json schema
        pwm: sprd: Don't check the return code of pwmchip_remove()
        ...
      8c1bfd74
    • Linus Torvalds's avatar
      Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · b0dfd9af
      Linus Torvalds authored
      Pull more clk updates from Stephen Boyd:
      
       - A handful of fixes for lmk04832 driver
      
       - Migrate the basic clk divider to use determine rate ops
      
       - Fix modpost build for hisilicon hi3559a driver
      
       - Actually set the parent in k210_clk_set_parent()
      
      * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        Revert "clk: divider: Switch from .round_rate to .determine_rate by default"
        clk: hisilicon: hi3559a: Drop __init markings everywhere
        clk: meson: regmap: switch to determine_rate for the dividers
        clk: divider: Switch from .round_rate to .determine_rate by default
        clk: divider: Add re-usable determine_rate implementations
        clk: k210: Fix k210_clk_set_parent()
        clk: lmk04832: Fix spelling mistakes in dev_err messages and comments
        clk: lmk04832: fix return value check in lmk04832_probe()
        clk: stm32mp1: fix missing spin_lock_init()
      b0dfd9af
    • Linus Torvalds's avatar
      Merge tag 'pci-v5.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 316a2c9b
      Linus Torvalds authored
      Pull pci updates from Bjorn Helgaas:
       "Enumeration:
         - Fix dsm_label_utf16s_to_utf8s() buffer overrun (Krzysztof
           Wilczyński)
         - Rely on lengths from scnprintf(), dsm_label_utf16s_to_utf8s()
           (Krzysztof Wilczyński)
         - Use sysfs_emit() and sysfs_emit_at() in "show" functions (Krzysztof
           Wilczyński)
         - Fix 'resource_alignment' newline issues (Krzysztof Wilczyński)
         - Add 'devspec' newline (Krzysztof Wilczyński)
         - Dynamically map ECAM regions (Russell King)
      
        Resource management:
         - Coalesce host bridge contiguous apertures (Kai-Heng Feng)
      
        PCIe native device hotplug:
         - Ignore Link Down/Up caused by DPC (Lukas Wunner)
      
        Power management:
         - Leave Apple Thunderbolt controllers on for s2idle or standby
           (Konstantin Kharlamov)
      
        Virtualization:
         - Work around Huawei Intelligent NIC VF FLR erratum (Chiqijun)
         - Clarify error message for unbound IOV devices (Moritz Fischer)
         - Add pci_reset_bus_function() Secondary Bus Reset interface (Raphael
           Norwitz)
      
        Peer-to-peer DMA:
         - Simplify distance calculation (Christoph Hellwig)
         - Finish RCU conversion of pdev->p2pdma (Eric Dumazet)
         - Rename upstream_bridge_distance() and rework doc (Logan Gunthorpe)
         - Collect acs list in stack buffer to avoid sleeping (Logan
           Gunthorpe)
         - Use correct calc_map_type_and_dist() return type (Logan Gunthorpe)
         - Warn if host bridge not in whitelist (Logan Gunthorpe)
         - Refactor pci_p2pdma_map_type() (Logan Gunthorpe)
         - Avoid pci_get_slot(), which may sleep (Logan Gunthorpe)
      
        Altera PCIe controller driver:
         - Add Joyce Ooi as Altera PCIe maintainer (Joyce Ooi)
      
        Broadcom iProc PCIe controller driver:
         - Fix multi-MSI base vector number allocation (Sandor Bodo-Merle)
         - Support multi-MSI only on uniprocessor kernel (Sandor Bodo-Merle)
      
        Freescale i.MX6 PCIe controller driver:
         - Limit DBI register length for imx6qp PCIe (Richard Zhu)
         - Add "vph-supply" for PHY supply voltage (Richard Zhu)
         - Enable PHY internal regulator when supplied >3V (Richard Zhu)
         - Remove imx6_pcie_probe() redundant error message (Zhen Lei)
      
        Intel Gateway PCIe controller driver:
         - Fix INTx enable (Martin Blumenstingl)
      
        Marvell Aardvark PCIe controller driver:
         - Fix checking for PIO Non-posted Request (Pali Rohár)
         - Implement workaround for the readback value of VEND_ID (Pali Rohár)
      
        MediaTek PCIe controller driver:
         - Remove redundant error printing in mtk_pcie_subsys_powerup() (Zhen
           Lei)
      
        MediaTek PCIe Gen3 controller driver:
         - Add missing MODULE_DEVICE_TABLE (Zou Wei)
      
        Microchip PolarFlare PCIe controller driver:
         - Make struct event_descs static (Krzysztof Wilczyński)
      
        Microsoft Hyper-V host bridge driver:
         - Fix race condition when removing the device (Long Li)
         - Remove bus device removal unused refcount/functions (Long Li)
      
        Mobiveil PCIe controller driver:
         - Remove unused readl and writel functions (Krzysztof Wilczyński)
      
        NVIDIA Tegra PCIe controller driver:
         - Add missing MODULE_DEVICE_TABLE (Zou Wei)
      
        NVIDIA Tegra194 PCIe controller driver:
         - Fix tegra_pcie_ep_raise_msi_irq() ill-defined shift (Jon Hunter)
         - Fix host initialization during resume (Vidya Sagar)
      
        Rockchip PCIe controller driver:
         - Register IRQ handlers after device and data are ready (Javier
           Martinez Canillas)"
      
      * tag 'pci-v5.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (48 commits)
        PCI/P2PDMA: Finish RCU conversion of pdev->p2pdma
        PCI: xgene: Annotate __iomem pointer
        PCI: Fix kernel-doc formatting
        PCI: cpcihp: Declare cpci_debug in header file
        MAINTAINERS: Add Joyce Ooi as Altera PCIe maintainer
        PCI: rockchip: Register IRQ handlers after device and data are ready
        PCI: tegra194: Fix tegra_pcie_ep_raise_msi_irq() ill-defined shift
        PCI: aardvark: Implement workaround for the readback value of VEND_ID
        PCI: aardvark: Fix checking for PIO Non-posted Request
        PCI: tegra194: Fix host initialization during resume
        PCI: tegra: Add missing MODULE_DEVICE_TABLE
        PCI: imx6: Enable PHY internal regulator when supplied >3V
        dt-bindings: imx6q-pcie: Add "vph-supply" for PHY supply voltage
        PCI: imx6: Limit DBI register length for imx6qp PCIe
        PCI: imx6: Remove imx6_pcie_probe() redundant error message
        PCI: intel-gw: Fix INTx enable
        PCI: iproc: Support multi-MSI only on uniprocessor kernel
        PCI: iproc: Fix multi-MSI base vector number allocation
        PCI: mediatek-gen3: Add missing MODULE_DEVICE_TABLE
        PCI: Dynamically map ECAM regions
        ...
      316a2c9b
    • Aneesh Kumar K.V's avatar
      powerpc/mm: enable HAVE_MOVE_PMD support · feac00aa
      Aneesh Kumar K.V authored
      mremap HAVE_MOVE_PMD/PUD optimization time comparison for 1GB region:
      1GB mremap - Source PTE-aligned, Destination PTE-aligned
        mremap time:      2292772ns
      1GB mremap - Source PMD-aligned, Destination PMD-aligned
        mremap time:      1158928ns
      1GB mremap - Source PUD-aligned, Destination PUD-aligned
        mremap time:        63886ns
      
      Link: https://lkml.kernel.org/r/20210616045735.374532-4-aneesh.kumar@linux.ibm.comSigned-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Joel Fernandes <joel@joelfernandes.org>
      Cc: Kalesh Singh <kaleshsingh@google.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Kirill A. Shutemov <kirill@shutemov.name>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      feac00aa
    • Aneesh Kumar K.V's avatar
      powerpc/book3s64/mm: update flush_tlb_range to flush page walk cache · cec6515a
      Aneesh Kumar K.V authored
      flush_tlb_range is special in that we don't specify the page size used for
      the translation.  Hence when flushing TLB we flush the translation cache
      for all possible page sizes.  The kernel also uses the same interface when
      moving page tables around.  Such a move requires us to flush the page walk
      cache.
      
      Instead of adding another interface to force page walk cache flush, update
      flush_tlb_range to flush page walk cache if the range flushed is more than
      the PMD range.  A page table move will always involve an invalidate range
      more than PMD_SIZE.
      
      Running microbenchmark with mprotect and parallel memory access didn't
      show any observable performance impact.
      
      Link: https://lkml.kernel.org/r/20210616045735.374532-3-aneesh.kumar@linux.ibm.comSigned-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Joel Fernandes <joel@joelfernandes.org>
      Cc: Kalesh Singh <kaleshsingh@google.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cec6515a
    • Aneesh Kumar K.V's avatar
      mm/mremap: allow arch runtime override · 3bbda69c
      Aneesh Kumar K.V authored
      Patch series "Speedup mremap on ppc64", v8.
      
      This patchset enables MOVE_PMD/MOVE_PUD support on power.  This requires
      the platform to support updating higher-level page tables without updating
      page table entries.  This also needs to invalidate the Page Walk Cache on
      architecture supporting the same.
      
      This patch (of 3):
      
      Architectures like ppc64 support faster mremap only with radix
      translation.  Hence allow a runtime check w.r.t support for fast mremap.
      
      Link: https://lkml.kernel.org/r/20210616045735.374532-1-aneesh.kumar@linux.ibm.com
      Link: https://lkml.kernel.org/r/20210616045735.374532-2-aneesh.kumar@linux.ibm.comSigned-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Kalesh Singh <kaleshsingh@google.com>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Joel Fernandes <joel@joelfernandes.org>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Kirill A. Shutemov <kirill@shutemov.name>
      Cc: "Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3bbda69c
    • Aneesh Kumar K.V's avatar
      mm/mremap: hold the rmap lock in write mode when moving page table entries. · 97113eb3
      Aneesh Kumar K.V authored
      To avoid a race between rmap walk and mremap, mremap does
      take_rmap_locks().  The lock was taken to ensure that rmap walk don't miss
      a page table entry due to PTE moves via move_pagetables().  The kernel
      does further optimization of this lock such that if we are going to find
      the newly added vma after the old vma, the rmap lock is not taken.  This
      is because rmap walk would find the vmas in the same order and if we don't
      find the page table attached to older vma we would find it with the new
      vma which we would iterate later.
      
      As explained in commit eb66ae03 ("mremap: properly flush TLB before
      releasing the page") mremap is special in that it doesn't take ownership
      of the page.  The optimized version for PUD/PMD aligned mremap also
      doesn't hold the ptl lock.  This can result in stale TLB entries as show
      below.
      
      This patch updates the rmap locking requirement in mremap to handle the race condition
      explained below with optimized mremap::
      
      Optmized PMD move
      
          CPU 1                           CPU 2                                   CPU 3
      
          mremap(old_addr, new_addr)      page_shrinker/try_to_unmap_one
      
          mmap_write_lock_killable()
      
                                          addr = old_addr
                                          lock(pte_ptl)
          lock(pmd_ptl)
          pmd = *old_pmd
          pmd_clear(old_pmd)
          flush_tlb_range(old_addr)
      
          *new_pmd = pmd
                                                                                  *new_addr = 10; and fills
                                                                                  TLB with new addr
                                                                                  and old pfn
      
          unlock(pmd_ptl)
                                          ptep_clear_flush()
                                          old pfn is free.
                                                                                  Stale TLB entry
      
      Optimized PUD move also suffers from a similar race.  Both the above race
      condition can be fixed if we force mremap path to take rmap lock.
      
      Link: https://lkml.kernel.org/r/20210616045239.370802-7-aneesh.kumar@linux.ibm.com
      Fixes: 2c91bd4a ("mm: speed up mremap by 20x on large regions")
      Fixes: c49dd340 ("mm: speedup mremap on 1GB or larger regions")
      Link: https://lore.kernel.org/linux-mm/CAHk-=wgXVR04eBNtxQfevontWnP6FDm+oj5vauQXP3S-huwbPw@mail.gmail.comSigned-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Acked-by: default avatarHugh Dickins <hughd@google.com>
      Acked-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Joel Fernandes <joel@joelfernandes.org>
      Cc: Kalesh Singh <kaleshsingh@google.com>
      Cc: Kirill A. Shutemov <kirill@shutemov.name>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      97113eb3
    • Aneesh Kumar K.V's avatar
      mm/mremap: use pmd/pud_poplulate to update page table entries · 0881ace2
      Aneesh Kumar K.V authored
      pmd/pud_populate is the right interface to be used to set the respective
      page table entries.  Some architectures like ppc64 do assume that
      set_pmd/pud_at can only be used to set a hugepage PTE.  Since we are not
      setting up a hugepage PTE here, use the pmd/pud_populate interface.
      
      Link: https://lkml.kernel.org/r/20210616045239.370802-6-aneesh.kumar@linux.ibm.comSigned-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Joel Fernandes <joel@joelfernandes.org>
      Cc: Kalesh Singh <kaleshsingh@google.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0881ace2
    • Aneesh Kumar K.V's avatar
      mm/mremap: don't enable optimized PUD move if page table levels is 2 · d6655dff
      Aneesh Kumar K.V authored
      With two level page table don't enable move_normal_pud.
      
      Link: https://lkml.kernel.org/r/20210616045239.370802-5-aneesh.kumar@linux.ibm.comSigned-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Joel Fernandes <joel@joelfernandes.org>
      Cc: Kalesh Singh <kaleshsingh@google.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d6655dff
    • Aneesh Kumar K.V's avatar
      mm/mremap: convert huge PUD move to separate helper · 7d846db7
      Aneesh Kumar K.V authored
      With TRANSPARENT_HUGEPAGE_PUD enabled the kernel can find huge PUD
      entries.  Add a helper to move huge PUD entries on mremap().
      
      This will be used by a later patch to optimize mremap of PUD_SIZE aligned
      level 4 PTE mapped address
      
      This also make sure we support mremap on huge PUD entries even with
      CONFIG_HAVE_MOVE_PUD disabled.
      
      [aneesh.kumar@linux.ibm.com: fix build failure with clang-10]
        Link: https://lore.kernel.org/lkml/YMuOSnJsL9qkxweY@archlinux-ax161
        Link: https://lkml.kernel.org/r/20210619134310.89098-1-aneesh.kumar@linux.ibm.com
      
      Link: https://lkml.kernel.org/r/20210616045239.370802-4-aneesh.kumar@linux.ibm.comSigned-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Joel Fernandes <joel@joelfernandes.org>
      Cc: Kalesh Singh <kaleshsingh@google.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7d846db7
    • Aneesh Kumar K.V's avatar
      selftest/mremap_test: avoid crash with static build · a9cc9c34
      Aneesh Kumar K.V authored
      With a large mmap map size, we can overlap with the text area and using
      MAP_FIXED results in unmapping that area.  Switch to MAP_FIXED_NOREPLACE
      and handle the EEXIST error.
      
      Link: https://lkml.kernel.org/r/20210616045239.370802-3-aneesh.kumar@linux.ibm.comSigned-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Reviewed-by: default avatarKalesh Singh <kaleshsingh@google.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Joel Fernandes <joel@joelfernandes.org>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a9cc9c34
    • Aneesh Kumar K.V's avatar
      selftest/mremap_test: update the test to handle pagesize other than 4K · f27a5c93
      Aneesh Kumar K.V authored
      Patch series "mrermap fixes", v2.
      
      This patch (of 6):
      
      Instead of hardcoding 4K page size fetch it using sysconf().  For the
      performance measurements test still assume 2M and 1G are hugepage sizes.
      
      Link: https://lkml.kernel.org/r/20210616045239.370802-1-aneesh.kumar@linux.ibm.com
      Link: https://lkml.kernel.org/r/20210616045239.370802-2-aneesh.kumar@linux.ibm.comSigned-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Reviewed-by: default avatarKalesh Singh <kaleshsingh@google.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Joel Fernandes <joel@joelfernandes.org>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Kirill A. Shutemov <kirill@shutemov.name>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f27a5c93
    • Aneesh Kumar K.V's avatar
      mm: rename p4d_page_vaddr to p4d_pgtable and make it return pud_t * · dc4875f0
      Aneesh Kumar K.V authored
      No functional change in this patch.
      
      [aneesh.kumar@linux.ibm.com: m68k build error reported by kernel robot]
        Link: https://lkml.kernel.org/r/87tulxnb2v.fsf@linux.ibm.com
      
      Link: https://lkml.kernel.org/r/20210615110859.320299-2-aneesh.kumar@linux.ibm.com
      Link: https://lore.kernel.org/linuxppc-dev/CAHk-=wi+J+iodze9FtjM3Zi4j4OeS+qqbKxME9QN4roxPEXH9Q@mail.gmail.com/Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Joel Fernandes <joel@joelfernandes.org>
      Cc: Kalesh Singh <kaleshsingh@google.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      dc4875f0
    • Aneesh Kumar K.V's avatar
      mm: rename pud_page_vaddr to pud_pgtable and make it return pmd_t * · 9cf6fa24
      Aneesh Kumar K.V authored
      No functional change in this patch.
      
      [aneesh.kumar@linux.ibm.com: fix]
        Link: https://lkml.kernel.org/r/87wnqtnb60.fsf@linux.ibm.com
      [sfr@canb.auug.org.au: another fix]
        Link: https://lkml.kernel.org/r/20210619134410.89559-1-aneesh.kumar@linux.ibm.com
      
      Link: https://lkml.kernel.org/r/20210615110859.320299-1-aneesh.kumar@linux.ibm.com
      Link: https://lore.kernel.org/linuxppc-dev/CAHk-=wi+J+iodze9FtjM3Zi4j4OeS+qqbKxME9QN4roxPEXH9Q@mail.gmail.com/Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Joel Fernandes <joel@joelfernandes.org>
      Cc: Kalesh Singh <kaleshsingh@google.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9cf6fa24
    • Stephen Boyd's avatar
      kdump: use vmlinux_build_id to simplify · 44e8a5e9
      Stephen Boyd authored
      We can use the vmlinux_build_id array here now instead of open coding it.
      This mostly consolidates code.
      
      Link: https://lkml.kernel.org/r/20210511003845.2429846-14-swboyd@chromium.orgSigned-off-by: default avatarStephen Boyd <swboyd@chromium.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Jessica Yu <jeyu@kernel.org>
      Cc: Evan Green <evgreen@chromium.org>
      Cc: Hsin-Yi Wang <hsinyi@chromium.org>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Sasha Levin <sashal@kernel.org>
      Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Will Deacon <will@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      44e8a5e9
    • Stephen Boyd's avatar
      buildid: fix kernel-doc notation · 3f14d029
      Stephen Boyd authored
      Kernel doc should use "Return:" instead of "Returns" to properly reflect
      the return values.
      
      Link: https://lkml.kernel.org/r/20210511003845.2429846-13-swboyd@chromium.orgSigned-off-by: default avatarStephen Boyd <swboyd@chromium.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Jessica Yu <jeyu@kernel.org>
      Cc: Evan Green <evgreen@chromium.org>
      Cc: Hsin-Yi Wang <hsinyi@chromium.org>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Sasha Levin <sashal@kernel.org>
      Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: Will Deacon <will@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3f14d029
    • Stephen Boyd's avatar
      buildid: mark some arguments const · 60eec326
      Stephen Boyd authored
      These arguments are never modified so they can be marked const to indicate
      as such.
      
      Link: https://lkml.kernel.org/r/20210511003845.2429846-12-swboyd@chromium.orgSigned-off-by: default avatarStephen Boyd <swboyd@chromium.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Jessica Yu <jeyu@kernel.org>
      Cc: Evan Green <evgreen@chromium.org>
      Cc: Hsin-Yi Wang <hsinyi@chromium.org>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Sasha Levin <sashal@kernel.org>
      Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: Will Deacon <will@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      60eec326
    • Stephen Boyd's avatar
      scripts/decode_stacktrace.sh: indicate 'auto' can be used for base path · d5ce757d
      Stephen Boyd authored
      Add "auto" to the usage message so that it's a little clearer that you can
      pass "auto" as the second argument.  When passing "auto" the script tries
      to find the base path automatically instead of requiring it be passed on
      the commandline.  Also use [<variable>] to indicate the variable argument
      and that it is optional so that we can differentiate from the literal
      "auto" that should be passed.
      
      Link: https://lkml.kernel.org/r/20210511003845.2429846-11-swboyd@chromium.orgSigned-off-by: default avatarStephen Boyd <swboyd@chromium.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Jessica Yu <jeyu@kernel.org>
      Cc: Evan Green <evgreen@chromium.org>
      Cc: Hsin-Yi Wang <hsinyi@chromium.org>
      Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Cc: Sasha Levin <sashal@kernel.org>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: Will Deacon <will@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d5ce757d
    • Stephen Boyd's avatar
      scripts/decode_stacktrace.sh: silence stderr messages from addr2line/nm · 5bf0f3bc
      Stephen Boyd authored
      Sometimes if you're using tools that have linked things improperly or have
      new features/sections that older tools don't expect you'll see warnings
      printed to stderr.  We don't really care about these warnings, so let's
      just silence these messages to cleanup output of this script.
      
      Link: https://lkml.kernel.org/r/20210511003845.2429846-10-swboyd@chromium.orgSigned-off-by: default avatarStephen Boyd <swboyd@chromium.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Jessica Yu <jeyu@kernel.org>
      Cc: Evan Green <evgreen@chromium.org>
      Cc: Hsin-Yi Wang <hsinyi@chromium.org>
      Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Cc: Sasha Levin <sashal@kernel.org>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: Will Deacon <will@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5bf0f3bc
    • Stephen Boyd's avatar
      scripts/decode_stacktrace.sh: support debuginfod · 26681eb3
      Stephen Boyd authored
      Now that stacktraces contain the build ID information we can update this
      script to use debuginfod-find to locate the debuginfo for the vmlinux and
      modules automatically.  This can replace the existing code that requires
      specifying a path to vmlinux or tries to find the vmlinux and modules
      automatically by using the release number.  Work it into the script as a
      fallback option if the vmlinux isn't specified on the commandline.
      
      Link: https://lkml.kernel.org/r/20210511003845.2429846-9-swboyd@chromium.orgSigned-off-by: default avatarStephen Boyd <swboyd@chromium.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Jessica Yu <jeyu@kernel.org>
      Cc: Evan Green <evgreen@chromium.org>
      Cc: Hsin-Yi Wang <hsinyi@chromium.org>
      Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Cc: Sasha Levin <sashal@kernel.org>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: Will Deacon <will@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      26681eb3
    • Stephen Boyd's avatar
      x86/dumpstack: use %pSb/%pBb for backtrace printing · 9ef8af2a
      Stephen Boyd authored
      Let's use the new printk formats to print the stacktrace entries when
      printing a backtrace to the kernel logs.  This will include any module's
      build ID[1] in it so that offline/crash debugging can easily locate the
      debuginfo for a module via something like debuginfod[2].
      
      Link: https://lkml.kernel.org/r/20210511003845.2429846-8-swboyd@chromium.org
      Link: https://fedoraproject.org/wiki/Releases/FeatureBuildId [1]
      Link: https://sourceware.org/elfutils/Debuginfod.html [2]
      Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Jessica Yu <jeyu@kernel.org>
      Cc: Evan Green <evgreen@chromium.org>
      Cc: Hsin-Yi Wang <hsinyi@chromium.org>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Sasha Levin <sashal@kernel.org>
      Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: Will Deacon <will@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9ef8af2a