1. 18 Sep, 2021 2 commits
    • Linus Torvalds's avatar
      alpha: make 'Jensen' IO functions build again · cc9d3aaa
      Linus Torvalds authored
      The Jensen IO functions are overly copmplicated because some of the IO
      addresses refer to special 'local IO' ports, and they get accessed
      differently.
      
      That then makes gcc not actually inline them, and since they were marked
      "extern inline" when included through the regular <asm/io.h> path, and
      then only marked "inline" when included from sys_jensen.c, you never
      necessarily got a body for the IO functions at all.
      
      The intent of the sys_jensen.c code is to actually get the non-inlined
      copy generated, so remove the 'inline' from the magic macro that is
      supposed to sort this all out.
      
      Also, do not mix 'extern inline' functions (that may or may not be
      inlined and will not generate a function body if they are not) with
      'static inline' (that _will_ generate a function body when not inlined).
      Because gcc will complain about this situation:
      
         error: ‘jensen_bus_outb’ is static but used in inline function ‘jensen_outb’ which is not static
      
      because gcc basically doesn't know whether to generate a body for that
      static inline function or not for that call site.
      
      So make all of these use that __EXTERN_INLINE marker.  Gcc will
      generally not inline these things on use, and then generate the function
      body out-of-line in sys_jensen.c.
      
      This makes the core IO functions build for the alpha Jensen config.
      
      Not that the rest then builds, because it turns out Jensen also doesn't
      enable PCI, which then makes other drievrs very unhappy, but that's a
      separate issue.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cc9d3aaa
    • Linus Torvalds's avatar
      spi: Fix tegra20 build with CONFIG_PM=n · efafec27
      Linus Torvalds authored
      Without CONFIG_PM enabled, the SET_RUNTIME_PM_OPS() macro ends up being
      empty, and the only use of tegra_slink_runtime_{resume,suspend} goes
      away, resulting in
      
        drivers/spi/spi-tegra20-slink.c:1200:12: error: ‘tegra_slink_runtime_resume’ defined but not used [-Werror=unused-function]
         1200 | static int tegra_slink_runtime_resume(struct device *dev)
              |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
        drivers/spi/spi-tegra20-slink.c:1188:12: error: ‘tegra_slink_runtime_suspend’ defined but not used [-Werror=unused-function]
         1188 | static int tegra_slink_runtime_suspend(struct device *dev)
              |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      mark the functions __maybe_unused to make the build happy.
      
      This hits the alpha allmodconfig build (and others).
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      efafec27
  2. 17 Sep, 2021 8 commits
    • Linus Torvalds's avatar
      Merge tag 'pm-5.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 4357f03d
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These fix two cpufreq issues, one in the intel_pstate driver and one
        in the core.
      
        Specifics:
      
         - Prevent intel_pstate from avoiding to use HWP, even if instructed
           to do so via the kernel command line, when HWP has been enabled
           already by the platform firmware (Doug Smythies).
      
         - Prevent use-after-free from occurring in the schedutil cpufreq
           governor on exit by fixing a core helper function that attempts to
           access memory associated with a kobject after calling kobject_put()
           on it (James Morse)"
      
      * tag 'pm-5.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: schedutil: Destroy mutex before kobject_put() frees the memory
        cpufreq: intel_pstate: Override parameters if HWP forced by BIOS
      4357f03d
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-5.15-1' of git://git.infradead.org/users/hch/dma-mapping · b9b11b13
      Linus Torvalds authored
      Pull dma-mapping fixes from Christoph Hellwig:
      
       - page align size in sparc32 arch_dma_alloc (Andreas Larsson)
      
       - tone down a new dma-debug message (Hamza Mahfooz)
      
       - fix the kerneldoc for dma_map_sg_attrs (me)
      
      * tag 'dma-mapping-5.15-1' of git://git.infradead.org/users/hch/dma-mapping:
        sparc32: page align size in arch_dma_alloc
        dma-debug: prevent an error message from causing runtime problems
        dma-mapping: fix the kerneldoc for dma_map_sg_attrs
      b9b11b13
    • Linus Torvalds's avatar
      Merge tag 'pci-v5.15-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 7639afad
      Linus Torvalds authored
      Pull PCI fixes from Bjorn Helgaas:
      
       - Defer VPD sizing until we actually need the contents; fixes a
         boot-time slowdown reported by Dave Jones (Bjorn Helgaas)
      
       - Stop clobbering OF fwnodes when we look for an ACPI fwnode; fixes a
         virtio-iommu boot regression (Jean-Philippe Brucker)
      
       - Add AMD GPU multi-function power dependencies; fixes runtime power
         management, including GPU resume and temp and fan sensor issues (Evan
         Quan)
      
       - Update VMD maintainer to Nirmal Patel (Jon Derrick)
      
      * tag 'pci-v5.15-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        MAINTAINERS: Add Nirmal Patel as VMD maintainer
        PCI: Add AMD GPU multi-function power dependencies
        PCI/ACPI: Don't reset a fwnode set by OF
        PCI/VPD: Defer VPD sizing until first access
      7639afad
    • Linus Torvalds's avatar
      Merge tag 'iov_iter.3-5.15-2021-09-17' of git://git.kernel.dk/linux-block · ddf21bd8
      Linus Torvalds authored
      Pull io_uring iov_iter retry fixes from Jens Axboe:
       "This adds a helper to save/restore iov_iter state, and modifies
        io_uring to use it.
      
        After that is done, we can now kill the iter->truncated addition that
        we added for this release. The io_uring change is being overly
        cautious with the save/restore/advance, but better safe than sorry and
        we can always improve that and reduce the overhead if it proves to be
        of concern. The only case to be worried about in this regard is huge
        IO, where iteration can take a while to iterate segments.
      
        I spent some time writing test cases, and expanded the coverage quite
        a bit from the last posting of this. liburing carries this regression
        test case now:
      
            https://git.kernel.dk/cgit/liburing/tree/test/file-verify.c
      
        which exercises all of this. It now also supports provided buffers,
        and explicitly tests for end-of-file/device truncation as well.
      
        On top of that, Pavel sanitized the IOPOLL retry path to follow the
        exact same pattern as normal IO"
      
      * tag 'iov_iter.3-5.15-2021-09-17' of git://git.kernel.dk/linux-block:
        io_uring: move iopoll reissue into regular IO path
        Revert "iov_iter: track truncated size"
        io_uring: use iov_iter state save/restore helpers
        iov_iter: add helper to save iov_iter state
      ddf21bd8
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.15-2021-09-17' of git://git.kernel.dk/linux-block · 0bc7eb03
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "Mostly fixes for regressions in this cycle, but also a few fixes that
        predate this release.
      
        The odd one out is a tweak to the direct files added in this release,
        where attempting to reuse a slot is allowed instead of needing an
        explicit removal of that slot first. It's a considerable improvement
        in usability to that API, hence I'm sending it for -rc2.
      
         - io-wq race fix and cleanup (Hao)
      
         - loop_rw_iter() type fix
      
         - SQPOLL max worker race fix
      
         - Allow poll arm for O_NONBLOCK files, fixing a case where it's
           impossible to properly use io_uring if you cannot modify the file
           flags
      
         - Allow direct open to simply reuse a slot, instead of needing it
           explicitly removed first (Pavel)
      
         - Fix a case where we missed signal mask restoring in cqring_wait, if
           we hit -EFAULT (Xiaoguang)"
      
      * tag 'io_uring-5.15-2021-09-17' of git://git.kernel.dk/linux-block:
        io_uring: allow retry for O_NONBLOCK if async is supported
        io_uring: auto-removal for direct open/accept
        io_uring: fix missing sigmask restore in io_cqring_wait()
        io_uring: pin SQPOLL data before unlocking ring lock
        io-wq: provide IO_WQ_* constants for IORING_REGISTER_IOWQ_MAX_WORKERS arg items
        io-wq: fix potential race of acct->nr_workers
        io-wq: code clean of io_wqe_create_worker()
        io_uring: ensure symmetry in handling iter types in loop_rw_iter()
      0bc7eb03
    • Linus Torvalds's avatar
      Merge tag 'block-5.15-2021-09-17' of git://git.kernel.dk/linux-block · 36d6753b
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - NVMe pull request via Christoph:
             - fix ANA state updates when a namespace is not present (Anton
               Eidelman)
             - nvmet: fix a width vs precision bug in
               nvmet_subsys_attr_serial_show (Dan Carpenter)
             - avoid race in shutdown namespace removal (Daniel Wagner)
             - fix io_work priority inversion in nvme-tcp (Keith Busch)
             - destroy cm id before destroy qp to avoid use after free (Ruozhu
               Li)
      
       - blk-integrity profile registration fixes (Christoph, Lihong)
      
       - blk-cgroup UAF fix (Li)
      
       - blk-mq tag iterator fix (Ming)
      
       - blkcg memory leak fix (Yanfei)
      
      * tag 'block-5.15-2021-09-17' of git://git.kernel.dk/linux-block:
        blk-cgroup: fix UAF by grabbing blkcg lock before destroying blkg pd
        blkcg: fix memory leak in blk_iolatency_init
        nvme: remove the call to nvme_update_disk_info in nvme_ns_remove
        block: flush the integrity workqueue in blk_integrity_unregister
        block: check if a profile is actually registered in blk_integrity_unregister
        nvme-tcp: fix io_work priority inversion
        nvme-rdma: destroy cm id before destroy qp to avoid use after free
        nvme-multipath: fix ANA state updates when a namespace is not present
        nvme: avoid race in shutdown namespace removal
        nvmet: fix a width vs precision bug in nvmet_subsys_attr_serial_show()
        blk-mq: avoid to iterate over stale request
      36d6753b
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 7f2cd141
      Linus Torvalds authored
      Pull arm64 fixes and cleanups from Catalin Marinas:
      
       - Fix the memset() size when re-initialising the SVE state.
      
       - Mark __stack_chk_guard as __ro_after_init.
      
       - Remove duplicate include.
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: Mark __stack_chk_guard as __ro_after_init
        arm64/kernel: remove duplicate include in process.c
        arm64/sve: Use correct size when reinitialising SVE state
      7f2cd141
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.15b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · c6460dae
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
      
       - The first hunk of a Xen swiotlb fixup series fixing multiple minor
         issues and doing some small cleanups
      
       - Some further Xen related fixes avoiding WARN() splats when running as
         Xen guests or dom0
      
       - A Kconfig fix allowing the pvcalls frontend to be built as a module
      
      * tag 'for-linus-5.15b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        swiotlb-xen: drop DEFAULT_NSLABS
        swiotlb-xen: arrange to have buffer info logged
        swiotlb-xen: drop leftover __ref
        swiotlb-xen: limit init retries
        swiotlb-xen: suppress certain init retries
        swiotlb-xen: maintain slab count properly
        swiotlb-xen: fix late init retry
        swiotlb-xen: avoid double free
        xen/pvcalls: backend can be a module
        xen: fix usage of pmd_populate in mremap for pv guests
        xen: reset legacy rtc flag for PV domU
        PM: base: power: don't try to use non-existing RTC for storing data
        xen/balloon: use a kernel thread instead a workqueue
      c6460dae
  3. 16 Sep, 2021 30 commits