]> git.ipfire.org Git - thirdparty/kernel/linux.git/log
thirdparty/kernel/linux.git
9 months agoMerge tag 'scmi-updates-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Mon, 2 Sep 2024 10:20:13 +0000 (10:20 +0000)] 
Merge tag 'scmi-updates-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers

Arm SCMI updates for v6.12

Few main features include:

1. SCMI transport as stand-alone drivers

    Currently the SCMI transport layer is being built embedded into in
    the core SCMI stack. Some of these transports, despite being currently
    part of the main SCMI module, are indeed also registered with different
    subsystems like optee or virtio, and actively probed also by those.
    This leads to a few awkward and convoluted tricks to properly handle
    such interactions at boot time in the SCMI stack.

    This change adds the new logic to the core SCMI stack so that each
    existing transport is transitioned to be a standi-alone driver. With
    that all the probe deferral and awkward retries between the SCMI
    core stack and the transports has been removed, since no more needed.

2. Support for obtaining transport descriptors from the devicetree

    SCMI platform firmwares might have different designs depending on
    the platform. Some of the transport descriptors rely on such design.
    E.g. the maximum receive channel timeout value might vary depending
    on the specific underlying hardware and firmware design choices.

    This change adds support for max-rx-timeout-ms property to describe
    the transport needs of a specific platform design. It will be extended
    in the future to obtain other such hardware/firmware dependent
    transport related descriptors.

3. NXP i.MX95 specific SCMI vendor protocol extensions

    SCMI specification allows vendor or platform-specific extensions to
    the interface. NXP i.MX95 System Manager(SM) that implements SCMI
    extends the interface to implement couple of vendor/platform specific
    protocol, namely:
    a. Battery Backed Module(BBM) Protocol

       This protocol is intended provide access to the battery-backed
       module. This contains persistent storage (GPR), an RTC, and the
       ON/OFF button. The protocol can also provide access to similar
       functions implemented via external board components.

    b. MISC Protocol for misc settings

        This includes controls that are misc settings/actions that must
be exposed from the SM to agents. They are device specific and
are usually define to access bit fields in various mix block
control modules, IOMUX_GPR, and other GPR/CSR owned by the SM.

4. SCMI debug/tracking metrics

    Since SCMI involves interaction with the entity(software, firmware
    and/or hardware) providing services or features, it is quite useful
    to track certain metrics(for pure debugging purposes) like how many
    messages were sent or received, were there any failures, what kind
    of failures, ..etc. This feature adds support for the same via debugfs.

Apart from these main features, there are some miscellaneous updates, fixes
and cleanups.

* tag 'scmi-updates-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: (31 commits)
  rtc: support i.MX95 BBM RTC
  input: keyboard: support i.MX95 BBM module
  firmware: imx: Add i.MX95 MISC driver
  firmware: arm_scmi: Add initial support for i.MX MISC protocol
  firmware: arm_scmi: Add initial support for i.MX BBM protocol
  firmware: arm_scmi: Add NXP i.MX95 SCMI documentation
  dt-bindings: firmware: Add i.MX95 SCMI Extension protocol
  firmware: arm_scmi: Replace comma with the semicolon
  firmware: arm_scmi: Replace the use of of_node_put() to __free(device_node)
  firmware: arm_scmi: Fix trivial whitespace/coding style issues
  firmware: arm_scmi: Use max-rx-timeout-ms from devicetree
  dt-bindings: firmware: arm,scmi: Introduce property max-rx-timeout-ms
  firmware: arm_scmi: Remove const from transport descriptors
  firmware: arm_scmi: Simplify with scoped for each OF child loop
  firmware: arm_scmi: Update various protocols versions
  firmware: arm_scmi: Remove legacy transport-layer code
  firmware: arm_scmi: Make VirtIO transport a standalone driver
  firmware: arm_scmi: Make OPTEE transport a standalone driver
  firmware: arm_scmi: Make SMC transport a standalone driver
  firmware: arm_scmi: Make MBOX transport a standalone driver
  ...

Link: https://lore.kernel.org/r/20240830135918.2383664-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agoMerge tag 'ffa-updates-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sudee...
Arnd Bergmann [Mon, 2 Sep 2024 10:18:44 +0000 (10:18 +0000)] 
Merge tag 'ffa-updates-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers

Arm FF-A updates for v6.12

The main addition this time is the basic support for FF-A v1.2
specification which includes support for newly added:
1. FFA_MSG_SEND_DIRECT_{REQ,RESP}2
2. FFA_PARTITION_INFO_GET_REGS
3. FFA_YIELD support in direct messaging

Apart from these, the changes include support to fetch the Rx/Tx buffer
size using FFA_FEATURES, addition of the FF-A FIDs for v1.2 and some
coding style cleanups.

* tag 'ffa-updates-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_ffa: Fetch the Rx/Tx buffer size using ffa_features()
  firmware: arm_ffa: Add support for FFA_YIELD in direct messaging
  firmware: arm_ffa: Add support for FFA_MSG_SEND_DIRECT_{REQ,RESP}2
  firmware: arm_ffa: Add support for FFA_PARTITION_INFO_GET_REGS
  firmware: arm_ffa: Move the function ffa_features() earlier
  firmware: arm_ffa: Update the FF-A command list with v1.2 additions
  firmware: arm_ffa: Some coding style fixes

Link: https://lore.kernel.org/r/20240830135759.2383431-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agoMerge tag 'versatile-soc-for-v6.12' of https://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Mon, 2 Sep 2024 10:17:33 +0000 (10:17 +0000)] 
Merge tag 'versatile-soc-for-v6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into soc/drivers

Some long due cleanups and modernizations of the Versatile
SoC drivers from Krzysztof:

- Put OF handle
- Use devres to avoid memory leaks
- Enable compile testing

* tag 'versatile-soc-for-v6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator:
  soc: versatile: enable compile testing
  soc: versatile: realview: fix soc_dev leak during device remove
  soc: versatile: realview: fix memory leak during device remove
  soc: versatile: integrator: fix OF node leak in probe() error path

Link: https://lore.kernel.org/r/CACRpkda244rFHnnXPDPOhmKiJsRP08tNCcfFzpH5zR2cx1DFpw@mail.gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agoMerge tag 'v6.12-rockchip-drivers-1' of https://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Mon, 2 Sep 2024 09:47:47 +0000 (09:47 +0000)] 
Merge tag 'v6.12-rockchip-drivers-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/drivers

rk3308 io-domains, and some default settings for bits in the general
register files for rk3128 and the new rk3576 soc.

* tag 'v6.12-rockchip-drivers-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  soc: rockchip: grf: Add rk3576 default GRF values
  dt-bindings: soc: rockchip: Add rk3576 syscon compatibles
  soc: rockchip: grf: Set RK3128's vpu main clock
  soc: rockchip: io-domain: Add RK3308 IO voltage domains
  dt-bindings: power: rockchip: Document RK3308 IO voltage domains

Link: https://lore.kernel.org/r/23316481.ssLaC8jLEa@diego
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agoMerge tag 'memory-controller-drv-6.12' of https://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Mon, 2 Sep 2024 09:45:17 +0000 (09:45 +0000)] 
Merge tag 'memory-controller-drv-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers

Memory controller drivers for v6.12

1. Tegra210 EMC: Driver refactoring and rework.
2. Tegra186 EMC: Drop unused function.
3. FSL WEIM: Correct fsl,weim-cs-timing property to properly validate it
   as an array.
4. TI AEMIF: Drop platform data support.
5. TI EMIF: Switch to of_property_read_bool().

6. Several cleanups in multiple drivers: TI AEMIF and EMIF, Tegra
   EMC/MC, Atmel EBI, Samsung Exynos5422 DMC, STM32 FMC2 EBI, OMAP GPMC,
   PL172 and PL1353 SMC.  These are mostly code simplifying around
   probe() like using
    - devm_clk_get_enabled(),
    - dev_err_probe(),
    - scoped device node handling (cleanup.h),
    - scoped for each OF child loops,
    - scoped/guard locks.

