1. 05 May, 2023 3 commits
  2. 04 May, 2023 7 commits
    • Claudio Imbrenda's avatar
      KVM: s390: fix race in gmap_make_secure() · c148dc8e
      Claudio Imbrenda authored
      Fix a potential race in gmap_make_secure() and remove the last user of
      follow_page() without FOLL_GET.
      
      The old code is locking something it doesn't have a reference to, and
      as explained by Jason and David in this discussion:
      https://lore.kernel.org/linux-mm/Y9J4P%2FRNvY1Ztn0Q@nvidia.com/
      it can lead to all kind of bad things, including the page getting
      unmapped (MADV_DONTNEED), freed, reallocated as a larger folio and the
      unlock_page() would target the wrong bit.
      There is also another race with the FOLL_WRITE, which could race
      between the follow_page() and the get_locked_pte().
      
      The main point is to remove the last use of follow_page() without
      FOLL_GET or FOLL_PIN, removing the races can be considered a nice
      bonus.
      
      Link: https://lore.kernel.org/linux-mm/Y9J4P%2FRNvY1Ztn0Q@nvidia.com/Suggested-by: default avatarJason Gunthorpe <jgg@nvidia.com>
      Fixes: 214d9bbc ("s390/mm: provide memory management functions for protected KVM guests")
      Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
      Signed-off-by: default avatarClaudio Imbrenda <imbrenda@linux.ibm.com>
      Message-Id: <20230428092753.27913-2-imbrenda@linux.ibm.com>
      c148dc8e
    • Claudio Imbrenda's avatar
      KVM: s390: pv: fix asynchronous teardown for small VMs · 292a7d6f
      Claudio Imbrenda authored
      On machines without the Destroy Secure Configuration Fast UVC, the
      topmost level of page tables is set aside and freed asynchronously
      as last step of the asynchronous teardown.
      
      Each gmap has a host_to_guest radix tree mapping host (userspace)
      addresses (with 1M granularity) to gmap segment table entries (pmds).
      
      If a guest is smaller than 2GB, the topmost level of page tables is the
      segment table (i.e. there are only 2 levels). Replacing it means that
      the pointers in the host_to_guest mapping would become stale and cause
      all kinds of nasty issues.
      
      This patch fixes the issue by disallowing asynchronous teardown for
      guests with only 2 levels of page tables. Userspace should (and already
      does) try using the normal destroy if the asynchronous one fails.
      
      Update s390_replace_asce so it refuses to replace segment type ASCEs.
      This is still needed in case the normal destroy VM fails.
      
      Fixes: fb491d55 ("KVM: s390: pv: asynchronous destroy for reboot")
      Reviewed-by: default avatarMarc Hartmayer <mhartmay@linux.ibm.com>
      Reviewed-by: default avatarJanosch Frank <frankja@linux.ibm.com>
      Signed-off-by: default avatarClaudio Imbrenda <imbrenda@linux.ibm.com>
      Message-Id: <20230421085036.52511-2-imbrenda@linux.ibm.com>
      292a7d6f
    • Linus Torvalds's avatar
      Merge tag 'parisc-for-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 1a5304fe
      Linus Torvalds authored
      Pull parisc updates from Helge Deller:
       "Two important fixes in here:
      
         - The argument pointer register was wrong when calling 64-bit
           firmware functions, which may cause random memory corruption or
           crashes.
      
         - Ensure page alignment in cache flush functions, otherwise not all
           memory might get flushed.
      
        The rest are cleanups (mmap implementation, panic path) and usual
        smaller updates.
      
        Summary:
      
         - Calculate correct argument pointer in real64_call_asm()
      
         - Cleanup mmap implementation regarding color alignment (John David
           Anglin)
      
         - Spinlock fixes in panic path (Guilherme G. Piccoli)
      
         - build doc update for parisc64 (Randy Dunlap)
      
         - Ensure page alignment in flush functions"
      
      * tag 'parisc-for-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: Fix argument pointer in real64_call_asm()
        parisc: Cleanup mmap implementation regarding color alignment
        parisc: Drop HP-UX constants and structs from grfioctl.h
        parisc: Ensure page alignment in flush functions
        parisc: Replace regular spinlock with spin_trylock on panic path
        parisc: update kbuild doc. aliases for parisc64
        parisc: Limit amount of kgdb breakpoints on parisc
      1a5304fe
    • Linus Torvalds's avatar
      Merge tag 'modules-6.4-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux · b4082428
      Linus Torvalds authored
      Pull modules fix from Luis Chamberlain:
       "One fix by Arnd far for modules which came in after the first pull
        request.
      
        The issue was found as part of some late compile tests with 0-day. I
        take it 0-day does some secondary late builds with after some initial
        ones"
      
      * tag 'modules-6.4-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux:
        module: include internal.h in module/dups.c
      b4082428
    • Linus Torvalds's avatar
      Merge tag 'sysctl-6.4-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux · 049a18f2
      Linus Torvalds authored
      Pull more sysctl updates from Luis Chamberlain:
       "As mentioned on my first pull request for sysctl-next, for v6.4-rc1
        we're very close to being able to deprecating register_sysctl_paths().
        I was going to assess the situation after the first week of the merge
        window.
      
        That time is now and things are looking good. We only have one which
        had already an ACK for so I'm picking this up here now and the last
        patch is the one that uses an axe.
      
        I have boot tested the last patch and 0-day build completed
        successfully"
      
      * tag 'sysctl-6.4-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux:
        sysctl: remove register_sysctl_paths()
        kernel: pid_namespace: simplify sysctls with register_sysctl()
      049a18f2
    • Linus Torvalds's avatar
      Merge tag 'uml-for-linus-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux · 342528ff
      Linus Torvalds authored
      Pull uml updates from Richard Weinberger:
      
       - Make stub data pages configurable
      
       - Make it harder to mix user and kernel code by accident
      
      * tag 'uml-for-linus-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux:
        um: make stub data pages size tweakable
        um: prevent user code in modules
        um: further clean up user_syms
        um: don't export printf()
        um: hostfs: define our own API boundary
        um: add __weak for exported functions
      342528ff
    • Linus Torvalds's avatar
      Merge tag 'ubifs-for-linus-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs · 9f269232
      Linus Torvalds authored
      Pull UBI and UBIFS updates from Richard Weinberger:
       "UBI:
      
         - Fix error value for try_write_vid_and_data()
      
         - Minor cleanups
      
        UBIFS:
      
         - Fixes for various memory leaks
      
         - Minor cleanups"
      
      * tag 'ubifs-for-linus-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs:
        ubifs: Fix memleak when insert_old_idx() failed
        Revert "ubifs: dirty_cow_znode: Fix memleak in error handling path"
        ubifs: Fix memory leak in do_rename
        ubifs: Free memory for tmpfile name
        ubi: Fix return value overwrite issue in try_write_vid_and_data()
        ubifs: Remove return in compr_exit()
        ubi: Simplify bool conversion
      9f269232
  3. 03 May, 2023 21 commits
    • Linus Torvalds's avatar
      Merge tag 'pm-6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · fa31fc82
      Linus Torvalds authored
      Pull more power management updates from Rafael Wysocki:
       "These fix a hibernation test mode regression and clean up the
        intel_idle driver.
      
        Specifics:
      
         - Make test_resume work again after the changes that made hibernation
           open the snapshot device in exclusive mode (Chen Yu)
      
         - Clean up code in several places in intel_idle (Artem Bityutskiy)"
      
      * tag 'pm-6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        intel_idle: mark few variables as __read_mostly
        intel_idle: do not sprinkle module parameter definitions around
        intel_idle: fix confusing message
        intel_idle: improve C-state flags handling robustness
        intel_idle: further intel_idle_init_cstates_icpu() cleanup
        intel_idle: clean up intel_idle_init_cstates_icpu()
        intel_idle: use pr_info() instead of printk()
        PM: hibernate: Do not get block device exclusively in test_resume mode
        PM: hibernate: Turn snapshot_test into global variable
      fa31fc82
    • Linus Torvalds's avatar
      Merge tag 'acpi-6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 0153d8e6
      Linus Torvalds authored
      Pull more ACPI updates from Rafael Wysocki:
       "These add two ACPI-related quirks and extend support for Apple device
        properties supplied via ACPI _DSM.
      
        Specifics:
      
         - Do not turn off unused power resources during initialization on the
           Toshiba Click Mini (Hans de Goede)
      
         - Support strings in device properties supplied by ACPI _DSM on Apple
           platforms (Hector Martin)
      
         - Add an ACPI device ID quirk for Lenovo Yoga Tablet 2 (Marius Hoch)"
      
      * tag 'acpi-6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: property: Support strings in Apple _DSM props
        ACPI: x86: utils: Remove Lenovo Yoga Tablet 2's MAGN0001
        ACPI: PM: Do not turn of unused power resources on the Toshiba Click Mini
      0153d8e6
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 667de5c6
      Linus Torvalds authored
      Pull more thermal control updates from Rafael Wysocki:
       "These are mostly cleanups on top of the previously merged thermal
        control changes plus some driver fixes and the removal of the Intel
        Menlow thermal driver.
      
        Specifics:
      
         - Add compatible DT bindings for imx6sll and imx6ul to fix a dtbs
           check warning (Stefan Wahren)
      
         - Update the example in the DT bindings to reflect changes with the
           ADC node name for QCom TM and TM5 (Marijn Suijten)
      
         - Fix comments for the cpuidle_cooling_register() function to match
           the function prototype (Chenggang Wang)
      
         - Fix inconsistent temperature read and some Mediatek variant board
           reboot by reverting a change and handling the temperature
           differently (AngeloGioacchino Del Regno)
      
         - Fix a memory leak in the initialization error path for the Mediatek
           driver (Kang Chen)
      
         - Use of_address_to_resource() in the Mediatek driver (Rob Herring)
      
         - Fix unit address in the QCom tsens driver DT bindings (Krzysztof
           Kozlowski)
      
         - Clean up the step-wise thermal governor (Zhang Rui)
      
         - Introduce thermal_zone_device() for accessing the device field of
           struct thermal_zone_device and two drivers use it (Daniel Lezcano)
      
         - Clean up the ACPI thermal driver a bit (Daniel Lezcano)
      
         - Delete the thermal driver for Intel Menlow platforms that is not
           expected to have any users (Rafael Wysocki)"
      
      * tag 'thermal-6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        thermal: intel: menlow: Get rid of this driver
        ACPI: thermal: Move to dedicated function sysfs extra attr creation
        ACPI: thermal: Use thermal_zone_device()
        thermal: intel: pch_thermal: Use thermal driver device to write a trace
        thermal: core: Encapsulate tz->device field
        thermal: gov_step_wise: Adjust code logic to match comment
        thermal: gov_step_wise: Delete obsolete comment
        dt-bindings: thermal: qcom-tsens: Correct unit address
        thermal/drivers/mediatek: Use of_address_to_resource()
        thermal/drivers/mediatek: Change clk_prepare_enable to devm_clk_get_enabled in mtk_thermal_probe
        thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe
        thermal/drivers/mediatek: Add temperature constraints to validate read
        Revert "thermal/drivers/mediatek: Add delay after thermal banks initialization"
        thermal/drivers/cpuidle_cooling: Delete unmatched comments
        dt-bindings: thermal: Use generic ADC node name in examples
        dt-bindings: imx-thermal: Add imx6sll and imx6ul compatible
      667de5c6
    • Linus Torvalds's avatar
      Merge tag 'pwm/for-6.4-rc1' of... · 89b7fd5d
      Linus Torvalds authored
      Merge tag 'pwm/for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
      
      Pull pwm updates from Thierry Reding:
       "The bulk of this is trivial conversions to the new .remove_new()
        callback for drivers as part of Uwe's effort to clean that up.
      
        Other than that a driver is added for Apple devices and various small
        fixes are included for existing drivers.
      
        Last but not least, this finally gets rid of the old pwm_request() and
        pwm_free() APIs are removed since the last user was dropped in v6.3"
      
      * tag 'pwm/for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (44 commits)
        pwm: Remove unused radix tree
        pwm: Delete deprecated functions pwm_request() and pwm_free()
        pwm: meson: Fix g12a ao clk81 name
        pwm: meson: Fix axg ao mux parents
        pwm: stm32: Enforce settings for PWM capture
        MAINTAINERS: Add entries for Apple PWM driver
        pwm: Add Apple PWM controller
        dt-bindings: pwm: Add Apple PWM controller
        pwm: mtk-disp: Configure double buffering before reading in .get_state()
        pwm: mtk-disp: Disable shadow registers before setting backlight values
        pwm: stm32-lp: Drop of_match_ptr for ID table
        pwm: rcar: Drop of_match_ptr for ID table
        dt-bindings: pwm: Convert Amlogic Meson PWM binding
        dt-bindings: pwm: mediatek: Add mediatek,mt7986 compatible
        pwm: xilinx: Convert to platform remove callback returning void
        pwm: vt8500: Convert to platform remove callback returning void
        pwm: tiehrpwm: Convert to platform remove callback returning void
        pwm: tiecap: Convert to platform remove callback returning void
        pwm: tegra: Convert to platform remove callback returning void
        pwm: sun4i: Convert to platform remove callback returning void
        ...
      89b7fd5d
    • Linus Torvalds's avatar
      Merge tag 'soundwire-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire · 4c9818d8
      Linus Torvalds authored
      Pull soundwire updates from Vinod Koul:
       "This features AMD soundwire controller driver, a bunch of Intel
        changes for future platform support, sdw API updates etc:
      
         - Support for AMD soundwire controller
      
         - Intel driver updates to support future platforms
      
         - Core API sdw_nread/nwrite_no_pm updates to handle page boundaries"
      
      * tag 'soundwire-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: (38 commits)
        soundwire: intel_auxdevice: improve pm_prepare step
        soundwire: bus: Fix unbalanced pm_runtime_put() causing usage count underflow
        soundwire: intel: don't save hw_params for use in prepare
        soundwire: bus: Update sdw_nread/nwrite_no_pm to handle page boundaries
        soundwire: bus: Update kernel doc for no_pm functions
        soundwire: bus: Remove now outdated comments on no_pm IO
        soundwire: stream: uniquify dev_err() logs
        soundwire: stream: remove bus->dev from logs on multiple buses
        soundwire: amd: add pm_prepare callback and pm ops support
        soundwire: amd: handle SoundWire wake enable interrupt
        soundwire: amd: add runtime pm ops for AMD SoundWire manager driver
        soundwire: amd: add SoundWire manager interrupt handling
        soundwire: amd: enable build for AMD SoundWire manager driver
        soundwire: amd: register SoundWire manager dai ops
        soundwire: amd: Add support for AMD Manager driver
        soundwire: export sdw_compute_slave_ports() function
        soundwire: stream: restore cumulative bus bandwidth when compute_params callback failed
        soundwire: bandwidth allocation: Use hweight32() to calculate set bits
        soundwire: qcom: gracefully handle too many ports in DT
        soundwire: qcom: define hardcoded version magic numbers
        ...
      4c9818d8
    • Linus Torvalds's avatar
      Merge tag 'phy-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy · 54bdf8a3
      Linus Torvalds authored
      Pull phy updates from Vinod Koul:
       "New support:
         - UFS PHY for Qualcomm SA8775p, SM7150
         - PCIe 2 lane phy support for sc8180x and PCIe PHY for SDX65
         - Mediatke hdmi phy support for mt8195
         - rockchip naneng combo phy support for RK358
      
        Updates:
         - Drop Thunder Bay eMMC PHY driver
         - RC support for PCIe phy for Qualcomm SDX55
         - SGMII support in WIZ driver for J721E
         - PCIe and multilink SGMII PHY support in cadence driver
         - Big pile of platform remove callback returning void conversions"
      
      * tag 'phy-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (77 commits)
        phy: cadence: cdns-dphy-rx: Add common module reset support
        phy: ti: j721e-wiz: Add SGMII support in WIZ driver for J721E
        dt-bindings: phy: ti: phy-gmii-sel: Add support for J784S4 CPSW9G
        phy: ti: j721e-wiz: Fix unreachable code in wiz_mode_select()
        phy: cadence: Sierra: Add PCIe + SGMII PHY multilink configuration
        phy: mediatek: add support for phy-mtk-hdmi-mt8195
        phy: phy-mtk-hdmi: Add generic phy configure callback
        dt-bindings: phy: mediatek: hdmi-phy: Add mt8195 compatible
        phy: tegra: xusb: Add missing tegra_xusb_port_unregister for usb2_port and ulpi_port
        dt-bindings: phy: ti,phy-j721e-wiz: document clock-output-names
        dt-bindings: phy: ti,phy-j721e-wiz: drop assigned-clocks
        dt-bindings: phy: ti,phy-am654-serdes: drop assigned-clocks type
        dt-bindings: phy: cadence-torrent: drop assigned-clocks
        dt-bindings: phy: cadence-sierra: drop assigned-clocks
        phy: rockchip: remove unused hw_to_inno function
        phy: qualcomm: phy-qcom-qmp-ufs: add definitions for sa8775p
        dt-bindings: phy: qmp-ufs: describe the UFS PHY for sa8775p
        phy: qcom-qmp-pcie: drop sdm845_qhp_pcie_rx_tbl
        phy: qcom-qmp-pcie: sc8180x PCIe PHY has 2 lanes
        phy: qcom-qmp-ufs: Add SM7150 support
        ...
      54bdf8a3
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine · 7994beab
      Linus Torvalds authored
      Pull dmaengine updates from Vinod Koul:
       "New support:
      
         - Apple admac t8112 device support
      
         - StarFive JH7110 DMA controller
      
        Updates:
      
         - Big pile of idxd updates to support IAA 2.0 device capabilities,
           DSA 2.0 Event Log and completion record faulting features and
           new DSA operations
      
         - at_xdmac supend & resume updates and driver code cleanup
      
         - k3-udma supend & resume support
      
         - k3-psil thread support for J784s4"
      
      * tag 'dmaengine-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (57 commits)
        dmaengine: idxd: add per wq PRS disable
        dmaengine: idxd: add pid to exported sysfs attribute for opened file
        dmaengine: idxd: expose fault counters to sysfs
        dmaengine: idxd: add a device to represent the file opened
        dmaengine: idxd: add per file user counters for completion record faults
        dmaengine: idxd: process batch descriptor completion record faults
        dmaengine: idxd: add descs_completed field for completion record
        dmaengine: idxd: process user page faults for completion record
        dmaengine: idxd: add idxd_copy_cr() to copy user completion record during page fault handling
        dmaengine: idxd: create kmem cache for event log fault items
        dmaengine: idxd: add per DSA wq workqueue for processing cr faults
        dmanegine: idxd: add debugfs for event log dump
        dmaengine: idxd: add interrupt handling for event log
        dmaengine: idxd: setup event log configuration
        dmaengine: idxd: add event log size sysfs attribute
        dmaengine: idxd: make misc interrupt one shot
        dt-bindings: dma: snps,dw-axi-dmac: constrain the items of resets for JH7110 dma
        dt-bindings: dma: Drop unneeded quotes
        dmaengine: at_xdmac: align declaration of ret with the rest of variables
        dmaengine: at_xdmac: add a warning message regarding for unpaused channels
        ...
      7994beab
    • Linus Torvalds's avatar
      Merge tag 'for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pateldipen1984/linux · 29ee463d
      Linus Torvalds authored
      Pull hardware timestamp engine updates from Dipen Patel:
       "The changes for the hte subsystem include:
      
         - Add Tegra234 HTE provider and relevant DT bindings
      
         - Update MAINTAINERS file for the HTE subsystem"
      
      * tag 'for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pateldipen1984/linux:
        hte: tegra-194: Use proper includes
        hte: Use device_match_of_node()
        hte: tegra-194: Fix off by one in tegra_hte_map_to_line_id()
        hte: tegra: fix 'struct of_device_id' build error
        hte: Use of_property_present() for testing DT property presence
        gpio: tegra186: Add Tegra234 hte support
        hte: handle nvidia,gpio-controller property
        hte: Deprecate nvidia,slices property
        hte: Add Tegra234 provider
        hte: Re-phrase tegra API document
        arm64: tegra: Add Tegra234 GTE nodes
        dt-bindings: timestamp: Deprecate nvidia,slices property
        dt-bindings: timestamp: Add Tegra234 support
        MAINTAINERS: Add HTE/timestamp subsystem details
      29ee463d
    • Helge Deller's avatar
      parisc: Fix argument pointer in real64_call_asm() · 6e3220ba
      Helge Deller authored
      Fix the argument pointer (ap) to point to real-mode memory
      instead of virtual memory.
      
      It's interesting that this issue hasn't shown up earlier, as this could
      have happened with any 64-bit PDC ROM code.
      
      I just noticed it because I suddenly faced a HPMC while trying to execute
      the 64-bit STI ROM code of an Visualize-FXe graphics card for the STI
      text console.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Cc: <stable@vger.kernel.org>
      6e3220ba
    • John David Anglin's avatar
      parisc: Cleanup mmap implementation regarding color alignment · 567b3515
      John David Anglin authored
      This change simplifies the randomization of file mapping regions. It
      reworks the code to remove duplication. The flow is now similar to
      that for mips. Finally, we consistently use the do_color_align variable
      to determine when color alignment is needed.
      
      Tested on rp3440.
      Signed-off-by: default avatarJohn David Anglin <dave.anglin@bell.net>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      567b3515
    • Helge Deller's avatar
      653f3ea7
    • Helge Deller's avatar
      parisc: Ensure page alignment in flush functions · d755bd2c
      Helge Deller authored
      Matthew Wilcox noticed, that if ARCH_HAS_FLUSH_ON_KUNMAP is defined
      (which is the case for PA-RISC), __kunmap_local() calls
      kunmap_flush_on_unmap(), which may call the parisc flush functions with
      a non-page-aligned address and thus the page might not be fully flushed.
      
      This patch ensures that flush_kernel_dcache_page_asm() and
      flush_kernel_dcache_page_asm() will always operate on page-aligned
      addresses.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Cc: <stable@vger.kernel.org> # v6.0+
      d755bd2c
    • Guilherme G. Piccoli's avatar
      parisc: Replace regular spinlock with spin_trylock on panic path · 829632da
      Guilherme G. Piccoli authored
      The panic notifiers' callbacks execute in an atomic context, with
      interrupts/preemption disabled, and all CPUs not running the panic
      function are off, so it's very dangerous to wait on a regular
      spinlock, there's a risk of deadlock.
      
      Refactor the panic notifier of parisc/power driver to make use
      of spin_trylock - for that, we've added a second version of the
      soft-power function. Also, some comments were reorganized and
      trailing white spaces, useless header inclusion and blank lines
      were removed.
      
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeroen Roovers <jer@xs4all.nl>
      Acked-by: Helge Deller <deller@gmx.de> # parisc
      Signed-off-by: default avatarGuilherme G. Piccoli <gpiccoli@igalia.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      829632da
    • Randy Dunlap's avatar
      parisc: update kbuild doc. aliases for parisc64 · e0838a99
      Randy Dunlap authored
      ARCH=parisc64 is now supported for 64-bit parisc builds, so add
      this alias to the kbuild.rst documentation.
      
      Fixes: 3dcfb729 ("parisc: Make CONFIG_64BIT available for ARCH=parisc64 only")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Helge Deller <deller@gmx.de>
      Cc: linux-parisc@vger.kernel.org
      Cc: Masahiro Yamada <masahiroy@kernel.org>
      Cc: linux-kbuild@vger.kernel.org
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: linux-doc@vger.kernel.org
      Acked-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      e0838a99
    • Helge Deller's avatar
      parisc: Limit amount of kgdb breakpoints on parisc · 82da62ab
      Helge Deller authored
      kgdb is rarely used and 40 breakpoints seems enough to debug
      parisc specific bugs.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      82da62ab
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-sleep' · 57ea3ab2
      Rafael J. Wysocki authored
      Merge hibernation test mode fix for 6.4-rc1.
      
      * pm-sleep:
        PM: hibernate: Do not get block device exclusively in test_resume mode
        PM: hibernate: Turn snapshot_test into global variable
      57ea3ab2
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-pm' and 'acpi-properties' · 2e70a47c
      Rafael J. Wysocki authored
      Merge an ACPI power management quirk and a change related to the
      handling of ACPI device properties for 6.4-rc1:
      
       - Do not turn off unused power resources during initialization on the
         Toshiba Click Mini (Hans de Goede).
      
       - Support strings in device properties supplied by ACPI _DSM on Apple
         platforms (Hector Martin).
      
      * acpi-pm:
        ACPI: PM: Do not turn of unused power resources on the Toshiba Click Mini
      
      * acpi-properties:
        ACPI: property: Support strings in Apple _DSM props
      2e70a47c
    • Rafael J. Wysocki's avatar
      Merge branch 'thermal-core' · 53389edd
      Rafael J. Wysocki authored
      Merge additional thermal core and ACPI thermal changes for 6.4-rc1:
      
       - Clean up the step-wise thermal governor (Zhang Rui).
      
       - Introduce thermal_zone_device() for accessing the device field of
         struct thermal_zone_device and two drivers use it (Daniel Lezcano).
      
       - Clean up the ACPI thermal driver a bit (Daniel Lezcano).
      
       - Delete the thermal driver for Intel Menlow platforms that is not
         expected to have any users (Rafael Wysocki).
      
      * thermal-core:
        thermal: intel: menlow: Get rid of this driver
        ACPI: thermal: Move to dedicated function sysfs extra attr creation
        ACPI: thermal: Use thermal_zone_device()
        thermal: intel: pch_thermal: Use thermal driver device to write a trace
        thermal: core: Encapsulate tz->device field
        thermal: gov_step_wise: Adjust code logic to match comment
        thermal: gov_step_wise: Delete obsolete comment
      53389edd
    • Arnd Bergmann's avatar
      module: include internal.h in module/dups.c · 0b891c83
      Arnd Bergmann authored
      Two newly introduced functions are declared in a header that is not
      included before the definition, causing a warning with sparse or
      'make W=1':
      
      kernel/module/dups.c:118:6: error: no previous prototype for 'kmod_dup_request_exists_wait' [-Werror=missing-prototypes]
        118 | bool kmod_dup_request_exists_wait(char *module_name, bool wait, int *dup_ret)
            |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      kernel/module/dups.c:220:6: error: no previous prototype for 'kmod_dup_request_announce' [-Werror=missing-prototypes]
        220 | void kmod_dup_request_announce(char *module_name, int ret)
            |      ^~~~~~~~~~~~~~~~~~~~~~~~~
      
      Add an explicit include to ensure the prototypes match.
      
      Fixes: 8660484e ("module: add debugging auto-load duplicate module support")
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Link: https://lore.kernel.org/oe-kbuild-all/202304141440.DYO4NAzp-lkp@intel.com/Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      0b891c83
    • Luis Chamberlain's avatar
      sysctl: remove register_sysctl_paths() · 0199849a
      Luis Chamberlain authored
      The deprecation for register_sysctl_paths() is over. We can rejoice as
      we nuke register_sysctl_paths(). The routine register_sysctl_table()
      was the only user left of register_sysctl_paths(), so we can now just
      open code and move the implementation over to what used to be
      to __register_sysctl_paths().
      
      The old dynamic struct ctl_table_set *set is now the point to
      sysctl_table_root.default_set.
      
      The old dynamic const struct ctl_path *path was being used in the
      routine register_sysctl_paths() with a static:
      
      static const struct ctl_path null_path[] = { {} };
      
      Since this is a null path we can now just simplfy the old routine
      and remove its use as its always empty.
      
      This saves us a total of 230 bytes.
      
      $ ./scripts/bloat-o-meter vmlinux.old vmlinux
      add/remove: 2/7 grow/shrink: 1/1 up/down: 1015/-1245 (-230)
      Function                                     old     new   delta
      register_leaf_sysctl_tables.constprop          -     524    +524
      register_sysctl_table                         22     497    +475
      __pfx_register_leaf_sysctl_tables.constprop       -      16     +16
      null_path                                      8       -      -8
      __pfx_register_sysctl_paths                   16       -     -16
      __pfx_register_leaf_sysctl_tables             16       -     -16
      __pfx___register_sysctl_paths                 16       -     -16
      __register_sysctl_base                        29      12     -17
      register_sysctl_paths                         18       -     -18
      register_leaf_sysctl_tables                  534       -    -534
      __register_sysctl_paths                      620       -    -620
      Total: Before=21259666, After=21259436, chg -0.00%
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      0199849a
    • Luis Chamberlain's avatar
      kernel: pid_namespace: simplify sysctls with register_sysctl() · 9e7c73c0
      Luis Chamberlain authored
      register_sysctl_paths() is only required if your child (directories)
      have entries and pid_namespace does not. So use register_sysctl_init()
      instead where we don't care about the return value and use
      register_sysctl() where we do.
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Acked-by: default avatarJeff Xu <jeffxu@google.com>
      Link: https://lore.kernel.org/r/20230302202826.776286-9-mcgrof@kernel.org
      9e7c73c0
  4. 02 May, 2023 9 commits
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 348551dd
      Linus Torvalds authored
      Pull pin control updates from Linus Walleij:
       "Mostly drivers! Nothing special: some new Qualcomm chips as usual, and
        the new NXP S32 and nVidia BlueField-3.
      
        Core changes:
      
         - Make a lot of pin controllers with GPIO and irqchips immutable,
           i.e. not living structs, but const structs. This is driving a
           changed initiated by the irqchip maintainers.
      
        New drivers:
      
         - New driver for the NXP S32 SoC pin controller
      
         - As part of a thorough cleanup and restructuring of the
           Ralink/Mediatek drivers, the Ralink MIPS pin control drivers were
           folded into the Mediatek directory and the family is renamed
           "mtmips". The Ralink chips live on as Mediatek MIPS family where
           new variants can be added. As part of this work also the device
           tree bindings were reworked.
      
         - New subdriver for the Qualcomm SM7150 SoC.
      
         - New subdriver for the Qualcomm IPQ9574 SoC.
      
         - New driver for the nVidia BlueField-3 SoC.
      
         - Support for the Qualcomm PMM8654AU mixed signal circuit GPIO.
      
         - Support for the Qualcomm PMI632 mixed signal circuit GPIO.
      
        Improvements:
      
         - Add some missing pins and generic cleanups on the Renesas r8a779g0
           and r8a779g0 pin controllers. Generic Renesas extension for power
           source selection on several SoCs.
      
         - Misc cleanups for the Atmel AT91 and AT91-PIO4 pin controllers
      
         - Make the GPIO mode work on the Qualcomm SM8550-lpass-lpi driver.
      
         - Several device tree binding cleanups as the binding YAML syntax is
           solidifying"
      
      * tag 'pinctrl-v6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (153 commits)
        pinctrl-bcm2835.c: fix race condition when setting gpio dir
        dt-bindings: pinctrl: qcom,sm8150: Drop duplicate function value "atest_usb2"
        dt-bindings: pinctrl: qcom: Add few missing functions
        pinctrl: qcom: spmi-gpio: Add PMI632 support
        dt-bindings: pinctrl: qcom,pmic-gpio: add PMI632
        pinctrl: wpcm450: select MFD_SYSCON
        pinctrl: qcom ssbi-gpio: Convert to immutable irq_chip
        pinctrl: qcom ssbi-mpp: Convert to immutable irq_chip
        pinctrl: qcom spmi-mpp: Convert to immutable irq_chip
        pinctrl: plgpio: Convert to immutable irq_chip
        pinctrl: pistachio: Convert to immutable irq_chip
        pinctrl: pic32: Convert to immutable irq_chip
        pinctrl: sx150x: Convert to immutable irq_chip
        pinctrl: stmfx: Convert to immutable irq_chip
        pinctrl: st: Convert to immutable irq_chip
        pinctrl: mcp23s08: Convert to immutable irq_chip
        pinctrl: equilibrium: Convert to immutable irq_chip
        pinctrl: npcm7xx: Convert to immutable irq_chip
        pinctrl: armada-37xx: Convert to immutable irq_chip
        pinctrl: nsp: Convert to immutable irq_chip
        ...
      348551dd
    • Linus Torvalds's avatar
      Merge tag 'vfio-v6.4-rc1' of https://github.com/awilliam/linux-vfio · 7df047b3
      Linus Torvalds authored
      Pull VFIO updates from Alex Williamson:
      
       - Expose and allow R/W access to the PCIe DVSEC capability through
         vfio-pci, as we already do with the legacy vendor capability
         (K V P Satyanarayana)
      
       - Fix kernel-doc issues with structure definitions (Simon Horman)
      
       - Clarify ordering of operations relative to the kvm-vfio device for
         driver dependencies against the kvm pointer (Yi Liu)
      
      * tag 'vfio-v6.4-rc1' of https://github.com/awilliam/linux-vfio:
        docs: kvm: vfio: Suggest KVM_DEV_VFIO_GROUP_ADD vs VFIO_GROUP_GET_DEVICE_FD ordering
        vfio: correct kdoc for ops structures
        vfio/pci: Add DVSEC PCI Extended Config Capability to user visible list.
      7df047b3
    • Linus Torvalds's avatar
      Merge tag 'afs-fixes-20230502' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs · 21d2be64
      Linus Torvalds authored
      Pull AFS updates from David Howells:
       "Three fixes to AFS directory handling:
      
         - Make sure that afs_read_dir() sees any increase in file size if the
           file unexpectedly changed on the server (e.g. due to another client
           making a change).
      
         - Make afs_getattr() always return the server's dir file size, not
           the locally edited one, so that pagecache eviction doesn't cause
           the dir file size to change unexpectedly.
      
         - Prevent afs_read_dir() from getting into an endless loop if the
           server indicates that the directory file size is larger than
           expected"
      
      * tag 'afs-fixes-20230502' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
        afs: Avoid endless loop if file is larger than expected
        afs: Fix getattr to report server i_size on dirs, not local size
        afs: Fix updating of i_size with dv jump from server
      21d2be64
    • Linus Torvalds's avatar
      Merge tag 'backlight-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight · d7b3ffe2
      Linus Torvalds authored
      Pull backlight updates from Lee Jones:
       "Fix-ups:
         - Add / improve Device Tree bindings
         - Convert (int) .remove functions to (void) .remove_new
         - Rid 'defined but not used' warnings
         - Remove ineffective casts and pointer stubs
         - Use specifically crafted API for testing DT property presence"
      
      * tag 'backlight-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
        backlight: as3711: Use of_property_read_bool() for boolean properties
        backlight: hx8357: Use of_property_present() for testing DT property presence
        backlight: arcxcnn_bl: Drop of_match_ptr for ID table
        backlight: lp855x: Mark OF related data as maybe unused
        backlight: sky81452-backlight: Convert to platform remove callback returning void
        backlight: rt4831-backlight: Convert to platform remove callback returning void
        backlight: qcom-wled: Convert to platform remove callback returning void
        backlight: pwm_bl: Convert to platform remove callback returning void
        backlight: mt6370-backlight: Convert to platform remove callback returning void
        backlight: lp8788_bl: Convert to platform remove callback returning void
        backlight: lm3533_bl: Convert to platform remove callback returning void
        backlight: led_bl: Convert to platform remove callback returning void
        backlight: hp680_bl: Convert to platform remove callback returning void
        backlight: da9052_bl: Convert to platform remove callback returning void
        backlight: cr_bllcd: Convert to platform remove callback returning void
        backlight: adp5520_bl: Convert to platform remove callback returning void
        backlight: aat2870_bl: Convert to platform remove callback returning void
        backlight: qcom-wled: Add PMI8950 compatible
      d7b3ffe2
    • Linus Torvalds's avatar
      Merge tag 'mfd-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd · 3af49062
      Linus Torvalds authored
      Pull MFD updates from Lee Jones:
       "New Drivers:
         - Add support for  Renesas RZ/G2L MTU3
      
        New Device Support:
         - Add support for Lenovo Yoga Book X90F to Intel CHT WC
         - Add support for MAX5970 and MAX5978 to Simple MFD (I2C)
         - Add support for Meteor Lake PCH-S LPSS PCI to Intel LPSS PCI
         - Add support for AXP15060 PMIC to X-Powers PMIC collection
      
        Remove Device Support:
         - Remove support for Samsung 5M8751 and S5M8763 PMIC devices
      
        New Functionality:
         - Convert deprecated QCOM IRQ Chip to config registers
         - Add support for 32-bit address spaces to Renesas SMUs
      
        Fix-ups:
         - Make use of APIs / MACROs designed to simplify and demystify
         - Add / improve Device Tree bindings
         - Memory saving struct layout optimisations
         - Remove old / deprecated functionality
         - Factor out unassigned register addresses from ranges
         - Trivial: Spelling fixes, renames and coding style fixes
         - Rid 'defined but not used' warnings
         - Remove ineffective casts and pointer stubs
      
        Bug Fixes:
         - Fix incorrectly non-inverted mask/unmask IRQs on QCOM platforms
         - Remove MODULE_*() helpers from non-tristate drivers
         - Do not attempt to use out-of-range memory addresses associated with io_base
         - Provide missing export helpers
         - Fix remap bulk read optimisation fallout
         - Fix memory leak issues in error paths"
      
      * tag 'mfd-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (88 commits)
        dt-bindings: mfd: ti,j721e-system-controller: Add SoC chip ID
        leds: bd2606mvv: Driver for the Rohm 6 Channel i2c LED driver
        dt-bindings: mfd: qcom,spmi-pmic: Document flash LED controller
        dt-bindings: mfd: x-powers,axp152: Document the AXP15060 variant
        mfd: axp20x: Add support for AXP15060 PMIC
        dt-bindings: mfd: x-powers,axp152: Document the AXP313a variant
        counter: rz-mtu3-cnt: Unlock on error in rz_mtu3_count_ceiling_write()
        dt-bindings: mfd: dlg,da9063: Document voltage monitoring
        dt-bindings: mfd: stm32: Remove unnecessary blank lines
        dt-bindings: mfd: qcom,spmi-pmic: Use generic ADC node name in examples
        dt-bindings: mfd: syscon: Add nuvoton,ma35d1-sys compatible
        MAINTAINERS: Add entries for Renesas RZ/G2L MTU3a counter driver
        counter: Add Renesas RZ/G2L MTU3a counter driver
        Documentation: ABI: sysfs-bus-counter: add cascade_counts_enable and external_input_phase_clock_select
        mfd: Add Renesas RZ/G2L MTU3a core driver
        dt-bindings: timer: Document RZ/G2L MTU3a bindings
        mfd: rsmu_i2c: Convert to i2c's .probe_new() again
        mfd: intel-lpss: Add Intel Meteor Lake PCH-S LPSS PCI IDs
        mfd: dln2: Fix memory leak in dln2_probe()
        mfd: axp20x: Fix axp288 writable-ranges
        ...
      3af49062
    • Linus Torvalds's avatar
      Merge tag 'leds-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds · c5eb8bf7
      Linus Torvalds authored
      Pull LED updates from Lee Jones:
       "New Drivers:
         - Add support for MediaTek MT6370 LED Indicator
         - Add support for MediaTek MT6370 Flashlight
         - Add support for QCOM PMIC Flash
         - Add support for Rohm BD2606MVV Charge Pump LED
      
        New Device Support:
         - Add support for PMK8550 PWM to QCOM LPG
      
        New Functionality:
         - Add support for high resolution PWM to QCOM LPG
      
        Fix-ups:
         - Kconfig 'depends' and 'select' dependency changes
         - Remove unused / irrelevant includes
         - Remove unnecessary checks (already performed further into the call stack)
         - Trivial: Fix commentary, simplify error messages
         - Rid 'defined but not used' warnings
         - Provide documentation
         - Explicitly provide include files
      
        Bug Fixes:
         - Mark GPIO LED as BROKEN
         - Fix Kconfig entries
         - Fix various Smatch staticify reports
         - Fix error handling (or a lack there of)"
      
      * tag 'leds-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (30 commits)
        leds: bd2606mvv: Driver for the Rohm 6 Channel i2c LED driver
        dt-bindings: leds: Add ROHM BD2606MVV LED
        docs: leds: ledtrig-oneshot: Fix spelling mistake
        leds: pwm-multicolor: Simplify an error message
        dt-bindings: leds: Convert PCA9532 to dtschema
        leds: rgb: leds-qcom-lpg: Add support for PMK8550 PWM
        leds: rgb: leds-qcom-lpg: Add support for high resolution PWM
        dt-bindings: leds-qcom-lpg: Add qcom,pmk8550-pwm compatible string
        leds: tca6507: Fix error handling of using fwnode_property_read_string
        leds: flash: Set variables mvflash_{3,4}ch_regs storage-class-specifier to static
        leds: rgb: mt6370: Correct config name to select in LEDS_MT6370_RGB
        MAINTAINERS: Add entry for LED devices documentation
        Documentation: leds: MT6370: Use bullet lists for timing variables
        Documentation: leds: mt6370: Properly wrap hw_pattern chart
        Documentation: leds: Add MT6370 doc to the toctree
        leds: rgb: mt6370: Fix implicit declaration for FIELD_GET
        docs: leds: Add MT6370 RGB LED pattern document
        leds: flash: mt6370: Add MediaTek MT6370 flashlight support
        leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support
        dt-bindings: leds: spmi-flash-led: Add pm6150l compatible
        ...
      c5eb8bf7
    • Marc Dionne's avatar
      afs: Avoid endless loop if file is larger than expected · 9ea4eff4
      Marc Dionne authored
      afs_read_dir fetches an amount of data that's based on what the inode
      size is thought to be.  If the file on the server is larger than what
      was fetched, the code rechecks i_size and retries.  If the local i_size
      was not properly updated, this can lead to an endless loop of fetching
      i_size from the server and noticing each time that the size is larger on
      the server.
      
      If it is known that the remote size is larger than i_size, bump up the
      fetch size to that size.
      
      Fixes: f3ddee8d ("afs: Fix directory handling")
      Signed-off-by: default avatarMarc Dionne <marc.dionne@auristor.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: linux-afs@lists.infradead.org
      9ea4eff4
    • David Howells's avatar
      afs: Fix getattr to report server i_size on dirs, not local size · 45f66fa0
      David Howells authored
      Fix afs_getattr() to report the server's idea of the file size of a
      directory rather than the local size.  The local size may differ as we edit
      the local copy to avoid having to redownload it and we may end up with a
      differently structured blob of a different size.
      
      However, if the directory is discarded from the pagecache we then download
      it again and the user may see the directory file size apparently change.
      
      Fixes: 63a4681f ("afs: Locally edit directory data for mkdir/create/unlink/...")
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: Marc Dionne <marc.dionne@auristor.com>
      cc: linux-afs@lists.infradead.org
      45f66fa0
    • Marc Dionne's avatar
      afs: Fix updating of i_size with dv jump from server · d7f74e9a
      Marc Dionne authored
      If the data version returned from the server is larger than expected,
      the local data is invalidated, but we may still want to note the remote
      file size.
      
      Since we're setting change_size, we have to also set data_changed
      for the i_size to get updated.
      
      Fixes: 3f4aa981 ("afs: Fix EOF corruption")
      Signed-off-by: default avatarMarc Dionne <marc.dionne@auristor.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: linux-afs@lists.infradead.org
      d7f74e9a