1. 31 Mar, 2022 1 commit
  2. 30 Mar, 2022 16 commits
    • Zi Yan's avatar
      mm: page_alloc: validate buddy before check its migratetype. · 787af64d
      Zi Yan authored
      Whenever a buddy page is found, page_is_buddy() should be called to
      check its validity.  Add the missing check during pageblock merge check.
      
      Fixes: 1dd214b8 ("mm: page_alloc: avoid merging non-fallbackable pageblocks with others")
      Link: https://lore.kernel.org/all/20220330154208.71aca532@gandalf.local.home/Reported-and-tested-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarZi Yan <ziy@nvidia.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      787af64d
    • Linus Torvalds's avatar
      Merge tag 'for-5.18/parisc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · d5fd43ba
      Linus Torvalds authored
      Pull more parisc architecture updates from Helge Deller:
      
       - Revert a patch to the invalidate/flush vmap routines which broke
         kernel patching functions on older PA-RISC machines.
      
       - Fix the kernel patching code wrt locking and flushing. Works now on
         B160L machine as well.
      
       - Fix CPU IRQ affinity for LASI, WAX and Dino chips
      
       - Add CPU hotplug support
      
       - Detect the hppa-suse-linux-gcc compiler when cross-compiling
      
      * tag 'for-5.18/parisc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: Fix patch code locking and flushing
        parisc: Find a new timesync master if current CPU is removed
        parisc: Move common_stext into .text section when CONFIG_HOTPLUG_CPU=y
        parisc: Rewrite arch_cpu_idle_dead() for CPU hotplugging
        parisc: Implement __cpu_die() and __cpu_disable() for CPU hotplugging
        parisc: Add PDC locking functions for rendezvous code
        parisc: Move disable_sr_hashing_asm() into .text section
        parisc: Move CPU startup-related functions into .text section
        parisc: Move store_cpu_topology() into text section
        parisc: Switch from GENERIC_CPU_DEVICES to GENERIC_ARCH_TOPOLOGY
        parisc: Ensure set_firmware_width() is called only once
        parisc: Add constants for control registers and clean up mfctl()
        parisc: Detect hppa-suse-linux-gcc compiler for cross-building
        parisc: Clean up cpu_check_affinity() and drop cpu_set_affinity_irq()
        parisc: Fix CPU affinity for Lasi, WAX and Dino chips
        Revert "parisc: Fix invalidate/flush vmap routines"
      d5fd43ba
    • Linus Torvalds's avatar
      Merge tag 'modules-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux · 57c06b6e
      Linus Torvalds authored
      Pull module update from Luis Chamberlain:
       "There is only one patch which qualifies for modules for v5.18-rc1 and
        its a small fix from Dan Carpenter for lib/test_kmod module.
      
        The rest of the changes are too major and landed in modules-testing
        too late for inclusion. The good news is that most of the major
        changes for v5.19 is going to be tested very early through linux-next.
      
        This simple fix is all we have for modules for v5.18-rc1"
      
      * tag 'modules-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux:
        lib/test: use after free in register_test_dev_kmod()
      57c06b6e
    • Linus Torvalds's avatar
      Merge tag 'pwm/for-5.18-rc1' of... · 74164d28
      Linus Torvalds authored
      Merge tag 'pwm/for-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
      
      Pull pwm updates from Thierry Reding:
       "This contains conversions of some more drivers to the atomic API as
        well as the addition of new chip support for some existing drivers.
      
        There are also various minor fixes and cleanups across the board, from
        drivers to device tree bindings"
      
      * tag 'pwm/for-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (45 commits)
        pwm: rcar: Simplify multiplication/shift logic
        dt-bindings: pwm: renesas,tpu: Do not require pwm-cells twice
        dt-bindings: pwm: tiehrpwm: Do not require pwm-cells twice
        dt-bindings: pwm: tiecap: Do not require pwm-cells twice
        dt-bindings: pwm: samsung: Do not require pwm-cells twice
        dt-bindings: pwm: intel,keembay: Do not require pwm-cells twice
        dt-bindings: pwm: brcm,bcm7038: Do not require pwm-cells twice
        dt-bindings: pwm: toshiba,visconti: Include generic PWM schema
        dt-bindings: pwm: renesas,pwm: Include generic PWM schema
        dt-bindings: pwm: sifive: Include generic PWM schema
        dt-bindings: pwm: rockchip: Include generic PWM schema
        dt-bindings: pwm: mxs: Include generic PWM schema
        dt-bindings: pwm: iqs620a: Include generic PWM schema
        dt-bindings: pwm: intel,lgm: Include generic PWM schema
        dt-bindings: pwm: imx: Include generic PWM schema
        dt-bindings: pwm: allwinner,sun4i-a10: Include generic PWM schema
        pwm: pwm-mediatek: Beautify error messages text
        pwm: pwm-mediatek: Allocate clk_pwms with devm_kmalloc_array
        pwm: pwm-mediatek: Simplify error handling with dev_err_probe()
        pwm: brcmstb: Remove useless locking
        ...
      74164d28
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · 4f373011
      Linus Torvalds authored
      Pull regulator fixes from Mark Brown:
       "A couple of fixes for the rt4831 driver which fix features that didn't
        work due to incomplete description of the register configuration"
      
      * tag 'regulator-fix-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: rt4831: Add active_discharge_on to fix discharge API
        regulator: rt4831: Add bypass mask to fix set_bypass API work
      4f373011
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine · 2a44cdaa
      Linus Torvalds authored
      Pull dmaengine updates from Vinod Koul:
       "This time we have bunch of driver updates and some new device support.
      
        New support:
         - Document RZ/V2L and RZ/G2UL dma binding
         - TI AM62x k3-udma and k3-psil support
      
        Updates:
         - Yaml conversion for Mediatek uart apdma schema
         - Removal of DMA-32 fallback configuration for various drivers
         - imx-sdma updates for channel restart"
      
      * tag 'dmaengine-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (23 commits)
        dmaengine: hisi_dma: fix MSI allocate fail when reload hisi_dma
        dmaengine: dw-axi-dmac: cleanup comments
        dmaengine: fsl-dpaa2-qdma: Drop comma after SoC match table sentinel
        dt-bindings: dma: Convert mtk-uart-apdma to DT schema
        dmaengine: ppc4xx: Make use of the helper macro LIST_HEAD()
        dmaengine: idxd: Remove useless DMA-32 fallback configuration
        dmaengine: qcom_hidma: Remove useless DMA-32 fallback configuration
        dmaengine: sh: Kconfig: Add ARCH_R9A07G054 dependency for RZ_DMAC config option
        dmaengine: ti: k3-psil: Add AM62x PSIL and PDMA data
        dmaengine: ti: k3-udma: Add AM62x DMSS support
        dmaengine: ti: cleanup comments
        dmaengine: imx-sdma: clean up some inconsistent indenting
        dmaengine: Revert "dmaengine: shdma: Fix runtime PM imbalance on error"
        dmaengine: idxd: restore traffic class defaults after wq reset
        dmaengine: altera-msgdma: Remove useless DMA-32 fallback configuration
        dmaengine: stm32-dma: set dma_device max_sg_burst
        dmaengine: imx-sdma: fix cyclic buffer race condition
        dmaengine: imx-sdma: restart cyclic channel if needed
        dmaengine: iot: Remove useless DMA-32 fallback configuration
        dmaengine: ptdma: handle the cases based on DMA is complete
        ...
      2a44cdaa
    • Linus Torvalds's avatar
      Merge tag 'rproc-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · 2c54e184
      Linus Torvalds authored
      Pull remoteproc updates from Bjorn Andersson:
       "In the remoteproc core, it's now possible to mark the sysfs attributes
        read only on a per-instance basis, which is then used by the TI wkup
        M3 driver.
      
        Also, the rproc_shutdown() interface propagates errors to the caller
        and an array underflow is fixed in the debugfs interface. The
        rproc_da_to_va() API is moved to the public API to allow e.g. child
        rpmsg devices to acquire pointers to memory shared with the remote
        processor.
      
        The TI K3 R5F and DSP drivers gains support for attaching to instances
        already started by the bootloader, aka IPC-only mode.
      
        The Mediatek remoteproc driver gains support for the MT8186 SCP. The
        driver's probe function is reordered and moved to use the devres
        version of rproc_alloc() to save a few gotos. The driver's probe
        function is also transitioned to use dev_err_probe() to provide better
        debug support.
      
        Support for the Qualcomm SC7280 Wireless Subsystem (WPSS) is
        introduced. The Hexagon based remoteproc drivers gains support for
        voting for interconnect bandwidth during launch of the remote
        processor. The modem subsystem (MSS) driver gains support for probing
        the BAM-DMUX driver, which provides the network interface towards the
        modem on a set of older Qualcomm platforms. In addition a number a bug
        fixes are introduces in the Qualcomm drivers.
      
        Lastly Qualcomm ADSP DeviceTree binding is converted to YAML format,
        to allow validation of DeviceTree source files"
      
      * tag 'rproc-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (22 commits)
        remoteproc: qcom_q6v5_mss: Create platform device for BAM-DMUX
        remoteproc: qcom: q6v5_wpss: Add support for sc7280 WPSS
        dt-bindings: remoteproc: qcom: Add SC7280 WPSS support
        dt-bindings: remoteproc: qcom: adsp: Convert binding to YAML
        remoteproc: k3-dsp: Add support for IPC-only mode for all K3 DSPs
        remoteproc: k3-dsp: Refactor mbox request code in start
        remoteproc: k3-r5: Add support for IPC-only mode for all R5Fs
        remoteproc: k3-r5: Refactor mbox request code in start
        remoteproc: Change rproc_shutdown() to return a status
        remoteproc: qcom: q6v5: Add interconnect path proxy vote
        remoteproc: mediatek: Support mt8186 scp
        dt-bindings: remoteproc: mediatek: Add binding for mt8186 scp
        remoteproc: qcom_q6v5_mss: Fix some leaks in q6v5_alloc_memory_region
        remoteproc: qcom_wcnss: Add missing of_node_put() in wcnss_alloc_memory_region
        remoteproc: qcom: Fix missing of_node_put in adsp_alloc_memory_region
        remoteproc: move rproc_da_to_va declaration to remoteproc.h
        remoteproc: wkup_m3: Set sysfs_read_only flag
        remoteproc: Introduce sysfs_read_only flag
        remoteproc: Fix count check in rproc_coredump_write()
        remoteproc: mtk_scp: Use dev_err_probe() where possible
        ...
      2c54e184
    • Linus Torvalds's avatar
      Merge tag 'hwlock-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · d177850d
      Linus Torvalds authored
      Pull hwspinlock updates from Bjorn Andersson:
       "This updates sprd and srm32 drivers to use struct_size() instead of
        their open-coded equivalents. It also cleans up the omap dt-bindings
        example"
      
      * tag 'hwlock-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
        hwspinlock: sprd: Use struct_size() helper in devm_kzalloc()
        hwspinlock: stm32: Use struct_size() helper in devm_kzalloc()
        dt-bindings: hwlock: omap: Remove redundant binding example
      d177850d
    • Linus Torvalds's avatar
      Merge tag 'rpmsg-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · 3312db01
      Linus Torvalds authored
      Pull rpmsg updates from Bjorn Andersson:
       "The major part of the rpmsg changes for v5.18 relates to improvements
        in the rpmsg char driver, which now allow automatically attaching to
        rpmsg channels as well as initiating new communication channels from
        the Linux side.
      
        The SMD driver is moved to arch_initcall with the purpose of
        registering root clocks earlier during boot.
      
        Also in the SMD driver, a workaround for the resource power management
        (RPM) channel is introduced to resolve an issue where both the RPM and
        Linux side waits for the other to close the communication established
        by the bootloader - this unblocks support for clocks and regulators on
        some older Qualcomm platforms"
      
      * tag 'rpmsg-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
        rpmsg: ctrl: Introduce new RPMSG_CREATE/RELEASE_DEV_IOCTL controls
        rpmsg: char: Introduce the "rpmsg-raw" channel
        rpmsg: char: Add possibility to use default endpoint of the rpmsg device
        rpmsg: char: Refactor rpmsg_chrdev_eptdev_create function
        rpmsg: Update rpmsg_chrdev_register_device function
        rpmsg: Move the rpmsg control device from rpmsg_char to rpmsg_ctrl
        rpmsg: Create the rpmsg class in core instead of in rpmsg char
        rpmsg: char: Export eptdev create and destroy functions
        rpmsg: char: treat rpmsg_trysend() ENOMEM as EAGAIN
        rpmsg: qcom_smd: Fix redundant channel->registered assignment
        rpmsg: use struct_size over open coded arithmetic
        rpmsg: smd: allow opening rpm_requests even if already opened
        rpmsg: qcom_smd: Promote to arch_initcall
      3312db01
    • Linus Torvalds's avatar
      Merge tag 'i3c/for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux · f18e345d
      Linus Torvalds authored
      Pull i3c updates from Alexandre Belloni:
      
       - support dynamic addition of i2c devices
      
      * tag 'i3c/for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux:
        i3c: fix uninitialized variable use in i2c setup
        i3c: support dynamically added i2c devices
        i3c: remove i2c board info from i2c_dev_desc
      f18e345d
    • Linus Torvalds's avatar
      Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 95124339
      Linus Torvalds authored
      Pull clk updates from Stephen Boyd:
       "There's one large change in the core clk framework here. We change how
        clk_set_rate_range() works so that the frequency is re-evaulated each
        time the rate is changed. Previously we wouldn't let clk providers see
        a rate that was different if it was still within the range, which
        could be bad for power if the clk could run slower when a range
        expands. Now the clk provider can decide to do something differently
        when the constraints change. This broke Nvidia's clk driver so we had
        to wait for the fix for that to bake a little more in -next.
      
        The rate range patch series also introduced a kunit suite for the clk
        framework that we're going to extend in the next release. It already
        made it easy to find corner cases in the rate range patches so I'm
        excited to see it cover more clk code and increase our confidence in
        core framework patches in the future. I also added a kunit test for
        the basic clk gate code and that work will continue to cover more
        basic clk types: muxes, dividers, etc.
      
        Beyond the core code we have the usual set of clk driver updates and
        additions. Qualcomm again dominates the diffstat here with lots more
        SoCs being supported and i.MX follows afer that with a similar number
        of SoCs gaining clk drivers. Beyond those large additions there's
        drivers being modernized to use clk_parent_data so we can move away
        from global string names for all the clks in an SoC. Finally there's
        lots of little fixes all over the clk drivers for typos, warnings, and
        missing clks that aren't critical and get batched up waiting for the
        next merge window to open. Nothing super big stands out in the driver
        pile. Full details are below.
      
        Core:
         - Make clk_set_rate_range() re-evaluate the limits each time
         - Introduce various clk_set_rate_range() tests
         - Add clk_drop_range() to drop a previously set range
      
        New Drivers:
         - i.MXRT1050 clock driver and bindings
         - i.MX8DXL clock driver and bindings
         - i.MX93 clock driver and bindings
         - NCO blocks on Apple SoCs
         - Audio clks on StarFive JH7100 RISC-V SoC
         - Add support for the new Renesas RZ/V2L SoC
         - Qualcomm SDX65 A7 PLL
         - Qualcomm SM6350 GPU clks
         - Qualcomm SM6125, SM6350, QCS2290 display clks
         - Qualcomm MSM8226 multimedia clks
      
        Updates:
         - Kunit tests for clk-gate implementation
         - Terminate arrays with sentinels and make that clearer
         - Cleanup SPDX tags
         - Fix typos in comments
         - Mark mux table as const in clk-mux
         - Make the all_lists array const
         - Convert Cirrus Logic CS2000P driver to regmap, yamlify DT binding
           and add support for dynamic mode
         - Clock configuration on Microchip PolarFire SoCs
         - Free allocations on probe error in Mediatek clk driver
         - Modernize Mediatek clk driver by consolidating code
         - Add watchdog (WDT), I2C, and pin function controller (PFC) clocks
           on Renesas R-Car S4-8
         - Improve the clocks for the Rockchip rk3568 display outputs
           (parenting, pll-rates)
         - Use of_device_get_match_data() instead of open-coding on Rockchip
           rk3568
         - Reintroduce the expected fractional-divider behaviour that
           disappeared with the addition of CLK_FRAC_DIVIDER_POWER_OF_TWO_PS
         - Remove SYS PLL 1/2 clock gates for i.MX8M*
         - Remove AUDIO MCLK ROOT from i.MX7D
         - Add fracn gppll clock type used by i.MX93
         - Add new composite clock for i.MX93
         - Add missing media mipi phy ref clock for i.MX8MP
         - Fix off by one in imx_lpcg_parse_clks_from_dt()
         - Rework for the imx pll14xx
         - sama7g5: One low priority fix for GCLK of PDMC
         - Add DMA engine (SYS-DMAC) clocks on Renesas R-Car S4-8
         - Add MOST (MediaLB I/F) clocks on Renesas R-Car E3 and D3
         - Add CAN-FD clocks on Renesas R-Car V3U
         - Qualcomm SC8280XP RPMCC
         - Add some missing clks on Qualcomm MSM8992/MSM8994/MSM8998 SoCs
         - Rework Qualcomm GCC bindings and convert SDM845 camera bindig to
           YAML
         - Convert various Qualcomm drivers to use clk_parent_data
         - Remove test clocks from various Qualcomm drivers
         - Crypto engine clks on Qualcomm IPQ806x + more freqs for SDCC/NSS
         - Qualcomm SM8150 EMAC, PCIe, UFS GDSCs
         - Better pixel clk frequency support on Qualcomm RCG2 clks"
      
      * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (227 commits)
        clk: zynq: Update the parameters to zynq_clk_register_periph_clk
        clk: zynq: trivial warning fix
        clk: Drop the rate range on clk_put()
        clk: test: Test clk_set_rate_range on orphan mux
        clk: Initialize orphan req_rate
        dt-bindings: clock: drop useless consumer example
        dt-bindings: clock: renesas: Make example 'clocks' parsable
        clk: qcom: gcc-msm8994: Fix gpll4 width
        dt-bindings: clock: fix dt_binding_check error for qcom,gcc-other.yaml
        clk: rs9: Add Renesas 9-series PCIe clock generator driver
        clk: fixed-factor: Introduce devm_clk_hw_register_fixed_factor_index()
        clk: visconti: prevent array overflow in visconti_clk_register_gates()
        dt-bindings: clk: rs9: Add Renesas 9-series I2C PCIe clock generator
        clk: sifive: Move all stuff into SoCs header files from C files
        clk: sifive: Add SoCs prefix in each SoCs-dependent data
        riscv: dts: Change the macro name of prci in each device node
        dt-bindings: change the macro name of prci in header files and example
        clk: sifive: duplicate the macro definitions for the time being
        clk: qcom: sm6125-gcc: fix typos in comments
        clk: ti: clkctrl: fix typos in comments
        ...
      95124339
    • Linus Torvalds's avatar
      Merge tag 'libnvdimm-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · ee96dd96
      Linus Torvalds authored
      Pull libnvdimm updates from Dan Williams:
       "The update for this cycle includes the deprecation of block-aperture
        mode and a new perf events interface for the papr_scm nvdimm driver.
      
        The perf events approach was acked by PeterZ.
      
         - Add perf support for nvdimm events, initially only for 'papr_scm'
           devices.
      
         - Deprecate the 'block aperture' support in libnvdimm, it only ever
           existed in the specification, not in shipping product"
      
      * tag 'libnvdimm-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        nvdimm/blk: Fix title level
        MAINTAINERS: remove section LIBNVDIMM BLK: MMIO-APERTURE DRIVER
        powerpc/papr_scm: Fix build failure when
        drivers/nvdimm: Fix build failure when CONFIG_PERF_EVENTS is not set
        nvdimm/region: Delete nd_blk_region infrastructure
        ACPI: NFIT: Remove block aperture support
        nvdimm/namespace: Delete nd_namespace_blk
        nvdimm/namespace: Delete blk namespace consideration in shared paths
        nvdimm/blk: Delete the block-aperture window driver
        nvdimm/region: Fix default alignment for small regions
        docs: ABI: sysfs-bus-nvdimm: Document sysfs event format entries for nvdimm pmu
        powerpc/papr_scm: Add perf interface support
        drivers/nvdimm: Add perf interface to expose nvdimm performance stats
        drivers/nvdimm: Add nvdimm pmu structure
      ee96dd96
    • Linus Torvalds's avatar
      fs: fix fd table size alignment properly · d888c83f
      Linus Torvalds authored
      Jason Donenfeld reports that my commit 1c24a186 ("fs: fd tables have
      to be multiples of BITS_PER_LONG") doesn't work, and the reason is an
      embarrassing brown-paper-bag bug.
      
      Yes, we want to align the number of fds to BITS_PER_LONG, and yes, the
      reason they might not be aligned is because the incoming 'max_fd'
      argument might not be aligned.
      
      But aligining the argument - while simple - will cause a "infinitely
      big" maxfd (eg NR_OPEN_MAX) to just overflow to zero.  Which most
      definitely isn't what we want either.
      
      The obvious fix was always just to do the alignment last, but I had
      moved it earlier just to make the patch smaller and the code look
      simpler.  Duh.  It certainly made _me_ look simple.
      
      Fixes: 1c24a186 ("fs: fd tables have to be multiples of BITS_PER_LONG")
      Reported-and-tested-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      Cc: Fedor Pchelkin <aissur0002@gmail.com>
      Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>
      Cc: Christian Brauner <brauner@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d888c83f
    • Peter Zijlstra's avatar
      crypto: x86/sm3 - Fixup SLS · aa8e73ee
      Peter Zijlstra authored
      This missed the big asm update due to being merged through the crypto
      tree.
      
      Fixes: f94909ce ("x86: Prepare asm files for straight-line-speculation")
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      aa8e73ee
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-5.18-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 965181d7
      Linus Torvalds authored
      Pull NFS client updates from Trond Myklebust:
       "Highlights include:
      
        Features:
      
         - Switch NFS to use readahead instead of the obsolete readpages.
      
         - Readdir fixes to improve cacheability of large directories when
           there are multiple readers and writers.
      
         - Readdir performance improvements when doing a seekdir() immediately
           after opening the directory (common when re-exporting NFS).
      
         - NFS swap improvements from Neil Brown.
      
         - Loosen up memory allocation to permit direct reclaim and write back
           in cases where there is no danger of deadlocking the writeback code
           or NFS swap.
      
         - Avoid sillyrename when the NFSv4 server claims to support the
           necessary features to recover the unlinked but open file after
           reboot.
      
        Bugfixes:
      
         - Patch from Olga to add a mount option to control NFSv4.1 session
           trunking discovery, and default it to being off.
      
         - Fix a lockup in nfs_do_recoalesce().
      
         - Two fixes for list iterator variables being used when pointing to
           the list head.
      
         - Fix a kernel memory scribble when reading from a non-socket
           transport in /sys/kernel/sunrpc.
      
         - Fix a race where reconnecting to a server could leave the TCP
           socket stuck forever in the connecting state.
      
         - Patch from Neil to fix a shutdown race which can leave the SUNRPC
           transport timer primed after we free the struct xprt itself.
      
         - Patch from Xin Xiong to fix reference count leaks in the NFSv4.2
           copy offload.
      
         - Sunrpc patch from Olga to avoid resending a task on an offlined
           transport.
      
        Cleanups:
      
         - Patches from Dave Wysochanski to clean up the fscache code"
      
      * tag 'nfs-for-5.18-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (91 commits)
        NFSv4/pNFS: Fix another issue with a list iterator pointing to the head
        NFS: Don't loop forever in nfs_do_recoalesce()
        SUNRPC: Don't return error values in sysfs read of closed files
        SUNRPC: Do not dereference non-socket transports in sysfs
        NFSv4.1: don't retry BIND_CONN_TO_SESSION on session error
        SUNRPC don't resend a task on an offlined transport
        NFS: replace usage of found with dedicated list iterator variable
        SUNRPC: avoid race between mod_timer() and del_timer_sync()
        pNFS/files: Ensure pNFS allocation modes are consistent with nfsiod
        pNFS/flexfiles: Ensure pNFS allocation modes are consistent with nfsiod
        NFSv4/pnfs: Ensure pNFS allocation modes are consistent with nfsiod
        NFS: Avoid writeback threads getting stuck in mempool_alloc()
        NFS: nfsiod should not block forever in mempool_alloc()
        SUNRPC: Make the rpciod and xprtiod slab allocation modes consistent
        SUNRPC: Fix unx_lookup_cred() allocation
        NFS: Fix memory allocation in rpc_alloc_task()
        NFS: Fix memory allocation in rpc_malloc()
        SUNRPC: Improve accuracy of socket ENOBUFS determination
        SUNRPC: Replace internal use of SOCKWQ_ASYNC_NOSPACE
        SUNRPC: Fix socket waits for write buffer space
        ...
      965181d7
    • Linus Torvalds's avatar
      Merge tag 'jfs-5.18' of https://github.com/kleikamp/linux-shaggy · 1ec48f95
      Linus Torvalds authored
      Pull jfs updates from Dave Kleikamp:
       "A couple bug fixes"
      
      * tag 'jfs-5.18' of https://github.com/kleikamp/linux-shaggy:
        jfs: prevent NULL deref in diFree
        jfs: fix divide error in dbNextAG
      1ec48f95
  3. 29 Mar, 2022 23 commits
    • Dan Carpenter's avatar
      lib/test: use after free in register_test_dev_kmod() · dc0ce6cc
      Dan Carpenter authored
      The "test_dev" pointer is freed but then returned to the caller.
      
      Fixes: d9c6a72d ("kmod: add test driver to stress test the module loader")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      dc0ce6cc
    • Linus Torvalds's avatar
      fs: fd tables have to be multiples of BITS_PER_LONG · 1c24a186
      Linus Torvalds authored
      This has always been the rule: fdtables have several bitmaps in them,
      and as a result they have to be sized properly for bitmaps.  We walk
      those bitmaps in chunks of 'unsigned long' in serveral cases, but even
      when we don't, we use the regular kernel bitops that are defined to work
      on arrays of 'unsigned long', not on some byte array.
      
      Now, the distinction between arrays of bytes and 'unsigned long'
      normally only really ends up being noticeable on big-endian systems, but
      Fedor Pchelkin and Alexey Khoroshilov reported that copy_fd_bitmaps()
      could be called with an argument that wasn't even a multiple of
      BITS_PER_BYTE.  And then it fails to do the proper copy even on
      little-endian machines.
      
      The bug wasn't in copy_fd_bitmap(), but in sane_fdtable_size(), which
      didn't actually sanitize the fdtable size sufficiently, and never made
      sure it had the proper BITS_PER_LONG alignment.
      
      That's partly because the alignment historically came not from having to
      explicitly align things, but simply from previous fdtable sizes, and
      from count_open_files(), which counts the file descriptors by walking
      them one 'unsigned long' word at a time and thus naturally ends up doing
      sizing in the proper 'chunks of unsigned long'.
      
      But with the introduction of close_range(), we now have an external
      source of "this is how many files we want to have", and so
      sane_fdtable_size() needs to do a better job.
      
      This also adds that explicit alignment to alloc_fdtable(), although
      there it is mainly just for documentation at a source code level.  The
      arithmetic we do there to pick a reasonable fdtable size already aligns
      the result sufficiently.
      
      In fact,clang notices that the added ALIGN() in that function doesn't
      actually do anything, and does not generate any extra code for it.
      
      It turns out that gcc ends up confusing itself by combining a previous
      constant-sized shift operation with the variable-sized shift operations
      in roundup_pow_of_two().  And probably due to that doesn't notice that
      the ALIGN() is a no-op.  But that's a (tiny) gcc misfeature that doesn't
      matter.  Having the explicit alignment makes sense, and would actually
      matter on a 128-bit architecture if we ever go there.
      
      This also adds big comments above both functions about how fdtable sizes
      have to have that BITS_PER_LONG alignment.
      
      Fixes: 60997c3d ("close_range: add CLOSE_RANGE_UNSHARE")
      Reported-by: default avatarFedor Pchelkin <aissur0002@gmail.com>
      Reported-by: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
      Link: https://lore.kernel.org/all/20220326114009.1690-1-aissur0002@gmail.com/Tested-and-acked-by: default avatarChristian Brauner <brauner@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1c24a186
    • John David Anglin's avatar
      parisc: Fix patch code locking and flushing · a9fe7fa7
      John David Anglin authored
      This change fixes the following:
      
      1) The flags variable is not initialized. Always use raw_spin_lock_irqsave
      and raw_spin_unlock_irqrestore to serialize patching.
      
      2) flush_kernel_vmap_range is primarily intended for DMA flushes. Since
      __patch_text_multiple is often called with interrupts disabled, it is
      better to directly call flush_kernel_dcache_range_asm and
      flush_kernel_icache_range_asm. This avoids an extra call.
      
      3) The final call to flush_icache_range is unnecessary.
      Signed-off-by: default avatarJohn David Anglin <dave.anglin@bell.net>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      a9fe7fa7
    • Helge Deller's avatar
      parisc: Find a new timesync master if current CPU is removed · 1afde47d
      Helge Deller authored
      When CPU hotplugging is enabled, the user may want to remove the
      current CPU which is providing the timer ticks. If this happens
      we need to find a new timesync master.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      1afde47d
    • Helge Deller's avatar
      parisc: Move common_stext into .text section when CONFIG_HOTPLUG_CPU=y · ca45ec3c
      Helge Deller authored
      Move the common_stext function into the non-init text section if hotplug
      is enabled. This function is called from the firmware when hotplugged
      CPUs are brought up.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      ca45ec3c
    • Helge Deller's avatar
      parisc: Rewrite arch_cpu_idle_dead() for CPU hotplugging · 98903688
      Helge Deller authored
      Let the PDC firmware put the CPU into firmware idle loop with the
      pdc_cpu_rendezvous() function.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      98903688
    • Helge Deller's avatar
      parisc: Implement __cpu_die() and __cpu_disable() for CPU hotplugging · 88b3aac6
      Helge Deller authored
      Add relevant code to __cpu_die() and __cpu_disable() to finally enable
      the CPU hotplugging features. Reset the irq count values in smp_callin()
      to zero before bringing up the CPU.
      
      It seems that the firmware may need up to 8 seconds to fully stop a CPU
      in which no other PDC calls are allowed to be made. Use a timeout
      __cpu_die() to accommodate for this.
      
      Use "chcpu -d 1" to bring CPU1 down, and "chcpu -e 1" to bring it up.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      88b3aac6
    • Helge Deller's avatar
      parisc: Add PDC locking functions for rendezvous code · db2b0d76
      Helge Deller authored
      Add pdc_cpu_rendezvous_lock() and pdc_cpu_rendezvous_unlock()
      to lock PDC while CPU is transitioning into rendezvous state.
      This is needed, because the transition phase may take up to 8 seconds.
      
      Add pdc_pat_get_PDC_entrypoint() to get PDC entry point for current CPU.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      db2b0d76
    • Helge Deller's avatar
      4d7d4c3f
    • Helge Deller's avatar
      parisc: Move CPU startup-related functions into .text section · beb48dfd
      Helge Deller authored
      If CONFIG_HOTPLUG_CPU is enabled, those functions will be run again
      after bootup. So they need to reside in the .text section.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      beb48dfd
    • Helge Deller's avatar
      95370b40
    • Helge Deller's avatar
      parisc: Switch from GENERIC_CPU_DEVICES to GENERIC_ARCH_TOPOLOGY · 62773112
      Helge Deller authored
      Switch away from the own cpu topology code to common code which is used
      by ARM64 and RISCV. That will allow us to enable CPU hotplug later on.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      62773112
    • Helge Deller's avatar
      parisc: Ensure set_firmware_width() is called only once · 1e93848a
      Helge Deller authored
      Call set_firmware_width() only once at runtime.
      This prevents that hotplugged CPUs will get stuck in spinlocks later on.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      1e93848a
    • Helge Deller's avatar
      parisc: Add constants for control registers and clean up mfctl() · 7e0b2be9
      Helge Deller authored
      Clean up the code for the mfctl() and mtctl() functions and add often
      used constants.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      7e0b2be9
    • Helge Deller's avatar
      parisc: Detect hppa-suse-linux-gcc compiler for cross-building · ed979481
      Helge Deller authored
      Allow the system to find the SUSE hppa compiler and linker to set
      CROSS32_COMPILE and CROSS_COMPILE.
      Suggested-by: default avatarJiri Slaby <jirislaby@kernel.org>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      ed979481
    • Helge Deller's avatar
      parisc: Clean up cpu_check_affinity() and drop cpu_set_affinity_irq() · ac2dd327
      Helge Deller authored
      The cpu_set_affinity_irq() isn't needed. Not the CPU irqs need to
      change, but the slave irq chips simply need to be reprogrammed to
      a new CPU irq with the txn_* functions.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      ac2dd327
    • Helge Deller's avatar
      parisc: Fix CPU affinity for Lasi, WAX and Dino chips · 939fc856
      Helge Deller authored
      Add the missing logic to allow Lasi, WAX and Dino to set the
      CPU affinity. This fixes IRQ migration to other CPUs when a
      CPU is shutdown which currently holds the IRQs for one of those
      chips.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      939fc856
    • Linus Torvalds's avatar
      Merge tag 'devprop-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 13776ebb
      Linus Torvalds authored
      Pull device properties code update from Rafael Wysocki:
       "This is based on new i2c material for 5.18-rc1 and simply reorganizes
        the code on top of it so as to group similar functions together (Andy
        Shevchenko)"
      
      * tag 'devprop-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        device property: Don't split fwnode_get_irq*() APIs in the code
      13776ebb
    • Linus Torvalds's avatar
      Merge tag 'pm-5.18-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 1d59c3b6
      Linus Torvalds authored
      Pull more power management updates from Rafael Wysocki:
       "These update ARM cpufreq drivers, the OPP (Operating Performance
        Points) library and the power management documentation.
      
        Specifics:
      
         - Add per core DVFS support for QCom SoC (Bjorn Andersson), convert
           to yaml binding (Manivannan Sadhasivam) and various other fixes to
           the QCom drivers (Luca Weiss).
      
         - Add OPP table for imx7s SoC (Denys Drozdov) and minor fixes (Stefan
           Agner).
      
         - Fix CPPC driver's freq/performance conversions (Pierre Gondois).
      
         - Minor generic cleanups (Yury Norov).
      
         - Introduce opp-microwatt property to the OPP core, bindings, etc
           (Lukasz Luba).
      
         - Convert DT bindings to schema format and various related fixes
           (Yassine Oudjana).
      
         - Expose OPP's OF node in debugfs (Viresh Kumar).
      
         - Add Intel uncore frequency scaling documentation file to its
           MAINTAINERS entry (Srinivas Pandruvada).
      
         - Clean up the AMD P-state driver documentation (Jan Engelhardt)"
      
      * tag 'pm-5.18-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (24 commits)
        Documentation: amd-pstate: grammar and sentence structure updates
        dt-bindings: cpufreq: cpufreq-qcom-hw: Convert to YAML bindings
        dt-bindings: dvfs: Use MediaTek CPUFREQ HW as an example
        Documentation: EM: Describe new registration method using DT
        OPP: Add support of "opp-microwatt" for EM registration
        PM: EM: add macro to set .active_power() callback conditionally
        OPP: Add "opp-microwatt" supporting code
        dt-bindings: opp: Add "opp-microwatt" entry in the OPP
        MAINTAINERS: Add additional file to uncore frequency control
        cpufreq: blocklist Qualcomm sc8280xp and sa8540p in cpufreq-dt-platdev
        cpufreq: qcom-hw: Add support for per-core-dcvs
        dt-bindings: power: avs: qcom,cpr: Convert to DT schema
        arm64: dts: qcom: qcs404: Rename CPU and CPR OPP tables
        arm64: dts: qcom: msm8996: Rename cluster OPP tables
        dt-bindings: opp: Convert qcom-nvmem-cpufreq to DT schema
        dt-bindings: opp: qcom-opp: Convert to DT schema
        arm64: dts: qcom: msm8996-mtp: Add msm8996 compatible
        dt-bindings: arm: qcom: Add msm8996 and apq8096 compatibles
        opp: Expose of-node's name in debugfs
        cpufreq: CPPC: Fix performance/frequency conversion
        ...
      1d59c3b6
    • Stephen Boyd's avatar
      Merge branches 'clk-sifive' and 'clk-visconti' into clk-next · cf683abd
      Stephen Boyd authored
      * clk-sifive:
        clk: sifive: Move all stuff into SoCs header files from C files
        clk: sifive: Add SoCs prefix in each SoCs-dependent data
        riscv: dts: Change the macro name of prci in each device node
        dt-bindings: change the macro name of prci in header files and example
        clk: sifive: duplicate the macro definitions for the time being
      
      * clk-visconti:
        clk: visconti: prevent array overflow in visconti_clk_register_gates()
      cf683abd
    • Stephen Boyd's avatar
      Merge branches 'clk-range', 'clk-uniphier', 'clk-apple' and 'clk-qcom' into clk-next · c64dd8ea
      Stephen Boyd authored
       - Make clk_set_rate_range() re-evaluate the limits each time
       - Introduce various clk_set_rate_range() tests
       - Add clk_drop_range() to drop a previously set range
       - Support for NCO blocks on Apple SoCs
      
      * clk-range:
        clk: Drop the rate range on clk_put()
        clk: test: Test clk_set_rate_range on orphan mux
        clk: Initialize orphan req_rate
        clk: bcm: rpi: Run some clocks at the minimum rate allowed
        clk: bcm: rpi: Set a default minimum rate
        clk: bcm: rpi: Add variant structure
        clk: Add clk_drop_range
        clk: Always set the rate on clk_set_range_rate
        clk: Use clamp instead of open-coding our own
        clk: Always clamp the rounded rate
        clk: Enforce that disjoints limits are invalid
        clk: Introduce Kunit Tests for the framework
        clk: Fix clk_hw_get_clk() when dev is NULL
      
      * clk-uniphier:
        clk: uniphier: Fix fixed-rate initialization
      
      * clk-apple:
        clk: clk-apple-nco: Allow and fix module building
        MAINTAINERS: Add clk-apple-nco under ARM/APPLE MACHINE
        clk: clk-apple-nco: Add driver for Apple NCO
        dt-bindings: clock: Add Apple NCO
      
      * clk-qcom: (61 commits)
        clk: qcom: gcc-msm8994: Fix gpll4 width
        dt-bindings: clock: fix dt_binding_check error for qcom,gcc-other.yaml
        clk: qcom: Add display clock controller driver for SM6125
        dt-bindings: clock: add QCOM SM6125 display clock bindings
        clk: qcom: Fix sorting of SDX_GCC_65 in Makefile and Kconfig
        clk: qcom: gcc: Add emac GDSC support for SM8150
        clk: qcom: gcc: sm8150: Fix some identation issues
        clk: qcom: gcc: Add UFS_CARD and UFS_PHY GDSCs for SM8150
        clk: qcom: gcc: Add PCIe0 and PCIe1 GDSC for SM8150
        clk: qcom: clk-rcg2: Update the frac table for pixel clock
        clk: qcom: clk-rcg2: Update logic to calculate D value for RCG
        clk: qcom: smd: Add missing MSM8998 RPM clocks
        clk: qcom: smd: Add missing RPM clocks for msm8992/4
        dt-bindings: clock: qcom: rpmcc: Add RPM Modem SubSystem (MSS) clocks
        clk: qcom: gcc-ipq806x: add CryptoEngine resets
        dt-bindings: reset: add ipq8064 ce5 resets
        clk: qcom: gcc-ipq806x: add CryptoEngine clocks
        dt-bindings: clock: add ipq8064 ce5 clk define
        clk: qcom: gcc-ipq806x: add additional freq for sdc table
        clk: qcom: clk-rcg: add clk_rcg_floor_ops ops
        ...
      c64dd8ea
    • Stephen Boyd's avatar
      Merge branches 'clk-starfive', 'clk-ti', 'clk-terminate' and 'clk-cleanup' into clk-next · 4222744d
      Stephen Boyd authored
       - Audio clks on StarFive JH7100 RISC-V SoC
       - Terminate arrays with sentinels and make that clearer
       - Cleanup SPDX tags
       - Fix typos in comments
      
      * clk-starfive:
        clk: starfive: Add JH7100 audio clock driver
        clk: starfive: jh7100: Support more clock types
        clk: starfive: jh7100: Make hw clock implementation reusable
        dt-bindings: clock: Add starfive,jh7100-audclk bindings
        dt-bindings: clock: Add JH7100 audio clock definitions
        clk: starfive: jh7100: Handle audio_div clock properly
        clk: starfive: jh7100: Don't round divisor up twice
      
      * clk-ti:
        clk: ti: Drop legacy compatibility clocks for dra7
        clk: ti: Drop legacy compatibility clocks for am4
        clk: ti: Drop legacy compatibility clocks for am3
        clk: ti: Update component clocks to use ti_dt_clk_name()
        clk: ti: Update pll and clockdomain clocks to use ti_dt_clk_name()
        clk: ti: Add ti_dt_clk_name() helper to use clock-output-names
        clk: ti: Use clock-output-names for clkctrl
        clk: ti: Add ti_find_clock_provider() to use clock-output-names
        clk: ti: Optionally parse IO address from parent clock node
        clk: ti: Preserve node in ti_dt_clocks_register()
        clk: ti: Constify clkctrl_name
      
      * clk-terminate:
        clk: actions: Make sentinel elements more obvious
        clk: clps711x: Terminate clk_div_table with sentinel element
        clk: hisilicon: Terminate clk_div_table with sentinel element
        clk: loongson1: Terminate clk_div_table with sentinel element
        clk: actions: Terminate clk_div_table with sentinel element
      
      * clk-cleanup:
        clk: zynq: Update the parameters to zynq_clk_register_periph_clk
        clk: zynq: trivial warning fix
        clk: qcom: sm6125-gcc: fix typos in comments
        clk: ti: clkctrl: fix typos in comments
        clk: COMMON_CLK_LAN966X should depend on SOC_LAN966
        clk: Use of_device_get_match_data()
        clk: bcm2835: Remove unused variable
        clk: tegra: tegra124-emc: Fix missing put_device() call in emc_ensure_emc_driver
        clk: cleanup comments
        clk: socfpga: cleanup spdx tags
      4222744d
    • Stephen Boyd's avatar
      Merge branches 'clk-mvebu', 'clk-const', 'clk-imx' and 'clk-rockchip' into clk-next · 9babf952
      Stephen Boyd authored
       - Mark mux table as const in clk-mux
       - Make the all_lists array const
      
      * clk-mvebu:
        clk: mvebu: use time_is_before_eq_jiffies() instead of open coding it
      
      * clk-const:
        clk: Mark clk_core_evict_parent_cache_subtree() 'target' const
        clk: Mark 'all_lists' as const
        clk: pistachio: Declare mux table as const u32[]
        clk: qcom: Declare mux table as const u32[]
        clk: mmp: Declare mux tables as const u32[]
        clk: hisilicon: Remove unnecessary cast of mux table to u32 *
        clk: mux: Declare u32 *table parameter as const
        clk: nxp: Declare mux table parameter as const u32 *
        clk: nxp: Remove unused variable
      
      * clk-imx: (28 commits)
        dt-bindings: clock: drop useless consumer example
        clk: imx: Select MXC_CLK for i.MX93 clock driver
        clk: imx: remove redundant re-assignment of pll->base
        MAINTAINERS: clk: imx: add git tree and dt-bindings files
        clk: imx: pll14xx: Support dynamic rates
        clk: imx: pll14xx: Add pr_fmt
        clk: imx: pll14xx: explicitly return lowest rate
        clk: imx: pll14xx: name variables after usage
        clk: imx: pll14xx: consolidate rate calculation
        clk: imx: pll14xx: Use FIELD_GET/FIELD_PREP
        clk: imx: pll14xx: Drop wrong shifting
        clk: imx: pll14xx: Use register defines consistently
        clk: imx8mp: remove SYS PLL 1/2 clock gates
        clk: imx8mn: remove SYS PLL 1/2 clock gates
        clk: imx8mm: remove SYS PLL 1/2 clock gates
        clk: imx: add i.MX93 clk
        clk: imx: support fracn gppll
        clk: imx: add i.MX93 composite clk
        dt-bindings: clock: add i.MX93 clock definition
        dt-bindings: clock: Add imx93 clock support
        ...
      
      * clk-rockchip:
        clk: rockchip: re-add rational best approximation algorithm to the fractional divider
        clk/rockchip: Use of_device_get_match_data()
        clk: rockchip: Add CLK_SET_RATE_PARENT to the HDMI reference clock on rk3568
        clk: rockchip: drop CLK_SET_RATE_PARENT from dclk_vop* on rk3568
        clk: rockchip: Add more PLL rates for rk3568
      9babf952