* tag 'memory-controller-drv-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: (35 commits)
  memory: mtk-smi: Use devm_clk_get_enabled()
  memory: pl353-smc: simplify with devm_clk_get_enabled()
  memory: pl353-smc: simplify with dev_err_probe()
  memory: pl172: simplify with devm_clk_get_enabled()
  memory: pl172: simplify with dev_err_probe()
  memory: omap-gpmc: simplify locking with guard()
  memory: emif: simplify locking with guard()
  memory: emif: drop unused 'irq_state' member
  memory: ti-aemif: Revert "memory: ti-aemif: don't needlessly iterate over child nodes"
  memory: ti-aemif: simplify with scoped for each OF child loop
  memory: ti-aemif: simplify with dev_err_probe()
  memory: tegra30-emc: simplify with scoped for each OF child loop
  memory: tegra20-emc: simplify with scoped for each OF child loop
  memory: tegra124-emc: simplify with scoped for each OF child loop
  memory: tegra-mc: simplify with scoped for each OF child loop
  memory: stm32-fmc2-ebi: simplify with dev_err_probe()
  memory: stm32-fmc2-ebi: simplify with scoped for each OF child loop
  memory: samsung: exynos5422-dmc: use scoped device node handling to simplify error paths
  memory: samsung: exynos5422-dmc: simplify dmc->dev usage
  memory: atmel-ebi: simplify with scoped for each OF child loop
  ...

Link: https://lore.kernel.org/r/20240827122926.30794-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agoMerge tag 'samsung-drivers-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Mon, 2 Sep 2024 09:44:21 +0000 (09:44 +0000)] 
Merge tag 'samsung-drivers-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/drivers

Samsung SoC drivers for v6.12

1. Improve Samsung USI (Universal Serial Interface) DT binding,
2. Cleanup old Samsung MFC TXT binding.

* tag 'samsung-drivers-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  dt-bindings: media: s5p-mfc: Remove s5p-mfc.txt binding
  dt-bindings: samsung: exynos-usi: add missing constraints

Link: https://lore.kernel.org/r/20240827121638.29707-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agofirmware: turris-mox-rwtm: Deduplicate command execution code
Marek Behún [Sat, 31 Aug 2024 09:20:50 +0000 (11:20 +0200)] 
firmware: turris-mox-rwtm: Deduplicate command execution code

Deduplicate rWTM command execution calls
  mbox_send_message()
  wait_for_completion()
  mox_get_status()
to one function
  mox_rwtm_exec()

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-17-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agofirmware: turris-mox-rwtm: Use ALIGN() instead of hardcoding
Marek Behún [Sat, 31 Aug 2024 09:20:49 +0000 (11:20 +0200)] 
firmware: turris-mox-rwtm: Use ALIGN() instead of hardcoding

Use ALIGN(max, 4) instead of hardcoding ((max + 3) & ~3).

Signed-off-by: Marek Behún <kabel@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-16-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agofirmware: turris-mox-rwtm: Use EOPNOTSUPP instead of ENOSYS
Marek Behún [Sat, 31 Aug 2024 09:20:48 +0000 (11:20 +0200)] 
firmware: turris-mox-rwtm: Use EOPNOTSUPP instead of ENOSYS

Checkpatch warns agains -ENOSYS:
  WARNING: ENOSYS means 'invalid syscall nr' and nothing else
Use EOPNOTSUPP instead.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-15-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agofirmware: turris-mox-rwtm: Use container_of() instead of hwrng .priv member
Marek Behún [Sat, 31 Aug 2024 09:20:47 +0000 (11:20 +0200)] 
firmware: turris-mox-rwtm: Use container_of() instead of hwrng .priv member

Use container_of() to get driver private structure from hwnrg structure,
instead of the hwrng's .priv member, as suggested by Herbert for another
driver.

Link: https://lore.kernel.org/soc/ZmLhQBdmg613KdET@gondor.apana.org.au/
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-14-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agofirmware: turris-mox-rwtm: Use devm_mutex_init() instead of mutex_init()
Marek Behún [Sat, 31 Aug 2024 09:20:46 +0000 (11:20 +0200)] 
firmware: turris-mox-rwtm: Use devm_mutex_init() instead of mutex_init()

Use devm_mutex_init() instead of mutex_init(), to properly call
mutex_destroy() on probe failure / driver unbind.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-13-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agofirmware: turris-mox-rwtm: Drop redundant device pointer
Marek Behún [Sat, 31 Aug 2024 09:20:45 +0000 (11:20 +0200)] 
firmware: turris-mox-rwtm: Drop redundant device pointer

Drop redundant device pointer from driver's private structure.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-12-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agofirmware: turris-mox-rwtm: Use dev_err_probe() where possible
Marek Behún [Sat, 31 Aug 2024 09:20:44 +0000 (11:20 +0200)] 
firmware: turris-mox-rwtm: Use dev_err_probe() where possible

Use dev_err_probe() where possible in the driver's .probe() method.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-11-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agofirmware: turris-mox-rwtm: Convert rest to devm_* and get rid of driver .remove()
Marek Behún [Sat, 31 Aug 2024 09:20:43 +0000 (11:20 +0200)] 
firmware: turris-mox-rwtm: Convert rest to devm_* and get rid of driver .remove()

Use devm resource management for driver's mailbox. This allows us to get
rid of the driver's .remove() method and the gotos in .probe().

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-10-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agofirmware: turris-mox-rwtm: Simplify debugfs code
Marek Behún [Sat, 31 Aug 2024 09:20:42 +0000 (11:20 +0200)] 
firmware: turris-mox-rwtm: Simplify debugfs code

Simplify debugfs code: do not check for errors, as debugfs errors should
be ignored, and use devm action for dropping the debugfs directory.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-9-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agofirmware: turris-mox-rwtm: Don't create own kobject type
Marek Behún [Sat, 31 Aug 2024 09:20:41 +0000 (11:20 +0200)] 
firmware: turris-mox-rwtm: Don't create own kobject type

In order to create attribute files in /sys/firmware/turris-mox-rwtm,
this driver creates it's own kobject type.

Simplify this by dropping this own kobject creation, and instead
creating standard device attribute files.

For backwards compatibility with sysfs ABI, create a symlink
/sys/firmware/turris-mox-rwtm, pointing to this device's sysfs
directory.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-8-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agofirmware: turris-mox-rwtm: Use sysfs_emit() instead of sprintf()
Marek Behún [Sat, 31 Aug 2024 09:20:40 +0000 (11:20 +0200)] 
firmware: turris-mox-rwtm: Use sysfs_emit() instead of sprintf()

Use sysfs_emit() instead of sprintf() in sysfs attribute .show()
method.

Signed-off-by: Marek Behún <kabel@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-7-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agofirmware: turris-mox-rwtm: Fix driver includes
Marek Behún [Sat, 31 Aug 2024 09:20:39 +0000 (11:20 +0200)] 
firmware: turris-mox-rwtm: Fix driver includes

Drop including of.h, include several other headers that are used but not
included directly.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-6-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agofirmware: turris-mox-rwtm: Hide signature related constants behind macros
Marek Behún [Sat, 31 Aug 2024 09:20:38 +0000 (11:20 +0200)] 
firmware: turris-mox-rwtm: Hide signature related constants behind macros

Hide signature generation related constants behind macros instead of
hardcoding the values.

Use SHA512_DIGEST_SIZE from crypto/sha2.h instead of hardcoded 64 as the
message size.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-5-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agofirmware: turris-mox-rwtm: Use the boolean type where appropriate
Marek Behún [Sat, 31 Aug 2024 09:20:37 +0000 (11:20 +0200)] 
firmware: turris-mox-rwtm: Use the boolean type where appropriate

Use the boolean type for has_board_info, has_pubkey and last_sig_done
members of the driver's private structure.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-4-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agofirmware: turris-mox-rwtm: Use ETH_ALEN instead of hardcoded 6
Marek Behún [Sat, 31 Aug 2024 09:20:36 +0000 (11:20 +0200)] 
firmware: turris-mox-rwtm: Use ETH_ALEN instead of hardcoded 6

Use the ETH_ALEN macro instead of hardcoded 6 for MAC address length.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-3-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agofirmware: turris-mox-rwtm: Use macro constant instead of hardcoded 4096
Marek Behún [Sat, 31 Aug 2024 09:20:35 +0000 (11:20 +0200)] 
firmware: turris-mox-rwtm: Use macro constant instead of hardcoded 4096

The 4096 bytes limit in mox_hwrng_read() is due to the DMA buffer being
allocated to one PAGE_SIZE bytes. Use new local macro constant
RWTM_DMA_BUFFER_SIZE at allocation time and when used in mox_hwrng_read().

