Skip to content
  1. Sep 19, 2021
    • Linus Torvalds's avatar
      alpha: move __udiv_qrnnd library function to arch/alpha/lib/ · d4d016ca
      Linus Torvalds authored
      
      
      We already had the implementation for __udiv_qrnnd (unsigned divide for
      multi-precision arithmetic) as part of the alpha math emulation code.
      
      But you can disable the math emulation code - even if you shouldn't -
      and then the MPI code that actually wants this functionality (and is
      needed by various crypto functions) will fail to build.
      
      So move the extended-precision divide code to be a regular library
      function, just like all the regular division code is.  That way ie is
      available regardless of math-emulation.
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d4d016ca
    • Linus Torvalds's avatar
      alpha: mark 'Jensen' platform as no longer broken · ab41f75e
      Linus Torvalds authored
      Ok, it almost certainly is still broken on actual hardware, but the
      immediate reason for it having been marked BROKEN was a build error that
      is fixed by just making sure the low-level IO header file is included
      sufficiently early that the __EXTERN_INLINE hackery takes effect.
      
      This was marked broken back in 2017 by commit 1883c9f4
      
       ("alpha: mark
      jensen as broken"), but Ulrich Teichert made me look at it as part of my
      cross-build work to make sure -Werror actually does the right thing.
      
      There are lots of alpha configurations that do not build cleanly, but
      now it's no longer because Jensen wouldn't be buildable.  That said,
      because the Jensen platform doesn't force PCI to be enabled (Jensen only
      had EISA), it ends up being somewhat interesting as a source of odd
      configs.
      
      Reported-by: default avatarUlrich Teichert <krypton@ulrich-teichert.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ab41f75e
    • Linus Torvalds's avatar
      Merge tag 's390-5.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 93ff9f13
      Linus Torvalds authored
      Pull s390 fixes from Vasily Gorbik:
      
       - Fix potential out-of-range access during secure boot facility
         detection.
      
       - Fully validate the VMA before calling follow_pte() in pci code.
      
       - Remove arch specific WARN_DYNAMIC_STACK config option.
      
       - Fix zcrypto kernel doc comments.
      
       - Update defconfigs.
      
      * tag 's390-5.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390: remove WARN_DYNAMIC_STACK
        s390/ap: fix kernel doc comments
        s390: update defconfigs
        s390/sclp: fix Secure-IPL facility detection
        s390/pci_mmio: fully validate the VMA before calling follow_pte()
      93ff9f13
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · d1a88690
      Linus Torvalds authored
      Pull devicetree fixes from Rob Herring:
      
       - Revert fw_devlink tracking 'phy-handle' links. This broke at least a
         few platforms. A better solution is being worked on.
      
       - Add Samsung UFS binding which fell thru the cracks
      
       - Doc reference fixes from Mauro
      
       - Fix for restricted DMA error handling
      
      * tag 'devicetree-fixes-for-5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        dt-bindings: arm: Fix Toradex compatible typo
        of: restricted dma: Fix condition for rmem init
        dt-bindings: arm: mediatek: mmsys: update mediatek,mmsys.yaml reference
        dt-bindings: net: dsa: sja1105: update nxp,sja1105.yaml reference
        dt-bindings: ufs: Add bindings for Samsung ufs host
        Revert "of: property: fw_devlink: Add support for "phy-handle" property"
      d1a88690
    • Linus Torvalds's avatar
      tgafb: clarify dependencies · cd395d52
      Linus Torvalds authored
      
      
      The TGA boards were based on the DECchip 21030 PCI graphics accelerator
      used mainly for alpha, and existed in a TURBOchannel (TC) version for
      the DECstation (MIPS) workstations.
      
      However, the config option for the TGA code is a bit confused, and says
      
      	depends on FB && (ALPHA || TC)
      
      because people didn't really want to enable the option for random PCI
      environments, so the "ALPHA" stands in for that case (while the TC case
      is then the MIPS DECstation case).
      
      So that config dependency is kind of a mixture of architecture and bus
      choices.  But it's incorrect, in that there were non-PCI-based alpha
      hardware, and then the driver just causes warnings:
      
        drivers/video/fbdev/tgafb.c:1532:13: error: ‘tgafb_unregister’ defined but not used [-Werror=unused-function]
         1532 | static void tgafb_unregister(struct device *dev)
              |             ^~~~~~~~~~~~~~~~
        drivers/video/fbdev/tgafb.c:1387:12: error: ‘tgafb_register’ defined but not used [-Werror=unused-function]
         1387 | static int tgafb_register(struct device *dev)
              |            ^~~~~~~~~~~~~~
      
      so let's make the config option dependencies a bit more explict:
      
      	depends on FB
      	depends on PCI || TC
      	depends on ALPHA || TC
      
      where that first "FB" is the software configuration dependency, the
      second "PCI || TC" is the hardware bus dependency, while that final
      "ALPHA || TC" dependency is the "don't bother asking except for these
      situations.
      
      We could make that third case have "COMPILE_TEST" as an option, and mark
      the register/unregister functions as __maybe_unused, but I'm not sure
      it's really worth it.
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cd395d52
    • 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. Sep 18, 2021
    • David Heidelberg's avatar
      dt-bindings: arm: Fix Toradex compatible typo · 55c21d57
      David Heidelberg authored
      Fix board compatible typo reported by dtbs_check.
      
      Fixes: f4d1577e
      
       ("dt-bindings: arm: Convert Tegra board/soc bindings to json-schema")
      Signed-off-by: default avatarDavid Heidelberg <david@ixit.cz>
      Link: https://lore.kernel.org/r/20210912165120.188490-1-david@ixit.cz
      
      
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      55c21d57
    • David Brazdil's avatar
      of: restricted dma: Fix condition for rmem init · 31c8025f
      David Brazdil authored
      of_dma_set_restricted_buffer fails to handle negative return values from
      of_property_count_elems_of_size, e.g. when the property does not exist.
      This results in an attempt to assign a non-existent reserved memory
      region to the device and a warning being printed. Fix the condition to
      take negative values into account.
      
      Fixes: f3cfd136
      
       ("of: restricted dma: Don't fail device probe on rmem init failure")
      Cc: Will Deacon <will@kernel.org>
      Signed-off-by: default avatarDavid Brazdil <dbrazdil@google.com>
      Acked-by: default avatarWill Deacon <will@kernel.org>
      Link: https://lore.kernel.org/r/20210917131423.2760155-1-dbrazdil@google.com
      
      
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      31c8025f
    • 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
  3. Sep 17, 2021
  4. Sep 16, 2021