1. 13 9月, 2021 6 次提交
    • D
      afs: Fix updating of i_blocks on file/dir extension · 9d37e1ca
      David Howells 提交于
      When an afs file or directory is modified locally such that the total file
      size is extended, i_blocks needs to be recalculated too.
      
      Fix this by making afs_write_end() and afs_edit_dir_add() call
      afs_set_i_size() rather than setting inode->i_size directly as that also
      recalculates inode->i_blocks.
      
      This can be tested by creating and writing into directories and files and
      then examining them with du.  Without this change, directories show a 4
      blocks (they start out at 2048 bytes) and files show 0 blocks; with this
      change, they should show a number of blocks proportional to the file size
      rounded up to 1024.
      
      Fixes: 31143d5d ("AFS: implement basic file write support")
      Fixes: 63a4681f ("afs: Locally edit directory data for mkdir/create/unlink/...")
      Reported-by: NMarkus Suvanto <markus.suvanto@gmail.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Reviewed-by: NMarc Dionne <marc.dionne@auristor.com>
      Tested-by: NMarkus Suvanto <markus.suvanto@gmail.com>
      cc: linux-afs@lists.infradead.org
      Link: https://lore.kernel.org/r/163113612442.352844.11162345591911691150.stgit@warthog.procyon.org.uk/
      9d37e1ca
    • D
      afs: Fix corruption in reads at fpos 2G-4G from an OpenAFS server · b537a3c2
      David Howells 提交于
      AFS-3 has two data fetch RPC variants, FS.FetchData and FS.FetchData64, and
      Linux's afs client switches between them when talking to a non-YFS server
      if the read size, the file position or the sum of the two have the upper 32
      bits set of the 64-bit value.
      
      This is a problem, however, since the file position and length fields of
      FS.FetchData are *signed* 32-bit values.
      
      Fix this by capturing the capability bits obtained from the fileserver when
      it's sent an FS.GetCapabilities RPC, rather than just discarding them, and
      then picking out the VICED_CAPABILITY_64BITFILES flag.  This can then be
      used to decide whether to use FS.FetchData or FS.FetchData64 - and also
      FS.StoreData or FS.StoreData64 - rather than using upper_32_bits() to
      switch on the parameter values.
      
      This capabilities flag could also be used to limit the maximum size of the
      file, but all servers must be checked for that.
      
      Note that the issue does not exist with FS.StoreData - that uses *unsigned*
      32-bit values.  It's also not a problem with Auristor servers as its
      YFS.FetchData64 op uses unsigned 64-bit values.
      
      This can be tested by cloning a git repo through an OpenAFS client to an
      OpenAFS server and then doing "git status" on it from a Linux afs
      client[1].  Provided the clone has a pack file that's in the 2G-4G range,
      the git status will show errors like:
      
      	error: packfile .git/objects/pack/pack-5e813c51d12b6847bbc0fcd97c2bca66da50079c.pack does not match index
      	error: packfile .git/objects/pack/pack-5e813c51d12b6847bbc0fcd97c2bca66da50079c.pack does not match index
      
      This can be observed in the server's FileLog with something like the
      following appearing:
      
      Sun Aug 29 19:31:39 2021 SRXAFS_FetchData, Fid = 2303380852.491776.3263114, Host 192.168.11.201:7001, Id 1001
      Sun Aug 29 19:31:39 2021 CheckRights: len=0, for host=192.168.11.201:7001
      Sun Aug 29 19:31:39 2021 FetchData_RXStyle: Pos 18446744071815340032, Len 3154
      Sun Aug 29 19:31:39 2021 FetchData_RXStyle: file size 2400758866
      ...
      Sun Aug 29 19:31:40 2021 SRXAFS_FetchData returns 5
      
      Note the file position of 18446744071815340032.  This is the requested file
      position sign-extended.
      
      Fixes: b9b1f8d5 ("AFS: write support fixes")
      Reported-by: NMarkus Suvanto <markus.suvanto@gmail.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Reviewed-by: NMarc Dionne <marc.dionne@auristor.com>
      Tested-by: NMarkus Suvanto <markus.suvanto@gmail.com>
      cc: linux-afs@lists.infradead.org
      cc: openafs-devel@openafs.org
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=214217#c9 [1]
      Link: https://lore.kernel.org/r/951332.1631308745@warthog.procyon.org.uk/
      b537a3c2
    • D
      afs: Try to avoid taking RCU read lock when checking vnode validity · 4fe6a946
      David Howells 提交于
      Try to avoid taking the RCU read lock when checking the validity of a
      vnode's callback state.  The only thing it's needed for is to pin the
      parent volume's server list whilst we search it to find the record of the
      server we're currently using to see if it has been reinitialised (ie. it
      sent us a CB.InitCallBackState* RPC).
      
      Do this by the following means:
      
       (1) Keep an additional per-cell counter (fs_s_break) that's incremented
           each time any of the fileservers in the cell reinitialises.
      
           Since the new counter can be accessed without RCU from the vnode, we
           can check that first - and only if it differs, get the RCU read lock
           and check the volume's server list.
      
       (2) Replace afs_get_s_break_rcu() with afs_check_server_good() which now
           indicates whether the callback promise is still expected to be present
           on the server.  This does the checks as described in (1).
      
       (3) Restructure afs_check_validity() to take account of the change in (2).
      
           We can also get rid of the valid variable and just use the need_clear
           variable with the addition of the afs_cb_break_no_promise reason.
      
       (4) afs_check_validity() probably shouldn't be altering vnode->cb_v_break
           and vnode->cb_s_break when it doesn't have cb_lock exclusively locked.
      
           Move the change to vnode->cb_v_break to __afs_break_callback().
      
           Delegate the change to vnode->cb_s_break to afs_select_fileserver()
           and set vnode->cb_fs_s_break there also.
      
       (5) afs_validate() no longer needs to get the RCU read lock around its
           call to afs_check_validity() - and can skip the call entirely if we
           don't have a promise.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Tested-by: NMarkus Suvanto <markus.suvanto@gmail.com>
      cc: linux-afs@lists.infradead.org
      Link: https://lore.kernel.org/r/163111669583.283156.1397603105683094563.stgit@warthog.procyon.org.uk/
      4fe6a946
    • D
      afs: Fix mmap coherency vs 3rd-party changes · 6e0e99d5
      David Howells 提交于
      Fix the coherency management of mmap'd data such that 3rd-party changes
      become visible as soon as possible after the callback notification is
      delivered by the fileserver.  This is done by the following means:
      
       (1) When we break a callback on a vnode specified by the CB.CallBack call
           from the server, we queue a work item (vnode->cb_work) to go and
           clobber all the PTEs mapping to that inode.
      
           This causes the CPU to trip through the ->map_pages() and
           ->page_mkwrite() handlers if userspace attempts to access the page(s)
           again.
      
           (Ideally, this would be done in the service handler for CB.CallBack,
           but the server is waiting for our reply before considering, and we
           have a list of vnodes, all of which need breaking - and the process of
           getting the mmap_lock and stripping the PTEs on all CPUs could be
           quite slow.)
      
       (2) Call afs_validate() from the ->map_pages() handler to check to see if
           the file has changed and to get a new callback promise from the
           server.
      
      Also handle the fileserver telling us that it's dropping all callbacks,
      possibly after it's been restarted by sending us a CB.InitCallBackState*
      call by the following means:
      
       (3) Maintain a per-cell list of afs files that are currently mmap'd
           (cell->fs_open_mmaps).
      
       (4) Add a work item to each server that is invoked if there are any open
           mmaps when CB.InitCallBackState happens.  This work item goes through
           the aforementioned list and invokes the vnode->cb_work work item for
           each one that is currently using this server.
      
           This causes the PTEs to be cleared, causing ->map_pages() or
           ->page_mkwrite() to be called again, thereby calling afs_validate()
           again.
      
      I've chosen to simply strip the PTEs at the point of notification reception
      rather than invalidate all the pages as well because (a) it's faster, (b)
      we may get a notification for other reasons than the data being altered (in
      which case we don't want to clobber the pagecache) and (c) we need to ask
      the server to find out - and I don't want to wait for the reply before
      holding up userspace.
      
      This was tested using the attached test program:
      
      	#include <stdbool.h>
      	#include <stdio.h>
      	#include <stdlib.h>
      	#include <unistd.h>
      	#include <fcntl.h>
      	#include <sys/mman.h>
      	int main(int argc, char *argv[])
      	{
      		size_t size = getpagesize();
      		unsigned char *p;
      		bool mod = (argc == 3);
      		int fd;
      		if (argc != 2 && argc != 3) {
      			fprintf(stderr, "Format: %s <file> [mod]\n", argv[0]);
      			exit(2);
      		}
      		fd = open(argv[1], mod ? O_RDWR : O_RDONLY);
      		if (fd < 0) {
      			perror(argv[1]);
      			exit(1);
      		}
      
      		p = mmap(NULL, size, mod ? PROT_READ|PROT_WRITE : PROT_READ,
      			 MAP_SHARED, fd, 0);
      		if (p == MAP_FAILED) {
      			perror("mmap");
      			exit(1);
      		}
      		for (;;) {
      			if (mod) {
      				p[0]++;
      				msync(p, size, MS_ASYNC);
      				fsync(fd);
      			}
      			printf("%02x", p[0]);
      			fflush(stdout);
      			sleep(1);
      		}
      	}
      
      It runs in two modes: in one mode, it mmaps a file, then sits in a loop
      reading the first byte, printing it and sleeping for a second; in the
      second mode it mmaps a file, then sits in a loop incrementing the first
      byte and flushing, then printing and sleeping.
      
      Two instances of this program can be run on different machines, one doing
      the reading and one doing the writing.  The reader should see the changes
      made by the writer, but without this patch, they aren't because validity
      checking is being done lazily - only on entry to the filesystem.
      
      Testing the InitCallBackState change is more complicated.  The server has
      to be taken offline, the saved callback state file removed and then the
      server restarted whilst the reading-mode program continues to run.  The
      client machine then has to poke the server to trigger the InitCallBackState
      call.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Tested-by: NMarkus Suvanto <markus.suvanto@gmail.com>
      cc: linux-afs@lists.infradead.org
      Link: https://lore.kernel.org/r/163111668833.283156.382633263709075739.stgit@warthog.procyon.org.uk/
      6e0e99d5
    • D
      afs: Fix incorrect triggering of sillyrename on 3rd-party invalidation · 63d49d84
      David Howells 提交于
      The AFS filesystem is currently triggering the silly-rename cleanup from
      afs_d_revalidate() when it sees that a dentry has been changed by a third
      party[1].  It should not be doing this as the cleanup includes deleting the
      silly-rename target file on iput.
      
      Fix this by removing the places in the d_revalidate handling that validate
      anything other than the directory and the dirent.  It probably should not
      be looking to validate the target inode of the dentry also.
      
      This includes removing the point in afs_d_revalidate() where the inode that
      a dentry used to point to was marked as being deleted (AFS_VNODE_DELETED).
      We don't know it got deleted.  It could have been renamed or it could have
      hard links remaining.
      
      This was reproduced by cloning a git repo onto an afs volume on one
      machine, switching to another machine and doing "git status", then
      switching back to the first and doing "git status".  The second status
      would show weird output due to ".git/index" getting deleted by the above
      mentioned mechanism.
      
      A simpler way to do it is to do:
      
      	machine 1: touch a
      	machine 2: touch b; mv -f b a
      	machine 1: stat a
      
      on an afs volume.  The bug shows up as the stat failing with ENOENT and the
      file server log showing that machine 1 deleted "a".
      
      Fixes: 79ddbfa5 ("afs: Implement sillyrename for unlink and rename")
      Reported-by: NMarkus Suvanto <markus.suvanto@gmail.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Tested-by: NMarkus Suvanto <markus.suvanto@gmail.com>
      cc: linux-afs@lists.infradead.org
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=214217#c4 [1]
      Link: https://lore.kernel.org/r/163111668100.283156.3851669884664475428.stgit@warthog.procyon.org.uk/
      63d49d84
    • D
      afs: Add missing vnode validation checks · 3978d816
      David Howells 提交于
      afs_d_revalidate() should only be validating the directory entry it is
      given and the directory to which that belongs; it shouldn't be validating
      the inode/vnode to which that dentry points.  Besides, validation need to
      be done even if we don't call afs_d_revalidate() - which might be the case
      if we're starting from a file descriptor.
      
      In order for afs_d_revalidate() to be fixed, validation points must be
      added in some other places.  Certain directory operations, such as
      afs_unlink(), already check this, but not all and not all file operations
      either.
      
      Note that the validation of a vnode not only checks to see if the
      attributes we have are correct, but also gets a promise from the server to
      notify us if that file gets changed by a third party.
      
      Add the following checks:
      
       - Check the vnode we're going to make a hard link to.
       - Check the vnode we're going to move/rename.
       - Check the vnode we're going to read from.
       - Check the vnode we're going to write to.
       - Check the vnode we're going to sync.
       - Check the vnode we're going to make a mapped page writable for.
      
      Some of these aren't strictly necessary as we're going to perform a server
      operation that might get the attributes anyway from which we can determine
      if something changed - though it might not get us a callback promise.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Tested-by: NMarkus Suvanto <markus.suvanto@gmail.com>
      cc: linux-afs@lists.infradead.org
      Link: https://lore.kernel.org/r/163111667354.283156.12720698333342917516.stgit@warthog.procyon.org.uk/
      3978d816
  2. 11 9月, 2021 2 次提交
  3. 31 8月, 2021 32 次提交
    • L
      Merge tag 'for-5.15/io_uring-vfs-2021-08-30' of git://git.kernel.dk/linux-block · b91db6a0
      Linus Torvalds 提交于
      Pull io_uring mkdirat/symlinkat/linkat support from Jens Axboe:
       "This adds io_uring support for mkdirat, symlinkat, and linkat"
      
      * tag 'for-5.15/io_uring-vfs-2021-08-30' of git://git.kernel.dk/linux-block:
        io_uring: add support for IORING_OP_LINKAT
        io_uring: add support for IORING_OP_SYMLINKAT
        io_uring: add support for IORING_OP_MKDIRAT
        namei: update do_*() helpers to return ints
        namei: make do_linkat() take struct filename
        namei: add getname_uflags()
        namei: make do_symlinkat() take struct filename
        namei: make do_mknodat() take struct filename
        namei: make do_mkdirat() take struct filename
        namei: change filename_parentat() calling conventions
        namei: ignore ERR/NULL names in putname()
      b91db6a0
    • L
      Merge tag 'io_uring-bio-cache.5-2021-08-30' of git://git.kernel.dk/linux-block · 3b629f8d
      Linus Torvalds 提交于
      Pull support for struct bio recycling from Jens Axboe:
       "This adds bio recycling support for polled IO, allowing quick reuse of
        a bio for high IOPS scenarios via a percpu bio_set list.
      
        It's good for almost a 10% improvement in performance, bumping our
        per-core IO limit from ~3.2M IOPS to ~3.5M IOPS"
      
      * tag 'io_uring-bio-cache.5-2021-08-30' of git://git.kernel.dk/linux-block:
        bio: improve kerneldoc documentation for bio_alloc_kiocb()
        block: provide bio_clear_hipri() helper
        block: use the percpu bio cache in __blkdev_direct_IO
        io_uring: enable use of bio alloc cache
        block: clear BIO_PERCPU_CACHE flag if polling isn't supported
        bio: add allocation cache abstraction
        fs: add kiocb alloc cache flag
        bio: optimize initialization of a bio
      3b629f8d
    • L
      Merge tag 'for-5.15/io_uring-2021-08-30' of git://git.kernel.dk/linux-block · c547d89a
      Linus Torvalds 提交于
      Pull io_uring updates from Jens Axboe:
      
       - cancellation cleanups (Hao, Pavel)
      
       - io-wq accounting cleanup (Hao)
      
       - io_uring submit locking fix (Hao)
      
       - io_uring link handling fixes (Hao)
      
       - fixed file improvements (wangyangbo, Pavel)
      
       - allow updates of linked timeouts like regular timeouts (Pavel)
      
       - IOPOLL fix (Pavel)
      
       - remove batched file get optimization (Pavel)
      
       - improve reference handling (Pavel)
      
       - IRQ task_work batching (Pavel)
      
       - allow pure fixed file, and add support for open/accept (Pavel)
      
       - GFP_ATOMIC RT kernel fix
      
       - multiple CQ ring waiter improvement
      
       - funnel IRQ completions through task_work
      
       - add support for limiting async workers explicitly
      
       - add different clocksource support for timeouts
      
       - io-wq wakeup race fix
      
       - lots of cleanups and improvement (Pavel et al)
      
      * tag 'for-5.15/io_uring-2021-08-30' of git://git.kernel.dk/linux-block: (87 commits)
        io-wq: fix wakeup race when adding new work
        io-wq: wqe and worker locks no longer need to be IRQ safe
        io-wq: check max_worker limits if a worker transitions bound state
        io_uring: allow updating linked timeouts
        io_uring: keep ltimeouts in a list
        io_uring: support CLOCK_BOOTTIME/REALTIME for timeouts
        io-wq: provide a way to limit max number of workers
        io_uring: add build check for buf_index overflows
        io_uring: clarify io_req_task_cancel() locking
        io_uring: add task-refs-get helper
        io_uring: fix failed linkchain code logic
        io_uring: remove redundant req_set_fail()
        io_uring: don't free request to slab
        io_uring: accept directly into fixed file table
        io_uring: hand code io_accept() fd installing
        io_uring: openat directly into fixed fd table
        net: add accept helper not installing fd
        io_uring: fix io_try_cancel_userdata race for iowq
        io_uring: IRQ rw completion batching
        io_uring: batch task work locking
        ...
      c547d89a
    • L
      Merge tag 'for-5.15/libata-2021-08-30' of git://git.kernel.dk/linux-block · 44d7d3b0
      Linus Torvalds 提交于
      Pull libata updates from Jens Axboe:
       "libata changes for the 5.15 release:
      
         - NCQ priority improvements (Damien, Niklas)
      
         - coccinelle warning fix (Jing)
      
         - dwc_460ex phy fix (Andy)"
      
      * tag 'for-5.15/libata-2021-08-30' of git://git.kernel.dk/linux-block:
        include:libata: fix boolreturn.cocci warnings
        docs: sysfs-block-device: document ncq_prio_supported
        docs: sysfs-block-device: improve ncq_prio_enable documentation
        libata: Introduce ncq_prio_supported sysfs sttribute
        libata: print feature list on device scan
        libata: fix ata_read_log_page() warning
        libata: cleanup NCQ priority handling
        libata: cleanup ata_dev_configure()
        libata: cleanup device sleep capability detection
        libata: simplify ata_scsi_rbuf_fill()
        libata: fix ata_host_start()
        ata: sata_dwc_460ex: No need to call phy_exit() befre phy_init()
      44d7d3b0
    • L
      Merge tag 'for-5.15/drivers-2021-08-30' of git://git.kernel.dk/linux-block · 9a1d6c9e
      Linus Torvalds 提交于
      Pull block driver updates from Jens Axboe:
       "Sitting on top of the core block changes, here are the driver changes
        for the 5.15 merge window:
      
         - NVMe updates via Christoph:
             - suspend improvements for devices with an HMB (Keith Busch)
             - handle double completions more gacefull (Sagi Grimberg)
             - cleanup the selects for the nvme core code a bit (Sagi Grimberg)
             - don't update queue count when failing to set io queues (Ruozhu Li)
             - various nvmet connect fixes (Amit Engel)
             - cleanup lightnvm leftovers (Keith Busch, me)
             - small cleanups (Colin Ian King, Hou Pu)
             - add tracing for the Set Features command (Hou Pu)
             - CMB sysfs cleanups (Keith Busch)
             - add a mutex_destroy call (Keith Busch)
      
         - remove lightnvm subsystem. It's served its purpose and ultimately
           led to zoned nvme support, we no longer need it (Christoph)
      
         - revert floppy O_NDELAY fix (Denis)
      
         - nbd fixes (Hou, Pavel, Baokun)
      
         - nbd locking fixes (Tetsuo)
      
         - nbd device removal fixes (Christoph)
      
         - raid10 rcu warning fix (Xiao)
      
         - raid1 write behind fix (Guoqing)
      
         - rnbd fixes (Gioh, Md Haris)
      
         - misc fixes (Colin)"
      
      * tag 'for-5.15/drivers-2021-08-30' of git://git.kernel.dk/linux-block: (42 commits)
        Revert "floppy: reintroduce O_NDELAY fix"
        raid1: ensure write behind bio has less than BIO_MAX_VECS sectors
        md/raid10: Remove unnecessary rcu_dereference in raid10_handle_discard
        nbd: remove nbd->destroy_complete
        nbd: only return usable devices from nbd_find_unused
        nbd: set nbd->index before releasing nbd_index_mutex
        nbd: prevent IDR lookups from finding partially initialized devices
        nbd: reset NBD to NULL when restarting in nbd_genl_connect
        nbd: add missing locking to the nbd_dev_add error path
        nvme: remove the unused NVME_NS_* enum
        nvme: remove nvm_ndev from ns
        nvme: Have NVME_FABRICS select NVME_CORE instead of transport drivers
        block: nbd: add sanity check for first_minor
        nvmet: check that host sqsize does not exceed ctrl MQES
        nvmet: avoid duplicate qid in connect cmd
        nvmet: pass back cntlid on successful completion
        nvme-rdma: don't update queue count when failing to set io queues
        nvme-tcp: don't update queue count when failing to set io queues
        nvme-tcp: pair send_mutex init with destroy
        nvme: allow user toggling hmb usage
        ...
      9a1d6c9e
    • L
      Merge tag 'for-5.15/block-2021-08-30' of git://git.kernel.dk/linux-block · 67936911
      Linus Torvalds 提交于
      Pull block updates from Jens Axboe:
       "Nothing major in here - lots of good cleanups and tech debt handling,
        which is also evident in the diffstats. In particular:
      
         - Add disk sequence numbers (Matteo)
      
         - Discard merge fix (Ming)
      
         - Relax disk zoned reporting restrictions (Niklas)
      
         - Bio error handling zoned leak fix (Pavel)
      
         - Start of proper add_disk() error handling (Luis, Christoph)
      
         - blk crypto fix (Eric)
      
         - Non-standard GPT location support (Dmitry)
      
         - IO priority improvements and cleanups (Damien)o
      
         - blk-throtl improvements (Chunguang)
      
         - diskstats_show() stack reduction (Abd-Alrhman)
      
         - Loop scheduler selection (Bart)
      
         - Switch block layer to use kmap_local_page() (Christoph)
      
         - Remove obsolete disk_name helper (Christoph)
      
         - block_device refcounting improvements (Christoph)
      
         - Ensure gendisk always has a request queue reference (Christoph)
      
         - Misc fixes/cleanups (Shaokun, Oliver, Guoqing)"
      
      * tag 'for-5.15/block-2021-08-30' of git://git.kernel.dk/linux-block: (129 commits)
        sg: pass the device name to blk_trace_setup
        block, bfq: cleanup the repeated declaration
        blk-crypto: fix check for too-large dun_bytes
        blk-zoned: allow BLKREPORTZONE without CAP_SYS_ADMIN
        blk-zoned: allow zone management send operations without CAP_SYS_ADMIN
        block: mark blkdev_fsync static
        block: refine the disk_live check in del_gendisk
        mmc: sdhci-tegra: Enable MMC_CAP2_ALT_GPT_TEGRA
        mmc: block: Support alternative_gpt_sector() operation
        partitions/efi: Support non-standard GPT location
        block: Add alternative_gpt_sector() operation
        bio: fix page leak bio_add_hw_page failure
        block: remove CONFIG_DEBUG_BLOCK_EXT_DEVT
        block: remove a pointless call to MINOR() in device_add_disk
        null_blk: add error handling support for add_disk()
        virtio_blk: add error handling support for add_disk()
        block: add error handling for device_add_disk / add_disk
        block: return errors from disk_alloc_events
        block: return errors from blk_integrity_add
        block: call blk_register_queue earlier in device_add_disk
        ...
      67936911
    • L
      Merge tag 'timers-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8596e589
      Linus Torvalds 提交于
      Pull timer updates from Thomas Gleixner:
       "Updates for timekeeping, timers and related drivers:
      
        Core code:
      
         - Cure a couple of correctness issues in the posix CPU timer code to
           prevent that the tick dependency for NOHZ full is kept alive for no
           reason.
      
         - Avoid expensive double reprogramming of the clockevent device in
           hrtimer_start_range_ns().
      
         - Avoid pointless SMP function calls when the clock was set to avoid
           disturbing CPUs which do not have any affected timers queued.
      
         - Make the clocksource watchdog test work correctly when CONFIG_HZ is
           less than 100.
      
        Drivers:
      
         - Prefer the ARM architected timer over the Exynos timer which is way
           more expensive to access.
      
         - Add device tree bindings for new Ingenic SoCs
      
         - The usual improvements and cleanups all over the place"
      
      * tag 'timers-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (29 commits)
        clocksource: Make clocksource watchdog test safe for slow-HZ systems
        dt-bindings: timer: Add ABIs for new Ingenic SoCs
        clocksource/drivers/fttmr010: Pass around less pointers
        clocksource/drivers/mediatek: Optimize systimer irq clear flow on shutdown
        clocksource/drivers/ingenic: Use bitfield macro helpers
        clocksource/drivers/sh_cmt: Fix wrong setting if don't request IRQ for clock source channel
        dt-bindings: timer: convert rockchip,rk-timer.txt to YAML
        clocksource/drivers/exynos_mct: Mark MCT device as CLOCK_EVT_FEAT_PERCPU
        clocksource/drivers/exynos_mct: Prioritise Arm arch timer on arm64
        hrtimer: Unbreak hrtimer_force_reprogram()
        hrtimer: Use raw_cpu_ptr() in clock_was_set()
        hrtimer: Avoid more SMP function calls in clock_was_set()
        hrtimer: Avoid unnecessary SMP function calls in clock_was_set()
        hrtimer: Add bases argument to clock_was_set()
        time/timekeeping: Avoid invoking clock_was_set() twice
        timekeeping: Distangle resume and clock-was-set events
        timerfd: Provide timerfd_resume()
        hrtimer: Force clock_was_set() handling for the HIGHRES=n, NOHZ=y case
        hrtimer: Ensure timerfd notification for HIGHRES=n
        hrtimer: Consolidate reprogramming code
        ...
      8596e589
    • L
      Merge tag 'x86-misc-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · bed91667
      Linus Torvalds 提交于
      Pull misc x86 updates from Thomas Gleixner:
       "A set of updates for the x86 reboot code:
      
         - Limit the Dell Optiplex 990 quirk to early BIOS versions to avoid
           the full 'power cycle' alike reboot which is required for the buggy
           BIOSes.
      
         - Update documentation for the reboot=pci command line option and
           document how DMI platform quirks can be overridden"
      
      * tag 'x86-misc-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/reboot: Limit Dell Optiplex 990 quirk to early BIOS versions
        x86/reboot: Document how to override DMI platform quirks
        x86/reboot: Document the "reboot=pci" option
      bed91667
    • L
      Merge tag 'x86-irq-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ccd8ec4a
      Linus Torvalds 提交于
      Pull x86 PIRQ updates from Thomas Gleixner:
       "A set of updates to support port 0x22/0x23 based PCI configuration
        space which can be found on various ALi chipsets and is also available
        on older Intel systems which expose a PIRQ router.
      
        While the Intel support is more or less nostalgia, the ALi chips are
        still in use on popular embedded boards used for routers"
      
      * tag 'x86-irq-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86: Fix typo s/ECLR/ELCR/ for the PIC register
        x86: Avoid magic number with ELCR register accesses
        x86/PCI: Add support for the Intel 82426EX PIRQ router
        x86/PCI: Add support for the Intel 82374EB/82374SB (ESC) PIRQ router
        x86/PCI: Add support for the ALi M1487 (IBC) PIRQ router
        x86: Add support for 0x22/0x23 port I/O configuration space
      ccd8ec4a
    • L
      Merge tag 'x86-cpu-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0a096f24
      Linus Torvalds 提交于
      Pull x86 cache flush updates from Thomas Gleixner:
       "A reworked version of the opt-in L1D flush mechanism.
      
        This is a stop gap for potential future speculation related hardware
        vulnerabilities and a mechanism for truly security paranoid
        applications.
      
        It allows a task to request that the L1D cache is flushed when the
        kernel switches to a different mm. This can be requested via prctl().
      
        Changes vs the previous versions:
      
         - Get rid of the software flush fallback
      
         - Make the handling consistent with other mitigations
      
         - Kill the task when it ends up on a SMT enabled core which defeats
           the purpose of L1D flushing obviously"
      
      * tag 'x86-cpu-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        Documentation: Add L1D flushing Documentation
        x86, prctl: Hook L1D flushing in via prctl
        x86/mm: Prepare for opt-in based L1D flush in switch_mm()
        x86/process: Make room for TIF_SPEC_L1D_FLUSH
        sched: Add task_work callback for paranoid L1D flush
        x86/mm: Refactor cond_ibpb() to support other use cases
        x86/smp: Add a per-cpu view of SMT state
      0a096f24
    • L
      Merge tag 'irq-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7d6e3fa8
      Linus Torvalds 提交于
      Pull irq updates from Thomas Gleixner:
       "Updates to the interrupt core and driver subsystems:
      
        Core changes:
      
         - The usual set of small fixes and improvements all over the place,
           but nothing stands out
      
        MSI changes:
      
         - Further consolidation of the PCI/MSI interrupt chip code
      
         - Make MSI sysfs code independent of PCI/MSI and expose the MSI
           interrupts of platform devices in the same way as PCI exposes them.
      
        Driver changes:
      
         - Support for ARM GICv3 EPPI partitions
      
         - Treewide conversion to generic_handle_domain_irq() for all chained
           interrupt controllers
      
         - Conversion to bitmap_zalloc() throughout the irq chip drivers
      
         - The usual set of small fixes and improvements"
      
      * tag 'irq-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (57 commits)
        platform-msi: Add ABI to show msi_irqs of platform devices
        genirq/msi: Move MSI sysfs handling from PCI to MSI core
        genirq/cpuhotplug: Demote debug printk to KERN_DEBUG
        irqchip/qcom-pdc: Trim unused levels of the interrupt hierarchy
        irqdomain: Export irq_domain_disconnect_hierarchy()
        irqchip/gic-v3: Fix priority comparison when non-secure priorities are used
        irqchip/apple-aic: Fix irq_disable from within irq handlers
        pinctrl/rockchip: drop the gpio related codes
        gpio/rockchip: drop irq_gc_lock/irq_gc_unlock for irq set type
        gpio/rockchip: support next version gpio controller
        gpio/rockchip: use struct rockchip_gpio_regs for gpio controller
        gpio/rockchip: add driver for rockchip gpio
        dt-bindings: gpio: change items restriction of clock for rockchip,gpio-bank
        pinctrl/rockchip: add pinctrl device to gpio bank struct
        pinctrl/rockchip: separate struct rockchip_pin_bank to a head file
        pinctrl/rockchip: always enable clock for gpio controller
        genirq: Fix kernel doc indentation
        EDAC/altera: Convert to generic_handle_domain_irq()
        powerpc: Bulk conversion to generic_handle_domain_irq()
        nios2: Bulk conversion to generic_handle_domain_irq()
        ...
      7d6e3fa8
    • L
      Merge tag 'locking-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e5e726f7
      Linus Torvalds 提交于
      Pull locking and atomics updates from Thomas Gleixner:
       "The regular pile:
      
         - A few improvements to the mutex code
      
         - Documentation updates for atomics to clarify the difference between
           cmpxchg() and try_cmpxchg() and to explain the forward progress
           expectations.
      
         - Simplification of the atomics fallback generator
      
         - The addition of arch_atomic_long*() variants and generic arch_*()
           bitops based on them.
      
         - Add the missing might_sleep() invocations to the down*() operations
           of semaphores.
      
        The PREEMPT_RT locking core:
      
         - Scheduler updates to support the state preserving mechanism for
           'sleeping' spin- and rwlocks on RT.
      
           This mechanism is carefully preserving the state of the task when
           blocking on a 'sleeping' spin- or rwlock and takes regular wake-ups
           targeted at the same task into account. The preserved or updated
           (via a regular wakeup) state is restored when the lock has been
           acquired.
      
         - Restructuring of the rtmutex code so it can be utilized and
           extended for the RT specific lock variants.
      
         - Restructuring of the ww_mutex code to allow sharing of the ww_mutex
           specific functionality for rtmutex based ww_mutexes.
      
         - Header file disentangling to allow substitution of the regular lock
           implementations with the PREEMPT_RT variants without creating an
           unmaintainable #ifdef mess.
      
         - Shared base code for the PREEMPT_RT specific rw_semaphore and
           rwlock implementations.
      
           Contrary to the regular rw_semaphores and rwlocks the PREEMPT_RT
           implementation is writer unfair because it is infeasible to do
           priority inheritance on multiple readers. Experience over the years
           has shown that real-time workloads are not the typical workloads
           which are sensitive to writer starvation.
      
           The alternative solution would be to allow only a single reader
           which has been tried and discarded as it is a major bottleneck
           especially for mmap_sem. Aside of that many of the writer
           starvation critical usage sites have been converted to a writer
           side mutex/spinlock and RCU read side protections in the past
           decade so that the issue is less prominent than it used to be.
      
         - The actual rtmutex based lock substitutions for PREEMPT_RT enabled
           kernels which affect mutex, ww_mutex, rw_semaphore, spinlock_t and
           rwlock_t. The spin/rw_lock*() functions disable migration across
           the critical section to preserve the existing semantics vs per-CPU
           variables.
      
         - Rework of the futex REQUEUE_PI mechanism to handle the case of
           early wake-ups which interleave with a re-queue operation to
           prevent the situation that a task would be blocked on both the
           rtmutex associated to the outer futex and the rtmutex based hash
           bucket spinlock.
      
           While this situation cannot happen on !RT enabled kernels the
           changes make the underlying concurrency problems easier to
           understand in general. As a result the difference between !RT and
           RT kernels is reduced to the handling of waiting for the critical
           section. !RT kernels simply spin-wait as before and RT kernels
           utilize rcu_wait().
      
         - The substitution of local_lock for PREEMPT_RT with a spinlock which
           protects the critical section while staying preemptible. The CPU
           locality is established by disabling migration.
      
        The underlying concepts of this code have been in use in PREEMPT_RT for
        way more than a decade. The code has been refactored several times over
        the years and this final incarnation has been optimized once again to be
        as non-intrusive as possible, i.e. the RT specific parts are mostly
        isolated.
      
        It has been extensively tested in the 5.14-rt patch series and it has
        been verified that !RT kernels are not affected by these changes"
      
      * tag 'locking-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (92 commits)
        locking/rtmutex: Return success on deadlock for ww_mutex waiters
        locking/rtmutex: Prevent spurious EDEADLK return caused by ww_mutexes
        locking/rtmutex: Dequeue waiter on ww_mutex deadlock
        locking/rtmutex: Dont dereference waiter lockless
        locking/semaphore: Add might_sleep() to down_*() family
        locking/ww_mutex: Initialize waiter.ww_ctx properly
        static_call: Update API documentation
        locking/local_lock: Add PREEMPT_RT support
        locking/spinlock/rt: Prepare for RT local_lock
        locking/rtmutex: Add adaptive spinwait mechanism
        locking/rtmutex: Implement equal priority lock stealing
        preempt: Adjust PREEMPT_LOCK_OFFSET for RT
        locking/rtmutex: Prevent lockdep false positive with PI futexes
        futex: Prevent requeue_pi() lock nesting issue on RT
        futex: Simplify handle_early_requeue_pi_wakeup()
        futex: Reorder sanity checks in futex_requeue()
        futex: Clarify comment in futex_requeue()
        futex: Restructure futex_requeue()
        futex: Correct the number of requeued waiters for PI
        futex: Remove bogus condition for requeue PI
        ...
      e5e726f7
    • L
      Merge tag 'smp-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 08403e21
      Linus Torvalds 提交于
      Pull SMP core updates from Thomas Gleixner:
      
       - Replace get/put_online_cpus() in various places. The final removal
         will happen shortly before v5.15-rc1 when the rest of the patches
         have been merged.
      
       - Add debug code to help the analysis of CPU hotplug failures
      
       - A set of kernel doc updates
      
      * tag 'smp-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        mm: Replace deprecated CPU-hotplug functions.
        md/raid5: Replace deprecated CPU-hotplug functions.
        Documentation: Replace deprecated CPU-hotplug functions.
        smp: Fix all kernel-doc warnings
        cpu/hotplug: Add debug printks for hotplug callback failures
        cpu/hotplug: Use DEVICE_ATTR_*() macro
        cpu/hotplug: Eliminate all kernel-doc warnings
        cpu/hotplug: Fix kernel doc warnings for __cpuhp_setup_state_cpuslocked()
        cpu/hotplug: Fix comment typo
        smpboot: Replace deprecated CPU-hotplug functions.
      08403e21
    • L
      Merge tag 'core-debugobjects-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e4c3562e
      Linus Torvalds 提交于
      Pull debugobjects update from Thomas Gleixner:
       "A single commit for debugobjects to make them work on PREEMPT_RT by
        preventing object pool refill in atomic contexts"
      
      * tag 'core-debugobjects-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        debugobjects: Make them PREEMPT_RT aware
      e4c3562e
    • L
      Merge tag 'efi-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 46f4945e
      Linus Torvalds 提交于
      Pull EFI updates from Ingo Molnar:
       "A handful of EFI changes for this cycle:
      
         - EFI CPER parsing improvements
      
         - Don't take the address of efi_guid_t internal fields"
      
      * tag 'efi-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        efi: cper: check section header more appropriately
        efi: Don't use knowledge about efi_guid_t internals
        efi: cper: fix scnprintf() use in cper_mem_err_location()
      46f4945e
    • L
      Merge tag 'perf-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4a2b88eb
      Linus Torvalds 提交于
      Pull x86 perf event updates from Ingo Molnar:
      
       - Add support for Intel Sapphire Rapids server CPU uncore events
      
       - Allow the AMD uncore driver to be built as a module
      
       - Misc cleanups and fixes
      
      * tag 'perf-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
        perf/x86/amd/ibs: Add bitfield definitions in new <asm/amd-ibs.h> header
        perf/amd/uncore: Allow the driver to be built as a module
        x86/cpu: Add get_llc_id() helper function
        perf/amd/uncore: Clean up header use, use <linux/ include paths instead of <asm/
        perf/amd/uncore: Simplify code, use free_percpu()'s built-in check for NULL
        perf/hw_breakpoint: Replace deprecated CPU-hotplug functions
        perf/x86/intel: Replace deprecated CPU-hotplug functions
        perf/x86: Remove unused assignment to pointer 'e'
        perf/x86/intel/uncore: Fix IIO cleanup mapping procedure for SNR/ICX
        perf/x86/intel/uncore: Support IMC free-running counters on Sapphire Rapids server
        perf/x86/intel/uncore: Support IIO free-running counters on Sapphire Rapids server
        perf/x86/intel/uncore: Factor out snr_uncore_mmio_map()
        perf/x86/intel/uncore: Add alias PMU name
        perf/x86/intel/uncore: Add Sapphire Rapids server MDF support
        perf/x86/intel/uncore: Add Sapphire Rapids server M3UPI support
        perf/x86/intel/uncore: Add Sapphire Rapids server UPI support
        perf/x86/intel/uncore: Add Sapphire Rapids server M2M support
        perf/x86/intel/uncore: Add Sapphire Rapids server IMC support
        perf/x86/intel/uncore: Add Sapphire Rapids server PCU support
        perf/x86/intel/uncore: Add Sapphire Rapids server M2PCIe support
        ...
      4a2b88eb
    • L
      Merge tag 'sched-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 5d3c0db4
      Linus Torvalds 提交于
      Pull scheduler updates from Ingo Molnar:
      
       - The biggest change in this cycle is scheduler support for asymmetric
         scheduling affinity, to support the execution of legacy 32-bit tasks
         on AArch32 systems that also have 64-bit-only CPUs.
      
         Architectures can fill in this functionality by defining their own
         task_cpu_possible_mask(p). When this is done, the scheduler will make
         sure the task will only be scheduled on CPUs that support it.
      
         (The actual arm64 specific changes are not part of this tree.)
      
         For other architectures there will be no change in functionality.
      
       - Add cgroup SCHED_IDLE support
      
       - Increase node-distance flexibility & delay determining it until a CPU
         is brought online. (This enables platforms where node distance isn't
         final until the CPU is only.)
      
       - Deadline scheduler enhancements & fixes
      
       - Misc fixes & cleanups.
      
      * tag 'sched-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits)
        eventfd: Make signal recursion protection a task bit
        sched/fair: Mark tg_is_idle() an inline in the !CONFIG_FAIR_GROUP_SCHED case
        sched: Introduce dl_task_check_affinity() to check proposed affinity
        sched: Allow task CPU affinity to be restricted on asymmetric systems
        sched: Split the guts of sched_setaffinity() into a helper function
        sched: Introduce task_struct::user_cpus_ptr to track requested affinity
        sched: Reject CPU affinity changes based on task_cpu_possible_mask()
        cpuset: Cleanup cpuset_cpus_allowed_fallback() use in select_fallback_rq()
        cpuset: Honour task_cpu_possible_mask() in guarantee_online_cpus()
        cpuset: Don't use the cpu_possible_mask as a last resort for cgroup v1
        sched: Introduce task_cpu_possible_mask() to limit fallback rq selection
        sched: Cgroup SCHED_IDLE support
        sched/topology: Skip updating masks for non-online nodes
        sched: Replace deprecated CPU-hotplug functions.
        sched: Skip priority checks with SCHED_FLAG_KEEP_PARAMS
        sched: Fix UCLAMP_FLAG_IDLE setting
        sched/deadline: Fix missing clock update in migrate_task_rq_dl()
        sched/fair: Avoid a second scan of target in select_idle_cpu
        sched/fair: Use prev instead of new target as recent_used_cpu
        sched: Don't report SCHED_FLAG_SUGOV in sched_getattr()
        ...
      5d3c0db4
    • L
      Merge tag 'x86_cleanups_for_v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 230bda08
      Linus Torvalds 提交于
      Pull x86 cleanups from Borislav Petkov:
       "The usual round of minor cleanups and fixes"
      
      * tag 'x86_cleanups_for_v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/kaslr: Have process_mem_region() return a boolean
        x86/power: Fix kernel-doc warnings in cpu.c
        x86/mce/inject: Replace deprecated CPU-hotplug functions.
        x86/microcode: Replace deprecated CPU-hotplug functions.
        x86/mtrr: Replace deprecated CPU-hotplug functions.
        x86/mmiotrace: Replace deprecated CPU-hotplug functions.
      230bda08
    • L
      Merge tag 'x86_cache_for_v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 42f6e869
      Linus Torvalds 提交于
      Pull x86 resource control updates from Borislav Petkov:
       "A first round of changes towards splitting the arch-specific bits from
        the filesystem bits of resctrl, the ultimate goal being to support
        ARM's equivalent technology MPAM, with the same fs interface (James
        Morse)"
      
      * tag 'x86_cache_for_v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits)
        x86/resctrl: Make resctrl_arch_get_config() return its value
        x86/resctrl: Merge the CDP resources
        x86/resctrl: Expand resctrl_arch_update_domains()'s msr_param range
        x86/resctrl: Remove rdt_cdp_peer_get()
        x86/resctrl: Merge the ctrl_val arrays
        x86/resctrl: Calculate the index from the configuration type
        x86/resctrl: Apply offset correction when config is staged
        x86/resctrl: Make ctrlval arrays the same size
        x86/resctrl: Pass configuration type to resctrl_arch_get_config()
        x86/resctrl: Add a helper to read a closid's configuration
        x86/resctrl: Rename update_domains() to resctrl_arch_update_domains()
        x86/resctrl: Allow different CODE/DATA configurations to be staged
        x86/resctrl: Group staged configuration into a separate struct
        x86/resctrl: Move the schemata names into struct resctrl_schema
        x86/resctrl: Add a helper to read/set the CDP configuration
        x86/resctrl: Swizzle rdt_resource and resctrl_schema in pseudo_lock_region
        x86/resctrl: Pass the schema to resctrl filesystem functions
        x86/resctrl: Add resctrl_arch_get_num_closid()
        x86/resctrl: Store the effective num_closid in the schema
        x86/resctrl: Walk the resctrl schema list instead of an arch list
        ...
      42f6e869
    • L
      Merge tag 'x86_build_for_v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ced119b6
      Linus Torvalds 提交于
      Pull x86 build updates from Borislav Petkov:
      
       - Remove cc-option checks which are old and already supported by the
         minimal compiler version the kernel uses and thus avoid the need to
         invoke the compiler unnecessarily.
      
       - Cleanups
      
      * tag 'x86_build_for_v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/build: Move the install rule to arch/x86/Makefile
        x86/build: Remove the left-over bzlilo target
        x86/tools/relocs: Mark die() with the printf function attr format
        x86/build: Remove stale cc-option checks
      ced119b6
    • L
      Merge tag 'ras_core_for_v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8f645b42
      Linus Torvalds 提交于
      Pull RAS update from Borislav Petkov:
       "A single RAS change for 5.15:
      
         - Do not start processing MCEs logged early because the decoding
           chain is not up yet - delay that processing until everything is
           ready"
      
      * tag 'ras_core_for_v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mce: Defer processing of early errors
      8f645b42
    • L
      Merge tag 'edac_updates_for_v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras · 05b5fdb2
      Linus Torvalds 提交于
      Pull EDAC updates from Borislav Petkov:
       "The usual EDAC stuff which managed to trickle in for 5.15:
      
         - Add new HBM2 (High Bandwidth Memory Gen 2) type and add support for
           it to the Intel SKx drivers
      
         - Print additional useful per-channel error information on i10nm,
           like on SKL
      
         - Don't load the AMD EDAC decoder in virtual images
      
         - The usual round of fixes and cleanups"
      
      * tag 'edac_updates_for_v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
        EDAC/i10nm: Retrieve and print retry_rd_err_log registers
        EDAC/i10nm: Fix NVDIMM detection
        EDAC/skx_common: Set the memory type correctly for HBM memory
        EDAC/altera: Skip defining unused structures for specific configs
        EDAC/mce_amd: Do not load edac_mce_amd module on guests
        EDAC/mc: Add new HBM2 memory type
        EDAC/amd64: Use DEVICE_ATTR helper macros
      05b5fdb2
    • L
      Merge tag 's390-5.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · c7a5238e
      Linus Torvalds 提交于
      Pull s390 updates from Heiko Carstens:
      
       - Improve ftrace code patching so that stop_machine is not required
         anymore. This requires a small common code patch acked by Steven
         Rostedt:
      
           https://lore.kernel.org/linux-s390/20210730220741.4da6fdf6@oasis.local.home/
      
       - Enable KCSAN for s390. This comes with a small common code change to
         fix a compile warning. Acked by Marco Elver:
      
           https://lore.kernel.org/r/20210729142811.1309391-1-hca@linux.ibm.com
      
       - Add KFENCE support for s390. This also comes with a minimal x86 patch
         from Marco Elver who said also this can be carried via the s390 tree:
      
           https://lore.kernel.org/linux-s390/YQJdarx6XSUQ1tFZ@elver.google.com/
      
       - More changes to prepare the decompressor for relocation.
      
       - Enable DAT also for CPU restart path.
      
       - Final set of register asm removal patches; leaving only three
         locations where needed and sane.
      
       - Add NNPA, Vector-Packed-Decimal-Enhancement Facility 2, PCI MIO
         support to hwcaps flags.
      
       - Cleanup hwcaps implementation.
      
       - Add new instructions to in-kernel disassembler.
      
       - Various QDIO cleanups.
      
       - Add SCLP debug feature.
      
       - Various other cleanups and improvements all over the place.
      
      * tag 's390-5.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (105 commits)
        s390: remove SCHED_CORE from defconfigs
        s390/smp: do not use nodat_stack for secondary CPU start
        s390/smp: enable DAT before CPU restart callback is called
        s390: update defconfigs
        s390/ap: fix state machine hang after failure to enable irq
        KVM: s390: generate kvm hypercall functions
        s390/sclp: add tracing of SCLP interactions
        s390/debug: add early tracing support
        s390/debug: fix debug area life cycle
        s390/debug: keep debug data on resize
        s390/diag: make restart_part2 a local label
        s390/mm,pageattr: fix walk_pte_level() early exit
        s390: fix typo in linker script
        s390: remove do_signal() prototype and do_notify_resume() function
        s390/crypto: fix all kernel-doc warnings in vfio_ap_ops.c
        s390/pci: improve DMA translation init and exit
        s390/pci: simplify CLP List PCI handling
        s390/pci: handle FH state mismatch only on disable
        s390/pci: fix misleading rc in clp_set_pci_fn()
        s390/boot: factor out offset_vmlinux_info() function
        ...
      c7a5238e
    • L
      Merge tag 'm68k-for-v5.15-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k · adc5ea22
      Linus Torvalds 提交于
      Pull m68k updates from Geert Uytterhoeven:
      
       - miscellaneous fixes
      
       - defconfig updates
      
      * tag 'm68k-for-v5.15-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
        m68k: Fix asm register constraints for atomic ops
        m68k: Fix invalid RMW_INSNS on CPUs that lack CAS
        m68k: defconfig: Update defconfigs for v5.14-rc1
        m68k: emu: Fix invalid free in nfeth_cleanup()
      adc5ea22
    • L
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 44a7d444
      Linus Torvalds 提交于
      Pull crypto updates from Herbert Xu:
       "Algorithms:
      
         - Add AES-NI/AVX/x86_64 implementation of SM4.
      
        Drivers:
      
         - Add Arm SMCCC TRNG based driver"
      
      [ And obviously a lot of random fixes and updates  - Linus]
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (84 commits)
        crypto: sha512 - remove imaginary and mystifying clearing of variables
        crypto: aesni - xts_crypt() return if walk.nbytes is 0
        padata: Remove repeated verbose license text
        crypto: ccp - Add support for new CCP/PSP device ID
        crypto: x86/sm4 - add AES-NI/AVX2/x86_64 implementation
        crypto: x86/sm4 - export reusable AESNI/AVX functions
        crypto: rmd320 - remove rmd320 in Makefile
        crypto: skcipher - in_irq() cleanup
        crypto: hisilicon - check _PS0 and _PR0 method
        crypto: hisilicon - change parameter passing of debugfs function
        crypto: hisilicon - support runtime PM for accelerator device
        crypto: hisilicon - add runtime PM ops
        crypto: hisilicon - using 'debugfs_create_file' instead of 'debugfs_create_regset32'
        crypto: tcrypt - add GCM/CCM mode test for SM4 algorithm
        crypto: testmgr - Add GCM/CCM mode test of SM4 algorithm
        crypto: tcrypt - Fix missing return value check
        crypto: hisilicon/sec - modify the hardware endian configuration
        crypto: hisilicon/sec - fix the abnormal exiting process
        crypto: qat - store vf.compatible flag
        crypto: qat - do not export adf_iov_putmsg()
        ...
      44a7d444
    • L
      Merge branch 'core-rcu.2021.08.28a' of... · 4ca42564
      Linus Torvalds 提交于
      Merge branch 'core-rcu.2021.08.28a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu
      
      Pull RCU updates from Paul McKenney:
       "RCU changes for this cycle were:
      
         - Documentation updates
      
         - Miscellaneous fixes
      
         - Offloaded-callbacks updates
      
         - Updates to the nolibc library
      
         - Tasks-RCU updates
      
         - In-kernel torture-test updates
      
         - Torture-test scripting, perhaps most notably the pinning of
           torture-test guest OSes so as to force differences in memory
           latency. For example, in a two-socket system, a four-CPU guest OS
           will have one pair of its CPUs pinned to threads in a single core
           on one socket and the other pair pinned to threads in a single core
           on the other socket. This approach proved able to force race
           conditions that earlier testing missed. Some of these race
           conditions are still being tracked down"
      
      * 'core-rcu.2021.08.28a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: (61 commits)
        torture: Replace deprecated CPU-hotplug functions.
        rcu: Replace deprecated CPU-hotplug functions
        rcu: Print human-readable message for schedule() in RCU reader
        rcu: Explain why rcu_all_qs() is a stub in preemptible TREE RCU
        rcu: Use per_cpu_ptr to get the pointer of per_cpu variable
        rcu: Remove useless "ret" update in rcu_gp_fqs_loop()
        rcu: Mark accesses in tree_stall.h
        rcu: Make rcu_gp_init() and rcu_gp_fqs_loop noinline to conserve stack
        rcu: Mark lockless ->qsmask read in rcu_check_boost_fail()
        srcutiny: Mark read-side data races
        rcu: Start timing stall repetitions after warning complete
        rcu: Do not disable GP stall detection in rcu_cpu_stall_reset()
        rcu/tree: Handle VM stoppage in stall detection
        rculist: Unify documentation about missing list_empty_rcu()
        rcu: Mark accesses to ->rcu_read_lock_nesting
        rcu: Weaken ->dynticks accesses and updates
        rcu: Remove special bit at the bottom of the ->dynticks counter
        rcu: Fix stall-warning deadlock due to non-release of rcu_node ->lock
        rcu: Fix to include first blocked task in stall warning
        torture: Make kvm-test-1-run-qemu.sh check for reboot loops
        ...
      4ca42564
    • L
      Merge tag 'locks-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux · 6f01c935
      Linus Torvalds 提交于
      Pull file locking updates from Jeff Layton:
       "This starts with a couple of fixes for potential deadlocks in the
        fowner/fasync handling.
      
        The next patch removes the old mandatory locking code from the kernel
        altogether.
      
        The last patch cleans up rw_verify_area a bit more after the mandatory
        locking removal"
      
      * tag 'locks-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux:
        fs: clean up after mandatory file locking support removal
        fs: remove mandatory file locking support
        fcntl: fix potential deadlock for &fasync_struct.fa_lock
        fcntl: fix potential deadlocks for &fown_struct.lock
      6f01c935
    • L
      Merge tag 'tpmdd-next-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd · 451819aa
      Linus Torvalds 提交于
      Pull tpm driver updates from Jarkko Sakkinen:
       "The highlights are:
      
         - Support for signing LKM's with ECDSA keys
      
         - An integer overflow bug fix in pkey"
      
      * tag 'tpmdd-next-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd:
        crypto: public_key: fix overflow during implicit conversion
        tpm: ibmvtpm: Avoid error message when process gets signal while waiting
        certs: Add support for using elliptic curve keys for signing modules
        certs: Trigger creation of RSA module signing key if it's not an RSA key
        char: tpm: cr50_i2c: convert to new probe interface
        char: tpm: Kconfig: remove bad i2c cr50 select
      451819aa
    • L
      Merge tag 'for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply · 4520dcbe
      Linus Torvalds 提交于
      Pull power supply and reset updates from Sebastian Reichel:
       "Battery/charger related:
         - cros-peripheral-charger: new driver
         - mt6360-charger: new driver
         - simple-battery: support reading chemistry info
         - max17042-battery: add max77849 support
         - sbs-battery: add time_to_empty_now support
         - smb347-charger: prepare USB OTG support
         - rn5t618: add voltage_now support
         - axp288: cleanup & optimizations
         - max17042_battery: cleanups
         - ab8500: cleanups
         - misc minor cleanups and DT binding fixes
      
        reset related:
         - tps65086-restart: new driver
         - linkstation-poweroff: support NETGEAR ReadyNAS Duo v2"
      
      * tag 'for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (51 commits)
        power: supply: core: Fix parsing of battery chemistry/technology
        power: supply: max17042_battery: log SOC threshold using debug log level
        power: supply: max17042_battery: more robust chip type checks
        power: supply: max17042_battery: fix typo in MAx17042_TOFF
        power: supply: max17042_battery: clean up MAX17055_V_empty
        power: supply: smb347-charger: Implement USB VBUS regulator
        power: supply: smb347-charger: Add missing pin control activation
        power: supply: smb347-charger: Utilize generic regmap caching
        power: supply: smb347-charger: Make smb347_set_writable() IRQ-safe
        dt-bindings: power: supply: smb347-charger: Document USB VBUS regulator
        power: reset: Add TPS65086 restart driver
        dt-bindings: power: supply: max17042: describe interrupt
        power: supply: max17042: remove duplicated STATUS bit defines
        power: supply: max17042: handle fails of reading status register
        power: supply: core: Parse battery chemistry/technology
        dt-bindings: power: Extend battery bindings with chemistry
        power: reset: linkstation-poweroff: add new device
        power: reset: linkstation-poweroff: prepare for new devices
        power: supply: bq24735: reorganize ChargeOption command macros
        power: supply: rn5t618: Add voltage_now property
        ...
      4520dcbe
    • L
      Merge tag 'spi-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 0da9bc6d
      Linus Torvalds 提交于
      Pull spi updates from Mark Brown:
       "A quiet release for SPI, some fixes and a couple of new drivers plus
        one small refactoring:
      
         - Move the chip select timing configuration from the controller to
           the device to allow a bit more flexibility
      
         - New drivers for Rockchip SFC and Spreadtrum ADI"
      
      * tag 'spi-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (47 commits)
        spi: spi-zynq-qspi: use wait_for_completion_timeout to make zynq_qspi_exec_mem_op not interruptible
        spi: add sprd ADI for sc9863 and ums512
        spi: Convert sprd ADI bindings to yaml
        spi: sprd: Add ADI r3 support
        spi: sprd: Fix the wrong WDG_LOAD_VAL
        spi: davinci: invoke chipselect callback
        spi: sprd: fill offset only to RD_CMD register for reading from slave device
        spi: sprd: Make sure offset not equal to slave address size
        spi: sprd: Pass offset instead of physical address to adi_read/_write()
        spi: rockchip-sfc: Fix assigned but never used return error codes
        spi: rockchip-sfc: Remove redundant IO operations
        spi: stm32: fix excluded_middle.cocci warnings
        spi: coldfire-qspi: Use clk_disable_unprepare in the remove function
        spi: tegra20-slink: remove spi_master_put() in tegra_slink_remove()
        spi: rockchip-sfc: add rockchip serial flash controller
        spi: rockchip-sfc: Bindings for Rockchip serial flash controller
        spi: orion: Prevent incorrect chip select behaviour
        spi: mxic: add missing braces
        spi: spi-pic32: Fix issue with uninitialized dma_slave_config
        spi: spi-fsl-dspi: Fix issue with uninitialized dma_slave_config
        ...
      0da9bc6d
    • L
      Merge tag 'regulator-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · d46e0d33
      Linus Torvalds 提交于
      Pull regulator updates from Mark Brown:
       "A very quiet releases, some fixes and cleanups but not really that
        many of them. There were a couple of new driver specific pieces:
      
         - Support for controlling the over/under voltage protection on
           BD718xx devices
      
         - New drivers for Richtek RTQ2134, and RTQ6752"
      
      * tag 'regulator-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (37 commits)
        regulator: vctrl: Avoid lockdep warning in enable/disable ops
        regulator: vctrl: Use locked regulator_get_voltage in probe path
        regulator: Documentation fix for regulator error notification helper
        regulator: Minor regulator documentation fixes.
        regulator: sy7636a: Use the regmap directly
        regulator: sy7636a: Store the epd-pwr-good GPIO locally
        regulator: sy7636a: Use the parent driver data
        regulator: sy7636a: Remove the poll_enable_time
        regulator: sy8827n: Enable REGCACHE_FLAT
        regulator: sy8824x: Enable REGCACHE_FLAT
        regulator: rtq2134: Fix coding style
        regulator: hi6421v600: rename voltage range arrays
        regulator: hi6421v600: use lowercase for ldo
        regulator: fixed: use dev_err_probe for register
        regulator: rtq2134: Add support for Richtek RTQ2134 SubPMIC
        regulator: rtq2134: Add binding document for Richtek RTQ2134 SubPMIC
        regulator: Fix a couple of spelling mistakes in Kconfig
        regulator: rtq6752: fix reg reset behavior
        regulator: da9063: Add support for full-current mode.
        regulator: rt6245: make a const array func_base static, makes object smaller
        ...
      d46e0d33
    • L
      Merge tag 'regmap-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · 4aed6ee5
      Linus Torvalds 提交于
      Pull regmap updates from Mark Brown:
       "A few small fixes for regmaps this time, plus support for allowing
        drivers to select raw spinlocks for the locks in order to allow usage
        in interrutpt controllers"
      
      * tag 'regmap-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: teach regmap to use raw spinlocks if requested in the config
        regmap: allow const array for {devm_,}regmap_field_bulk_alloc reg_fields
        regmap: Prefer unsigned int to bare use of unsigned
        regmap: fix the offset of register error log
      4aed6ee5