Use SZ_4K instead of PAGE_SIZE. Although PAGE_SIZE is never set to a
larger value on Armada 3720, it theoretically could, and this would be a
waste of space.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-2-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 months agosoc: versatile: enable compile testing
Krzysztof Kozlowski [Sun, 25 Aug 2024 18:05:25 +0000 (20:05 +0200)] 
soc: versatile: enable compile testing

Enable compile testing for broader build coverage.  None of the drivers
use anything from "asm", so code should build everywhere.
CONFIG_PLAT_VERSATILE is being selected by driver dependencies
(CONFIG_ARCH_INTEGRATOR and CONFIG_ARCH_REALVIEW), so directory can be
always added to Makefile targets without impacting other configurations.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/20240825-soc-dev-fixes-v1-4-ff4b35abed83@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agosoc: versatile: realview: fix soc_dev leak during device remove
Krzysztof Kozlowski [Sun, 25 Aug 2024 18:05:24 +0000 (20:05 +0200)] 
soc: versatile: realview: fix soc_dev leak during device remove

If device is unbound, the soc_dev should be unregistered to prevent
memory leak.

Fixes: a2974c9c1f83 ("soc: add driver for the ARM RealView")
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/20240825-soc-dev-fixes-v1-3-ff4b35abed83@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agosoc: versatile: realview: fix memory leak during device remove
Krzysztof Kozlowski [Sun, 25 Aug 2024 18:05:23 +0000 (20:05 +0200)] 
soc: versatile: realview: fix memory leak during device remove

If device is unbound, the memory allocated for soc_dev_attr should be
freed to prevent leaks.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/20240825-soc-dev-fixes-v1-2-ff4b35abed83@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agosoc: versatile: integrator: fix OF node leak in probe() error path
Krzysztof Kozlowski [Sun, 25 Aug 2024 18:05:22 +0000 (20:05 +0200)] 
soc: versatile: integrator: fix OF node leak in probe() error path

Driver is leaking OF node reference obtained from
of_find_matching_node().

Fixes: f956a785a282 ("soc: move SoC driver for the ARM Integrator")
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/20240825-soc-dev-fixes-v1-1-ff4b35abed83@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agortc: support i.MX95 BBM RTC
Peng Fan [Fri, 23 Aug 2024 09:05:22 +0000 (17:05 +0800)] 
rtc: support i.MX95 BBM RTC

The BBM module provides RTC feature. To i.MX95, this module is managed by
System Manager and exported System Control Management Interface(SCMI).
Linux could use i.MX SCMI BBM Extension protocol to use RTC feature.

This driver is to use SCMI interface to get/set RTC.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Message-Id: <20240823-imx95-bbm-misc-v2-v8-6-e600ed9e9271@nxp.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
9 months agoinput: keyboard: support i.MX95 BBM module
Peng Fan [Fri, 23 Aug 2024 09:05:23 +0000 (17:05 +0800)] 
input: keyboard: support i.MX95 BBM module

The BBM module provides BUTTON feature. To i.MX95, this module
is managed by System Manager and exported using System Management
Control Interface(SCMI). Linux could use i.MX SCMI BBM Extension
protocol to use BUTTON feature.

This driver is to use SCMI interface to enable pwrkey.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Message-Id: <20240823-imx95-bbm-misc-v2-v8-7-e600ed9e9271@nxp.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
9 months agofirmware: imx: Add i.MX95 MISC driver
Peng Fan [Fri, 23 Aug 2024 09:05:21 +0000 (17:05 +0800)] 
firmware: imx: Add i.MX95 MISC driver

The i.MX95 System manager exports SCMI MISC protocol for linux to do
various settings, such as set board gpio expander as wakeup source.

The driver is to add the support.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Message-Id: <20240823-imx95-bbm-misc-v2-v8-5-e600ed9e9271@nxp.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
9 months agofirmware: arm_scmi: Add initial support for i.MX MISC protocol
Peng Fan [Fri, 23 Aug 2024 09:05:19 +0000 (17:05 +0800)] 
firmware: arm_scmi: Add initial support for i.MX MISC protocol

i.MX95 System Manager(SM) firmware includes a SCMI vendor protocol, SCMI
MISC protocol which includes controls that are misc settings/actions that
must be exposed from the SM to agents. They are device specific and are
usually define to access bit fields in various mix block control modules,
IOMUX_GPR, and other General Purpose registers, Control Status Registers
owned by the SM.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Message-Id: <20240823-imx95-bbm-misc-v2-v8-3-e600ed9e9271@nxp.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
9 months agofirmware: arm_scmi: Add initial support for i.MX BBM protocol
Peng Fan [Fri, 23 Aug 2024 09:05:18 +0000 (17:05 +0800)] 
firmware: arm_scmi: Add initial support for i.MX BBM protocol

i.MX95 has a battery-backed module(BBM), which has persistent storage
(GPR), an RTC, and the ON/OFF button. The System Manager(SM) firmware
use SCMI vendor protocol(SCMI BBM) to let agent be able to use GPR, RTC
and ON/OFF button.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Message-Id: <20240823-imx95-bbm-misc-v2-v8-2-e600ed9e9271@nxp.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
9 months agofirmware: arm_scmi: Add NXP i.MX95 SCMI documentation
Peng Fan [Fri, 23 Aug 2024 09:05:20 +0000 (17:05 +0800)] 
firmware: arm_scmi: Add NXP i.MX95 SCMI documentation

Add NXP i.MX95 System Control Management Interface(SCMI) vendor
extensions protocol documentation.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Message-Id: <20240823-imx95-bbm-misc-v2-v8-4-e600ed9e9271@nxp.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
9 months agodt-bindings: firmware: Add i.MX95 SCMI Extension protocol
Peng Fan [Fri, 23 Aug 2024 09:05:17 +0000 (17:05 +0800)] 
dt-bindings: firmware: Add i.MX95 SCMI Extension protocol

Add i.MX SCMI Extension protocols bindings for:
- Battery Backed Module(BBM) Protocol
  This contains persistent storage (GPR), an RTC, and the ON/OFF button.
  The protocol can also provide access to similar functions implemented via
  external board components.
- MISC Protocol.
  This includes controls that are misc settings/actions that must be
  exposed from the SM to agents. They are device specific and are usually
  define to access bit fields in various mix block control modules,
  IOMUX_GPR, and other GPR/CSR owned by the SM.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Message-Id: <20240823-imx95-bbm-misc-v2-v8-1-e600ed9e9271@nxp.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
9 months agofirmware: arm_scmi: Replace comma with the semicolon
Sudeep Holla [Tue, 27 Aug 2024 14:38:38 +0000 (15:38 +0100)] 
firmware: arm_scmi: Replace comma with the semicolon

Replace the typo comma with the semicolon. No functional change.

Message-Id: <20240827143838.1465913-4-sudeep.holla@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
9 months agofirmware: arm_scmi: Replace the use of of_node_put() to __free(device_node)
Sudeep Holla [Tue, 27 Aug 2024 14:38:37 +0000 (15:38 +0100)] 
firmware: arm_scmi: Replace the use of of_node_put() to __free(device_node)

Use __free for device_node values, and thus drop calls to of_node_put.

The goal is simplify of_node reference cleanup by using this scope-based
of_node_put() cleanup to simplify function exit handling. When using __free
a resource is allocated within a block, it is automatically freed at the
end of the block.

This cleanup aligns well with the recent change in shmem.c to use __free
instead of explicit of_node_put() calls.

Message-Id: <20240827143838.1465913-3-sudeep.holla@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
9 months agofirmware: arm_scmi: Fix trivial whitespace/coding style issues
Sudeep Holla [Tue, 27 Aug 2024 14:38:36 +0000 (15:38 +0100)] 
firmware: arm_scmi: Fix trivial whitespace/coding style issues

Fix couple of unnecessary multiple blank lines and spaces instead of
tabs.

No functional change.

Message-Id: <20240827143838.1465913-2-sudeep.holla@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
9 months agodt-bindings: media: s5p-mfc: Remove s5p-mfc.txt binding
Aakarsh Jain [Thu, 8 Aug 2024 13:44:32 +0000 (19:14 +0530)] 
dt-bindings: media: s5p-mfc: Remove s5p-mfc.txt binding

s5p-mfc bindings to json-schema is already merged with
this commit 538af6e5856b ("dt-bindings: media: s5p-mfc:
convert bindings to json-schema"). Remove s5p-mfc.txt
file.

Fixes: 538af6e5856b ("dt-bindings: media: s5p-mfc: convert bindings to json-schema")
Signed-off-by: Aakarsh Jain <aakarsh.jain@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240808134432.50073-1-aakarsh.jain@samsung.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agomemory: mtk-smi: Use devm_clk_get_enabled()
Rong Qianfeng [Wed, 21 Aug 2024 03:25:57 +0000 (11:25 +0800)] 
memory: mtk-smi: Use devm_clk_get_enabled()

Replace devm_clk_get() and clk_prepare_enable() with
devm_clk_get_enabled() in .probe().

Fix the bug of missing clk_disable_unprepare() in .remove() by
using devm_clk_get_enabled() that can disables and unprepares
it automatically on driver detach.

Fixes: 3c8f4ad85c4b ("memory/mediatek: add support for mt2701")
Cc: honghui.zhang@mediatek.com
Signed-off-by: Rong Qianfeng <rongqianfeng@vivo.com>
Reviewed-by: Yong Wu <yong.wu@mediatek.com>
Link: https://lore.kernel.org/r/20240821032558.43052-1-rongqianfeng@vivo.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agomemory: pl353-smc: simplify with devm_clk_get_enabled()
Krzysztof Kozlowski [Fri, 23 Aug 2024 10:16:02 +0000 (12:16 +0200)] 
memory: pl353-smc: simplify with devm_clk_get_enabled()

Use devm_clk_get_enabled() to drop clock prepare/unprepare parts and
make code simpler.

Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240823-b4-cleanup-h-guard-v1-7-01668915bd55@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agomemory: pl353-smc: simplify with dev_err_probe()
Krzysztof Kozlowski [Fri, 23 Aug 2024 10:16:01 +0000 (12:16 +0200)] 
memory: pl353-smc: simplify with dev_err_probe()

Use dev_err_probe() to avoid dmesg flood on actual defer.  This makes
the code also simpler.

Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240823-b4-cleanup-h-guard-v1-6-01668915bd55@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agomemory: pl172: simplify with devm_clk_get_enabled()
Krzysztof Kozlowski [Fri, 23 Aug 2024 10:16:00 +0000 (12:16 +0200)] 
memory: pl172: simplify with devm_clk_get_enabled()

Use devm_clk_get_enabled() to drop clock prepare/unprepare parts and
make code simpler.  Change to dev_err_probe() in handling clk_get_rate()
error to make it even simpler.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>
Link: https://lore.kernel.org/r/20240823-b4-cleanup-h-guard-v1-5-01668915bd55@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agomemory: pl172: simplify with dev_err_probe()
Krzysztof Kozlowski [Fri, 23 Aug 2024 10:15:59 +0000 (12:15 +0200)] 
memory: pl172: simplify with dev_err_probe()

Use dev_err_probe() to avoid dmesg flood on actual defer.  This makes
the code also simpler.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huwei.com>
Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>
Link: https://lore.kernel.org/r/20240823-b4-cleanup-h-guard-v1-4-01668915bd55@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agomemory: omap-gpmc: simplify locking with guard()
Krzysztof Kozlowski [Fri, 23 Aug 2024 10:15:58 +0000 (12:15 +0200)] 
memory: omap-gpmc: simplify locking with guard()

Simplify error handling (less gotos) over locks with guard().

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240823-b4-cleanup-h-guard-v1-3-01668915bd55@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agomemory: emif: simplify locking with guard()
Krzysztof Kozlowski [Fri, 23 Aug 2024 10:15:57 +0000 (12:15 +0200)] 
memory: emif: simplify locking with guard()

Simplify error handling (less gotos) over locks with guard().

The driver used file-scope variable 'irq_state' for storing IRQ state
with spin_lock_irqsave, so move it into respective local scopes.  This
should be equivalent, but more readable (less global variables).

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huwei.com>
Link: https://lore.kernel.org/r/20240823-b4-cleanup-h-guard-v1-2-01668915bd55@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agomemory: emif: drop unused 'irq_state' member
Krzysztof Kozlowski [Fri, 23 Aug 2024 10:15:56 +0000 (12:15 +0200)] 
memory: emif: drop unused 'irq_state' member

Driver does not use 'emif_data.irq_state'.

Link: https://lore.kernel.org/r/20240823-b4-cleanup-h-guard-v1-1-01668915bd55@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agomemory: ti-aemif: Revert "memory: ti-aemif: don't needlessly iterate over child nodes"
Bartosz Golaszewski [Sat, 24 Aug 2024 08:02:35 +0000 (10:02 +0200)] 
memory: ti-aemif: Revert "memory: ti-aemif: don't needlessly iterate over child nodes"

This reverts commit 23a641d5c2bce4c723fff9118a5d865ee6b9d05a.

The first-level children of the aemif node are not the device nodes (ones
containing the 'compatible' property) but the chip-select nodes which
instead have their own children.

of_platform_populate() will skip such nodes so we must indeed iterate
over the direct children of the aemif node. The problem here is that we
never call of_platform_depopulate() as it takes the root device as
argument. We only have an unpopulated chip-select nodes so we will leak
these devices if any of the calls to of_platform_populate() fails.

I don't have a batter idea right now but my patch was not correct so we
need to revert it. While at it: at least use the scoped variant of the
OF node iterator. Down the line, we should find a better solution to fix
this potential resource leak in error path.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20240824080235.56472-1-brgl@bgdev.pl
Fixes: 23a641d5c2bc ("memory: ti-aemif: don't needlessly iterate over child nodes")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agosoc: rockchip: grf: Add rk3576 default GRF values
Detlev Casanova [Thu, 22 Aug 2024 19:53:37 +0000 (15:53 -0400)] 
soc: rockchip: grf: Add rk3576 default GRF values

Set SW controlled i3c weak pull up and disable JTAG function on SDMMC IO.

The i3c weak pull up is activated to let all gpio banks be controlled
by the pinctrl driver.

Disabling the JTAG function lets the SDMMC core use its full IO width.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Acked-by: Dragan Simic <dsimic@manjaro.org>
Link: https://lore.kernel.org/r/20240822195706.920567-3-detlev.casanova@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
10 months agodt-bindings: soc: rockchip: Add rk3576 syscon compatibles
Detlev Casanova [Thu, 22 Aug 2024 19:53:36 +0000 (15:53 -0400)] 
dt-bindings: soc: rockchip: Add rk3576 syscon compatibles

Add all syscon compatibles for RK3576.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240822195706.920567-2-detlev.casanova@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
10 months agosoc: rockchip: grf: Set RK3128's vpu main clock
Alex Bee [Thu, 23 May 2024 18:56:32 +0000 (20:56 +0200)] 
soc: rockchip: grf: Set RK3128's vpu main clock

RK3128 has a setting in GRF which selects whether the vpu attached iommu
uses the AXI clock of the decoder (vdpu) or the encoder (vepu). The
default is vepu but some part of the vendor firmware sets it to vdpu.

In order to be independent on whether any of those vendor firmware blobs is
used to boot the SoC reset "vpu main clock" setting to it's default value.

Signed-off-by: Alex Bee <knaerzche@gmail.com>
Link: https://lore.kernel.org/r/20240523185633.71355-3-knaerzche@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
10 months agosoc: rockchip: io-domain: Add RK3308 IO voltage domains
David Wu [Tue, 21 May 2024 21:10:13 +0000 (21:10 +0000)] 
soc: rockchip: io-domain: Add RK3308 IO voltage domains

Add IO voltage domains support for the RK3308 SoC.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Link: https://lore.kernel.org/r/20240521211029.1236094-11-jonas@kwiboo.se
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
10 months agodt-bindings: power: rockchip: Document RK3308 IO voltage domains
Jonas Karlman [Tue, 21 May 2024 21:10:12 +0000 (21:10 +0000)] 
dt-bindings: power: rockchip: Document RK3308 IO voltage domains

Document dt-bindings for RK3308 IO voltage domains.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240521211029.1236094-10-jonas@kwiboo.se
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
10 months agomemory: ti-aemif: simplify with scoped for each OF child loop
Krzysztof Kozlowski [Fri, 16 Aug 2024 10:54:37 +0000 (12:54 +0200)] 
memory: ti-aemif: simplify with scoped for each OF child loop

Use scoped for_each_available_child_of_node_scoped() when iterating over
device nodes to make code a bit simpler.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240816-cleanup-h-of-node-put-memory-v2-13-9eed0ee16b78@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agomemory: ti-aemif: simplify with dev_err_probe()
Krzysztof Kozlowski [Fri, 16 Aug 2024 10:54:35 +0000 (12:54 +0200)] 
memory: ti-aemif: simplify with dev_err_probe()

Use dev_err_probe() to avoid dmesg flood on actual defer.  This makes
the code also simpler.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240816-cleanup-h-of-node-put-memory-v2-11-9eed0ee16b78@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agomemory: tegra30-emc: simplify with scoped for each OF child loop
Krzysztof Kozlowski [Fri, 16 Aug 2024 10:54:34 +0000 (12:54 +0200)] 
memory: tegra30-emc: simplify with scoped for each OF child loop

Use scoped for_each_child_of_node_scoped() when iterating over device
nodes to make code a bit simpler.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240816-cleanup-h-of-node-put-memory-v2-10-9eed0ee16b78@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agomemory: tegra20-emc: simplify with scoped for each OF child loop
Krzysztof Kozlowski [Fri, 16 Aug 2024 10:54:33 +0000 (12:54 +0200)] 
memory: tegra20-emc: simplify with scoped for each OF child loop

Use scoped for_each_child_of_node_scoped() when iterating over device
nodes to make code a bit simpler.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240816-cleanup-h-of-node-put-memory-v2-9-9eed0ee16b78@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agomemory: tegra124-emc: simplify with scoped for each OF child loop
Krzysztof Kozlowski [Fri, 16 Aug 2024 10:54:32 +0000 (12:54 +0200)] 
memory: tegra124-emc: simplify with scoped for each OF child loop

Use scoped for_each_child_of_node_scoped() when iterating over device
nodes to make code a bit simpler.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240816-cleanup-h-of-node-put-memory-v2-8-9eed0ee16b78@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agomemory: tegra-mc: simplify with scoped for each OF child loop
Krzysztof Kozlowski [Fri, 16 Aug 2024 10:54:31 +0000 (12:54 +0200)] 
memory: tegra-mc: simplify with scoped for each OF child loop

Use scoped for_each_child_of_node_scoped() when iterating over device
nodes to make code a bit simpler.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240816-cleanup-h-of-node-put-memory-v2-7-9eed0ee16b78@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agomemory: stm32-fmc2-ebi: simplify with dev_err_probe()
Krzysztof Kozlowski [Fri, 16 Aug 2024 10:54:30 +0000 (12:54 +0200)] 
memory: stm32-fmc2-ebi: simplify with dev_err_probe()

dev_err_probe() combines 'return' and error code printing, thus code is
a bit simpler, even if it cannot actually defer.

Suggested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240816-cleanup-h-of-node-put-memory-v2-6-9eed0ee16b78@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agomemory: stm32-fmc2-ebi: simplify with scoped for each OF child loop
Krzysztof Kozlowski [Fri, 16 Aug 2024 10:54:29 +0000 (12:54 +0200)] 
memory: stm32-fmc2-ebi: simplify with scoped for each OF child loop

Use scoped for_each_available_child_of_node_scoped() when iterating over
device nodes to make code a bit simpler.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240816-cleanup-h-of-node-put-memory-v2-5-9eed0ee16b78@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agomemory: samsung: exynos5422-dmc: use scoped device node handling to simplify error...
Krzysztof Kozlowski [Fri, 16 Aug 2024 10:54:28 +0000 (12:54 +0200)] 
memory: samsung: exynos5422-dmc: use scoped device node handling to simplify error paths

Obtain the device node reference with scoped/cleanup.h to reduce error
handling and make the code a bit simpler.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240816-cleanup-h-of-node-put-memory-v2-4-9eed0ee16b78@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agomemory: samsung: exynos5422-dmc: simplify dmc->dev usage
Krzysztof Kozlowski [Fri, 16 Aug 2024 10:54:27 +0000 (12:54 +0200)] 
memory: samsung: exynos5422-dmc: simplify dmc->dev usage

Store 'dmc->dev' in local 'dev' variable, to make several pieces of code
using it shorter and easier to read.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240816-cleanup-h-of-node-put-memory-v2-3-9eed0ee16b78@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agomemory: atmel-ebi: simplify with scoped for each OF child loop
Krzysztof Kozlowski [Fri, 16 Aug 2024 10:54:26 +0000 (12:54 +0200)] 
memory: atmel-ebi: simplify with scoped for each OF child loop

Use scoped for_each_available_child_of_node_scoped() when iterating over
device nodes to make code a bit simpler.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240816-cleanup-h-of-node-put-memory-v2-2-9eed0ee16b78@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agomemory: atmel-ebi: use scoped device node handling to simplify error paths
Krzysztof Kozlowski [Fri, 16 Aug 2024 10:54:25 +0000 (12:54 +0200)] 
memory: atmel-ebi: use scoped device node handling to simplify error paths

Obtain the device node reference with scoped/cleanup.h to reduce error
handling and make the code a bit simpler.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240816-cleanup-h-of-node-put-memory-v2-1-9eed0ee16b78@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agodt-bindings: memory-controllers: renesas,rpc-if: add top-level constraints
Krzysztof Kozlowski [Sun, 18 Aug 2024 17:29:30 +0000 (19:29 +0200)] 
dt-bindings: memory-controllers: renesas,rpc-if: add top-level constraints

Properties with variable number of items per each device are expected to
have widest constraints in top-level "properties:" block and further
customized (narrowed) in "if:then:".  Add missing top-level constraints
for clocks.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240818172930.121898-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agofirmware: arm_ffa: Fetch the Rx/Tx buffer size using ffa_features()
Sudeep Holla [Tue, 20 Aug 2024 14:28:00 +0000 (15:28 +0100)] 
firmware: arm_ffa: Fetch the Rx/Tx buffer size using ffa_features()

An endpoint can discover the minimum size, maximum size and alignment
boundary for the Rx/Tx buffers by passing the function ID of the
FFA_RXTX_MAP ABI as input in the FFA_FEATURES interface. The maximum
size is an optional field and a value of 0 means that the partition
manager or the hypervisor does not enforce a maximum size.

Use the discovery mechanism and remove the hardcoded 4kB buffer size.
If the discovery fails, it still defaults to 4kB.

Message-Id: <20240820-ffa_v1-2-v2-7-18c0c5f3c65e@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
10 months agofirmware: arm_ffa: Add support for FFA_YIELD in direct messaging
Sudeep Holla [Tue, 20 Aug 2024 14:27:59 +0000 (15:27 +0100)] 
firmware: arm_ffa: Add support for FFA_YIELD in direct messaging

Successful completion of both direct messaging function can be indicated
through an invocation of FFA_YIELD or GGA_INTERRUPT by the callee.

FFA_INTERRUPT indicates that the direct request was interrupted and must
be resumed through the FFA_RUN interface which is already done in the
driver.

FFA_YIELD indicates that the receiver endpoint has transitioned to the
blocked runtime state and must be resumed through the FFA_RUN interface.
However, the way receiver endpoint gets unblocked is implementation
defined. So, the driver just sleeps for 1 - 2ms and issues FFA_RUN. It
can return to the caller with FFA_YIELD is the receiver endpoint is still
blocked.

Message-Id: <20240820-ffa_v1-2-v2-6-18c0c5f3c65e@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
10 months agofirmware: arm_ffa: Add support for FFA_MSG_SEND_DIRECT_{REQ,RESP}2
Sudeep Holla [Tue, 20 Aug 2024 14:27:58 +0000 (15:27 +0100)] 
firmware: arm_ffa: Add support for FFA_MSG_SEND_DIRECT_{REQ,RESP}2

FFA_MSG_SEND_DIRECT_{REQ,RESP} supported only x3-x7 to pass implementation
defined values as part of the message. This may not be sufficient sometimes
and also it would be good to use all the registers supported by SMCCC v1.2
(x0-x17) for such register based communication.

Also another limitation with the FFA_MSG_SEND_DIRECT_{REQ,RESP} is the
ability to target a specific service within the partition based on it's
UUID.

In order to address both of the above limitation, FF-A v1.2 introduced
FFA_MSG_SEND_DIRECT_{REQ,RESP}2 which has the ability to target the
message to a specific service based on its UUID within a partition as
well as utilise all the available registers(x4-x17 specifically) for
the communication.

This change adds support for FFA_MSG_SEND_DIRECT_REQ2 and
FFA_MSG_SEND_DIRECT_RESP2.

Message-Id: <20240820-ffa_v1-2-v2-5-18c0c5f3c65e@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
10 months agofirmware: arm_ffa: Add support for FFA_PARTITION_INFO_GET_REGS
Sudeep Holla [Tue, 20 Aug 2024 14:27:57 +0000 (15:27 +0100)] 
firmware: arm_ffa: Add support for FFA_PARTITION_INFO_GET_REGS

FF-A v1.2 introduced FFA_PARTITION_INFO_GET_REGS which is similar to
FFA_PARTITION_INFO_GET except that the former uses the registers to
get the required information instead of the Rx buffer which the latter
uses.

We need to first check if the platform supports this new API using
FFA_FEATURES so that we can fallback to the FFA_PARTITION_INFO_GET
(which is mandatory) if FFA_PARTITION_INFO_GET_REGS is not implemented.

Message-Id: <20240820-ffa_v1-2-v2-4-18c0c5f3c65e@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
10 months agofirmware: arm_ffa: Move the function ffa_features() earlier
Sudeep Holla [Tue, 20 Aug 2024 14:27:56 +0000 (15:27 +0100)] 
firmware: arm_ffa: Move the function ffa_features() earlier

We need to use ffa_features() in ffa_partition_probe() to detect if
the newer FFA_PARTITION_INFO_GET_REGS API is supported in the platform
or not. To avoid unnecessary forward declaration within the file, let
us just move this ffa_features() earlier.

No funtional change.

Message-Id: <20240820-ffa_v1-2-v2-3-18c0c5f3c65e@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
10 months agofirmware: arm_ffa: Update the FF-A command list with v1.2 additions
Sudeep Holla [Tue, 20 Aug 2024 14:27:55 +0000 (15:27 +0100)] 
firmware: arm_ffa: Update the FF-A command list with v1.2 additions

Arm Firmware Framework for A-profile(FFA) v1.2 introduces register based
discovery mechanism and direct messaging extensions that enables to target
specific UUID within a partition.

Let us add all the newly supported FF-A function IDs in the spec.
Also update to the error values and associated handling.

Message-Id: <20240820-ffa_v1-2-v2-2-18c0c5f3c65e@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
10 months agofirmware: arm_ffa: Some coding style fixes
Sudeep Holla [Tue, 20 Aug 2024 14:27:54 +0000 (15:27 +0100)] 
firmware: arm_ffa: Some coding style fixes

These changes fixes a set of below coding style issues:
1. spaces required around that '=' (ctx:VxW)
2. possible unnecessary 'out of memory' message
3. unnecessary for single statement blocks

Message-Id: <20240820-ffa_v1-2-v2-1-18c0c5f3c65e@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
10 months agodt-bindings: samsung: exynos-usi: add missing constraints
Krzysztof Kozlowski [Sun, 18 Aug 2024 17:28:04 +0000 (19:28 +0200)] 
dt-bindings: samsung: exynos-usi: add missing constraints

Properties with variable number of items per each device are expected to
have widest constraints in top-level "properties:" block and further
customized (narrowed) in "if:then:".  Add missing top-level constraints
for reg, clocks and clock-names.

Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240818172804.121666-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 months agoLinux 6.11-rc4 v6.11-rc4
Linus Torvalds [Sun, 18 Aug 2024 20:17:27 +0000 (13:17 -0700)] 
Linux 6.11-rc4

10 months agofirmware: arm_scmi: Use max-rx-timeout-ms from devicetree
Cristian Marussi [Tue, 30 Jul 2024 14:47:04 +0000 (15:47 +0100)] 
firmware: arm_scmi: Use max-rx-timeout-ms from devicetree

Override default maximum RX timeout with the value picked from the
devicetree, when provided.

Suggested-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Peng Fan <peng.fan@nxp.com> #i.MX95 19x19 EVK
Message-Id: <20240730144707.1647025-4-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
10 months agodt-bindings: firmware: arm,scmi: Introduce property max-rx-timeout-ms
Peng Fan [Tue, 30 Jul 2024 14:47:03 +0000 (15:47 +0100)] 
dt-bindings: firmware: arm,scmi: Introduce property max-rx-timeout-ms

System Controller Management Interface(SCMI) firmwares might have different
designs depending on the platform: the maximum receive channel timeout
value might vary depending on the specific underlying hardware and firmware
design choices.

Introduce the general property max-rx-timeout-ms property to describe the
transport needs of a specific platform design.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
[Cristian: reworded commit message, s/mailbox/transport in description]
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Peng Fan <peng.fan@nxp.com> #i.MX95 19x19 EVK
Message-Id: <20240730144707.1647025-3-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
10 months agofirmware: arm_scmi: Remove const from transport descriptors
Cristian Marussi [Tue, 30 Jul 2024 14:47:02 +0000 (15:47 +0100)] 
firmware: arm_scmi: Remove const from transport descriptors

The descriptor structure scmi_desc contains a variety of fields related to
the transport functionalities and it is defined by the transport drivers
themselves; such elements, though, serve varied purposes and have different
lifetime.

In particular, while there are some of those elements that provide a
description of transport features that are supposed to be immutable, on
the other side there are present also some other characteristics that are
instead supposed to be configurable on a per-platform base since they
represent configuration features tied to the specific hardware/firmware
system.

The immutable fields are already qualified as const on the their own; get
rid of the structure-level const qualifier which is not needed, so as to
enable possible runtime customization of the mutable configuration
features.

No functional change.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Peng Fan <peng.fan@nxp.com> #i.MX95 19x19 EVK
Message-Id: <20240730144707.1647025-2-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
10 months agofirmware: arm_scmi: Simplify with scoped for each OF child loop
Krzysztof Kozlowski [Fri, 16 Aug 2024 15:14:07 +0000 (17:14 +0200)] 
firmware: arm_scmi: Simplify with scoped for each OF child loop

Use scoped for_each_child_of_node_scoped() when iterating over device
nodes to make code a bit simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Message-Id: <20240816151407.155034-1-krzysztof.kozlowski@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
10 months agoMerge tag 'driver-core-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 18 Aug 2024 17:19:49 +0000 (10:19 -0700)] 
Merge tag 'driver-core-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fixes from Greg KH:
 "Here are two driver fixes for regressions from 6.11-rc1 due to the
  driver core change making a structure in a driver core callback const.

  These were missed by all testing EXCEPT for what Bart happened to be
  running, so I appreciate the fixes provided here for some
  odd/not-often-used driver subsystems that nothing else happened to
  catch.

  Both of these fixes have been in linux-next all week with no reported
  issues"

* tag 'driver-core-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  mips: sgi-ip22: Fix the build
  ARM: riscpc: ecard: Fix the build

10 months agoMerge tag 'char-misc-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregk...
Linus Torvalds [Sun, 18 Aug 2024 17:16:34 +0000 (10:16 -0700)] 
Merge tag 'char-misc-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char / misc fixes from Greg KH:
 "Here are some small char/misc fixes for 6.11-rc4 to resolve reported
  problems. Included in here are:

   - fastrpc revert of a change that broke userspace

   - xillybus fixes for reported issues

  Half of these have been in linux-next this week with no reported
  problems, I don't know if the last bit of xillybus driver changes made
  it in, but they are 'obviously correct' so will be safe :)"

* tag 'char-misc-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  char: xillybus: Check USB endpoints when probing device
  char: xillybus: Refine workqueue handling
  Revert "misc: fastrpc: Restrict untrusted app to attach to privileged PD"
  char: xillybus: Don't destroy workqueue from work item running on it

10 months agoMerge tag 'tty-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Sun, 18 Aug 2024 17:10:48 +0000 (10:10 -0700)] 
Merge tag 'tty-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty / serial fixes from Greg KH:
 "Here are some small tty and serial driver fixes for 6.11-rc4 to
  resolve some reported problems. Included in here are:

   - conmakehash.c userspace build issues

   - fsl_lpuart driver fix

   - 8250_omap revert for reported regression

   - atmel_serial rts flag fix

  All of these have been in linux-next this week with no reported
  issues"

* tag 'tty-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  Revert "serial: 8250_omap: Set the console genpd always on if no console suspend"
  tty: atmel_serial: use the correct RTS flag.
  tty: vt: conmakehash: remove non-portable code printing comment header
  tty: serial: fsl_lpuart: mark last busy before uart_add_one_port

10 months agoMerge tag 'usb-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sun, 18 Aug 2024 16:59:06 +0000 (09:59 -0700)] 
Merge tag 'usb-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB / Thunderbolt driver fixes from Greg KH:
 "Here are some small USB and Thunderbolt driver fixes for 6.11-rc4 to
  resolve some reported issues. Included in here are:

   - thunderbolt driver fixes for reported problems

   - typec driver fixes

   - xhci fixes

   - new device id for ljca usb driver

  All of these have been in linux-next this week with no reported
  issues"

* tag 'usb-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  xhci: Fix Panther point NULL pointer deref at full-speed re-enumeration
  usb: misc: ljca: Add Lunar Lake ljca GPIO HID to ljca_gpio_hids[]
  Revert "usb: typec: tcpm: clear pd_event queue in PORT_RESET"
  usb: typec: ucsi: Fix the return value of ucsi_run_command()
  usb: xhci: fix duplicate stall handling in handle_tx_event()
  usb: xhci: Check for xhci->interrupters being allocated in xhci_mem_clearup()
  thunderbolt: Mark XDomain as unplugged when router is removed
  thunderbolt: Fix memory leaks in {port|retimer}_sb_regs_write()

10 months agoMerge tag 'for-6.11-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
Linus Torvalds [Sun, 18 Aug 2024 15:50:36 +0000 (08:50 -0700)] 
Merge tag 'for-6.11-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull more btrfs fixes from David Sterba:
 "A more fixes. We got reports that shrinker added in 6.10 still causes
  latency spikes and the fixes don't handle all corner cases. Due to
  summer holidays we're taking a shortcut to disable it for release
  builds and will fix it in the near future.

   - only enable extent map shrinker for DEBUG builds, temporary quick
     fix to avoid latency spikes for regular builds

   - update target inode's ctime on unlink, mandated by POSIX

   - properly take lock to read/update block group's zoned variables

   - add counted_by() annotations"

* tag 'for-6.11-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  btrfs: only enable extent map shrinker for DEBUG builds
  btrfs: zoned: properly take lock to read/update block group's zoned variables
  btrfs: tree-checker: add dev extent item checks
  btrfs: update target inode's ctime on unlink
  btrfs: send: annotate struct name_cache_entry with __counted_by()

10 months agofuse: Initialize beyond-EOF page contents before setting uptodate
Jann Horn [Tue, 6 Aug 2024 19:51:42 +0000 (21:51 +0200)] 
fuse: Initialize beyond-EOF page contents before setting uptodate

fuse_notify_store(), unlike fuse_do_readpage(), does not enable page
zeroing (because it can be used to change partial page contents).

So fuse_notify_store() must be more careful to fully initialize page
contents (including parts of the page that are beyond end-of-file)
before marking the page uptodate.

The current code can leave beyond-EOF page contents uninitialized, which
makes these uninitialized page contents visible to userspace via mmap().

This is an information leak, but only affects systems which do not
enable init-on-alloc (via CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y or the
corresponding kernel command line parameter).

Link: https://bugs.chromium.org/p/project-zero/issues/detail?id=2574
Cc: stable@kernel.org
Fixes: a1d75f258230 ("fuse: add store request")
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 months agoMerge tag 'mm-hotfixes-stable-2024-08-17-19-34' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Sun, 18 Aug 2024 02:50:16 +0000 (19:50 -0700)] 
Merge tag 'mm-hotfixes-stable-2024-08-17-19-34' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull misc fixes from Andrew Morton:
 "16 hotfixes. All except one are for MM. 10 of these are cc:stable and
  the others pertain to post-6.10 issues.

  As usual with these merges, singletons and doubletons all over the
  place, no identifiable-by-me theme. Please see the lovingly curated
  changelogs to get the skinny"

* tag 'mm-hotfixes-stable-2024-08-17-19-34' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  mm/migrate: fix deadlock in migrate_pages_batch() on large folios
  alloc_tag: mark pages reserved during CMA activation as not tagged
  alloc_tag: introduce clear_page_tag_ref() helper function
  crash: fix riscv64 crash memory reserve dead loop
  selftests: memfd_secret: don't build memfd_secret test on unsupported arches
  mm: fix endless reclaim on machines with unaccepted memory
  selftests/mm: compaction_test: fix off by one in check_compaction()
  mm/numa: no task_numa_fault() call if PMD is changed
  mm/numa: no task_numa_fault() call if PTE is changed
  mm/vmalloc: fix page mapping if vm_area_alloc_pages() with high order fallback to order 0
  mm/memory-failure: use raw_spinlock_t in struct memory_failure_cpu
  mm: don't account memmap per-node
  mm: add system wide stats items category
  mm: don't account memmap on failure
  mm/hugetlb: fix hugetlb vs. core-mm PT locking
  mseal: fix is_madv_discard()

10 months agoMerge tag 'powerpc-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
Linus Torvalds [Sun, 18 Aug 2024 02:23:02 +0000 (19:23 -0700)] 
Merge tag 'powerpc-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:

 - Fix crashes on 85xx with some configs since the recent hugepd rework.

 - Fix boot warning with hugepages and CONFIG_DEBUG_VIRTUAL on some
   platforms.

 - Don't enable offline cores when changing SMT modes, to match existing
   userspace behaviour.

Thanks to Christophe Leroy, Dr. David Alan Gilbert, Guenter Roeck, Nysal
Jan K.A, Shrikanth Hegde, Thomas Gleixner, and Tyrel Datwyler.

* tag 'powerpc-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/topology: Check if a core is online
  cpu/SMT: Enable SMT only if a core is online
  powerpc/mm: Fix boot warning with hugepages and CONFIG_DEBUG_VIRTUAL
  powerpc/mm: Fix size of allocated PGDIR
  soc: fsl: qbman: remove unused struct 'cgr_comp'

10 months agoMerge tag 'v6.11-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Sat, 17 Aug 2024 23:31:12 +0000 (16:31 -0700)] 
Merge tag 'v6.11-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

 - fix for clang warning - additional null check

 - fix for cached write with posix locks

 - flexible structure fix

* tag 'v6.11-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  smb: smb2pdu.h: Use static_assert() to check struct sizes
  smb3: fix lock breakage for cached writes
  smb/client: avoid possible NULL dereference in cifs_free_subrequest()

10 months agoMerge tag 'i2c-for-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Sat, 17 Aug 2024 23:23:05 +0000 (16:23 -0700)] 
Merge tag 'i2c-for-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "I2C core fix replacing IS_ENABLED() with IS_REACHABLE()

  For host drivers, there are two fixes:

   - Tegra I2C Controller: Addresses a potential double-locking issue
     during probe. ACPI devices are not IRQ-safe when invoking runtime
     suspend and resume functions, so the irq_safe flag should not be
     set.

   - Qualcomm GENI I2C Controller: Fixes an oversight in the exit path
     of the runtime_resume() function, which was missed in the previous
     release"

* tag 'i2c-for-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: tegra: Do not mark ACPI devices as irq safe
  i2c: Use IS_REACHABLE() for substituting empty ACPI functions
  i2c: qcom-geni: Add missing geni_icc_disable in geni_i2c_runtime_resume

10 months agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Sat, 17 Aug 2024 17:04:01 +0000 (10:04 -0700)] 
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "Two small fixes to the mpi3mr driver. One to avoid oversize
  allocations in tracing and the other to fix an uninitialized spinlock
  in the user to driver feature request code (used to trigger dumps and
  the like)"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: mpi3mr: Avoid MAX_PAGE_ORDER WARNING for buffer allocations
  scsi: mpi3mr: Add missing spin_lock_init() for mrioc->trigger_lock

10 months agoMerge tag 'xfs-6.11-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Linus Torvalds [Sat, 17 Aug 2024 16:51:28 +0000 (09:51 -0700)] 
Merge tag 'xfs-6.11-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull xfs fixes from Chandan Babu:

 - Check for presence of only 'attr' feature before scrubbing an inode's
   attribute fork.

 - Restore the behaviour of setting AIL thread to TASK_INTERRUPTIBLE for
   long (i.e. 50ms) sleep durations to prevent high load averages.

 - Do not allow users to change the realtime flag of a file unless the
   datadev and rtdev both support fsdax access modes.

* tag 'xfs-6.11-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: conditionally allow FS_XFLAG_REALTIME changes if S_DAX is set
  xfs: revert AIL TASK_KILLABLE threshold
  xfs: attr forks require attr, not attr2

10 months agoMerge tag 'bcachefs-2024-08-16' of git://evilpiepirate.org/bcachefs
Linus Torvalds [Sat, 17 Aug 2024 16:46:10 +0000 (09:46 -0700)] 
Merge tag 'bcachefs-2024-08-16' of git://evilpiepirate.org/bcachefs

Pull bcachefs fixes from Kent OverstreetL

 - New on disk format version, bcachefs_metadata_version_disk_accounting_inum

   This adds one more disk accounting counter, which counts disk usage
   and number of extents per inode number. This lets us track
   fragmentation, for implementing defragmentation later, and it also
   counts disk usage per inode in all snapshots, which will be a useful
   thing to expose to users.

 - One performance issue we've observed is threads spinning when they
   should be waiting for dirty keys in the key cache to be flushed by
   journal reclaim, so we now have hysteresis for the waiting thread, as
   well as improving the tracepoint and a new time_stat, for tracking
   time blocked waiting on key cache flushing.

... and various assorted smaller fixes.

* tag 'bcachefs-2024-08-16' of git://evilpiepirate.org/bcachefs:
  bcachefs: Fix locking in __bch2_trans_mark_dev_sb()
  bcachefs: fix incorrect i_state usage
  bcachefs: avoid overflowing LRU_TIME_BITS for cached data lru
  bcachefs: Fix forgetting to pass trans to fsck_err()
  bcachefs: Increase size of cuckoo hash table on too many rehashes
  bcachefs: bcachefs_metadata_version_disk_accounting_inum
  bcachefs: Kill __bch2_accounting_mem_mod()
  bcachefs: Make bkey_fsck_err() a wrapper around fsck_err()
  bcachefs: Fix warning in __bch2_fsck_err() for trans not passed in
  bcachefs: Add a time_stat for blocked on key cache flush
  bcachefs: Improve trans_blocked_journal_reclaim tracepoint
  bcachefs: Add hysteresis to waiting on btree key cache flush
  lib/generic-radix-tree.c: Fix rare race in __genradix_ptr_alloc()
  bcachefs: Convert for_each_btree_node() to lockrestart_do()
  bcachefs: Add missing downgrade table entry
  bcachefs: disk accounting: ignore unknown types
  bcachefs: bch2_accounting_invalid() fixup
  bcachefs: Fix bch2_trigger_alloc when upgrading from old versions
  bcachefs: delete faulty fastpath in bch2_btree_path_traverse_cached()

10 months agobcachefs: Fix locking in __bch2_trans_mark_dev_sb()
Kent Overstreet [Sun, 5 May 2024 03:48:58 +0000 (23:48 -0400)] 
bcachefs: Fix locking in __bch2_trans_mark_dev_sb()

We run this in full RW mode now, so we have to guard against the
superblock buffer being reallocated.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
10 months agoMerge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Sat, 17 Aug 2024 00:08:02 +0000 (17:08 -0700)] 
Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull memcg-v1 fix from Al Viro:
 "memcg_write_event_control() oops fix"

* tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  memcg_write_event_control(): fix a user-triggerable oops

10 months agoMerge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Linus Torvalds [Sat, 17 Aug 2024 00:02:32 +0000 (17:02 -0700)] 
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:

 - Fix the arm64 __get_mem_asm() to use the _ASM_EXTABLE_##type##ACCESS()
   macro instead of the *_ERR() one in order to avoid writing -EFAULT to
   the value register in case of a fault

 - Initialise all elements of the acpi_early_node_map[] to NUMA_NO_NODE.
   Prior to this fix, only the first element was initialised

 - Move the KASAN random tag seed initialisation after the per-CPU areas
   have been initialised (prng_state is __percpu)

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: Fix KASAN random tag seed initialization
  arm64: ACPI: NUMA: initialize all values of acpi_early_node_map to NUMA_NO_NODE
  arm64: uaccess: correct thinko in __get_mem_asm()

10 months agoMerge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 16 Aug 2024 23:59:05 +0000 (16:59 -0700)] 
Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

Pull clk fix from Stephen Boyd:
 "One fix for the new T-Head TH1520 clk driver that marks a bus clk
  critical so that it isn't turned off during late init which breaks
  emmc-sdio"

* tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
  clk: thead: fix dependency on clk_ignore_unused

10 months agoMerge tag 'block-6.11-20240824' of git://git.kernel.dk/linux
Linus Torvalds [Fri, 16 Aug 2024 21:03:31 +0000 (14:03 -0700)] 
Merge tag 'block-6.11-20240824' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:

 - Fix corruption issues with s390/dasd (Eric, Stefan)

 - Fix a misuse of non irq locking grab of a lock (Li)

 - MD pull request with a single data corruption fix for raid1 (Yu)

* tag 'block-6.11-20240824' of git://git.kernel.dk/linux:
  block: Fix lockdep warning in blk_mq_mark_tag_wait
  md/raid1: Fix data corruption for degraded array with slow disk
  s390/dasd: fix error recovery leading to data corruption on ESE devices
  s390/dasd: Remove DMA alignment

10 months agoMerge tag 'io_uring-6.11-20240824' of git://git.kernel.dk/linux
Linus Torvalds [Fri, 16 Aug 2024 21:00:05 +0000 (14:00 -0700)] 
Merge tag 'io_uring-6.11-20240824' of git://git.kernel.dk/linux

Pull io_uring fixes from Jens Axboe:

 - Fix a comment in the uapi header using the wrong member name (Caleb)

 - Fix KCSAN warning for a debug check in sqpoll (me)

 - Two more NAPI tweaks (Olivier)

* tag 'io_uring-6.11-20240824' of git://git.kernel.dk/linux:
  io_uring: fix user_data field name in comment
  io_uring/sqpoll: annotate debug task == current with data_race()
  io_uring/napi: remove duplicate io_napi_entry timeout assignation
  io_uring/napi: check napi_enabled in io_napi_add() before proceeding

10 months agoMerge tag 'devicetree-fixes-for-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 16 Aug 2024 20:50:33 +0000 (13:50 -0700)] 
Merge tag 'devicetree-fixes-for-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull devicetree fixes from Rob Herring:

 - Fix a possible (but unlikely) out-of-bounds read in interrupts
   parsing code

 - Add AT25 EEPROM "fujitsu,mb85rs256" compatible

 - Update Konrad Dybcio's email

* tag 'devicetree-fixes-for-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  of/irq: Prevent device address out-of-bounds read in interrupt map walk
  dt-bindings: eeprom: at25: add fujitsu,mb85rs256 compatible
  dt-bindings: Batch-update Konrad Dybcio's email

10 months agobtrfs: only enable extent map shrinker for DEBUG builds
Qu Wenruo [Fri, 16 Aug 2024 01:10:38 +0000 (10:40 +0930)] 
btrfs: only enable extent map shrinker for DEBUG builds

Although there are several patches improving the extent map shrinker,
there are still reports of too frequent shrinker behavior, taking too
much CPU for the kswapd process.

So let's only enable extent shrinker for now, until we got more
comprehensive understanding and a better solution.

Link: https://lore.kernel.org/linux-btrfs/3df4acd616a07ef4d2dc6bad668701504b412ffc.camel@intelfx.name/
Link: https://lore.kernel.org/linux-btrfs/c30fd6b3-ca7a-4759-8a53-d42878bf84f7@gmail.com/
Fixes: 956a17d9d050 ("btrfs: add a shrinker for extent maps")
CC: stable@vger.kernel.org # 6.10+
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
10 months agoMerge tag 'thermal-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Fri, 16 Aug 2024 18:49:07 +0000 (11:49 -0700)] 
Merge tag 'thermal-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull thermal control fix from Rafael Wysocki:
 "Fix a Bang-bang thermal governor issue causing it to fail to reset the
  state of cooling devices if they are 'on' to start with, but the
  thermal zone temperature is always below the corresponding trip point
  (Rafael Wysocki)"

* tag 'thermal-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  thermal: gov_bang_bang: Use governor_data to reduce overhead
  thermal: gov_bang_bang: Add .manage() callback
  thermal: gov_bang_bang: Split bang_bang_control()
  thermal: gov_bang_bang: Call __thermal_cdev_update() directly

10 months agoMerge tag 'acpi-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Fri, 16 Aug 2024 18:43:54 +0000 (11:43 -0700)] 
Merge tag 'acpi-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fix from Rafael Wysocki:
 "Fix an issue related to the ACPI EC device handling that causes the
  _REG control method to be evaluated for EC operation regions that are
  not expected to be used.

  This confuses the platform firmware and provokes various types of
  misbehavior on some systems (Rafael Wysocki)"

* tag 'acpi-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: EC: Evaluate _REG outside the EC scope more carefully
  ACPICA: Add a depth argument to acpi_execute_reg_methods()
  Revert "ACPI: EC: Evaluate orphan _REG under EC device"