]> git.ipfire.org Git - thirdparty/linux.git/log
thirdparty/linux.git
3 months agodrm/i915/mchbar: Use intel_de_read*() for MCHBAR register accesses
Ville Syrjälä [Tue, 31 Mar 2026 15:42:58 +0000 (18:42 +0300)] 
drm/i915/mchbar: Use intel_de_read*() for MCHBAR register accesses

Replace the naked intel_uncore_read*() with intel_de_read*()
in the MCHBAR code.

v2: Rebase due to intel_uncore_read64_2x32()

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260331154259.24600-12-ville.syrjala@linux.intel.com
3 months agodrm/i915/vrr: Use intel_de_read64_2x32()
Ville Syrjälä [Tue, 31 Mar 2026 15:42:57 +0000 (18:42 +0300)] 
drm/i915/vrr: Use intel_de_read64_2x32()

Replace the pointless use of intel_de_read64_2x32_volatile()
with the simpler intel_de_read64_2x32().

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260331154259.24600-11-ville.syrjala@linux.intel.com
3 months agodrm/i915/de: Add a simple intel_de_read64_2x32()
Ville Syrjälä [Tue, 31 Mar 2026 15:42:56 +0000 (18:42 +0300)] 
drm/i915/de: Add a simple intel_de_read64_2x32()

intel_de_read64_2x32_volatile() is a complex beast because
it needs to deal with volatile register values. For simpler
cases we can simply do a pair normal intel_de_read()s.

My main reason for hating overuse of intel_de_read64_2x32_volatile()
is that it makes register tracepoints confusing. It always
does three accesses in the somewhat weird udw,ldw,udw order,
confusing the reader of the trace. Much more clear if we just
observe the two reads in the natural little endian order.

We also have no non-volatile use case where the LDW and UDW
are stored in non-consecutive registers, so we can just pass
along a single register offset.

v2: Put the function arguments on one line (Jani)

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260331154259.24600-10-ville.syrjala@linux.intel.com
3 months agodrm/i915/de: s/intel_de_read64_2x32()/intel_de_read64_2x32_volatile()/
Ville Syrjälä [Tue, 31 Mar 2026 15:42:55 +0000 (18:42 +0300)] 
drm/i915/de: s/intel_de_read64_2x32()/intel_de_read64_2x32_volatile()/

The raison d'etre of intel_de_read64_2x32() is that it can
handle registers where volatile values are split across two
registers. I don't like that it's being used needlessly.

Rename it to intel_de_read64_2x32_volatile() to make it
more clear when it should be used.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260331154259.24600-9-ville.syrjala@linux.intel.com
3 months agodrm/i915/de: Add intel_de_read16()
Ville Syrjälä [Tue, 31 Mar 2026 15:42:54 +0000 (18:42 +0300)] 
drm/i915/de: Add intel_de_read16()

We'll need a replacement for intel_uncore_read16() in order to
untangle intel_mchbar_read16() from uncore. As with the 8 bit
counterpart this doesn't need to work on modern platforms
so we can forgo all the DMC wakelock stuff and whatnot.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260331154259.24600-8-ville.syrjala@linux.intel.com
3 months agodrm/i915/mchbar: Use intel_mchbar_read*() instead of intel_uncore_read*()
Ville Syrjälä [Tue, 31 Mar 2026 15:42:53 +0000 (18:42 +0300)] 
drm/i915/mchbar: Use intel_mchbar_read*() instead of intel_uncore_read*()

Replace all the naked intel_uncore_read*() accesses to MCHBAR
registers with the dedicated intel_mchbar_read*().

v2: Rebase due to the intel_mchbar_read64_2x32() rename

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260331154259.24600-7-ville.syrjala@linux.intel.com
3 months agodrm/i915/mchbar: Use intel_mchbar_read() instead of intel_de_read()
Ville Syrjälä [Tue, 31 Mar 2026 15:42:52 +0000 (18:42 +0300)] 
drm/i915/mchbar: Use intel_mchbar_read() instead of intel_de_read()

We are doing a few accesses to MCHBAR registers with intel_de_read().
Use the dedicated intel_mchbar_read() instead.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260331154259.24600-6-ville.syrjala@linux.intel.com
3 months agodrm/i915/mchbar: WARN when accessing non-MCHBAR registers via intel_mchbar_read*()
Ville Syrjälä [Tue, 31 Mar 2026 15:42:51 +0000 (18:42 +0300)] 
drm/i915/mchbar: WARN when accessing non-MCHBAR registers via intel_mchbar_read*()

The intel_mchbar_read*() functions should only be used for
accessing MCHBAR registers. Warn if someone tries to use
them for other registers.

I suppose we could even have a dedicated type for MCHBAR
registers. But that is true for many other special register
types as well, and so far we haven't bothered adding any
special types apart from i915_mcr_reg_t.

v2: Print the register offset (Jani)
    Mention i915_mcr_reg_t (Jani)

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260331154259.24600-5-ville.syrjala@linux.intel.com
3 months agopowercap: intel_rapl: Consolidate PL4 and PMU support flags into rapl_defaults
Kuppuswamy Sathyanarayanan [Tue, 31 Mar 2026 21:19:50 +0000 (14:19 -0700)] 
powercap: intel_rapl: Consolidate PL4 and PMU support flags into rapl_defaults

Currently, PL4 and MSR-based RAPL PMU support are detected using
separate CPU ID tables (pl4_support_ids and pmu_support_ids) in the
MSR driver probe path. This creates a maintenance burden since adding
a new CPU requires updates in two places: the rapl_ids table and one
or both of these capability tables.

Consolidate PL4 and PMU capability information directly into
struct rapl_defaults by adding msr_pl4_support and msr_pmu_support
flags. This allows per-CPU capability to be expressed in a single
place alongside other per-CPU defaults, eliminating the duplicate
CPU ID tables entirely.

No functional changes are intended.

Co-developed-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Link: https://patch.msgid.link/20260331211950.3329932-8-sathyanarayanan.kuppuswamy@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
3 months agodrm/i915/mchbar: Define the end of the MCHBAR mirror
Ville Syrjälä [Tue, 31 Mar 2026 15:42:50 +0000 (18:42 +0300)] 
drm/i915/mchbar: Define the end of the MCHBAR mirror

Add defines for the end of the MCHBAR mirror. I'm planning to
use this for some range sanity checks.

BSpec: 51771
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260331154259.24600-4-ville.syrjala@linux.intel.com
3 months agopowercap: intel_rapl: Move MSR primitives to MSR driver
Kuppuswamy Sathyanarayanan [Tue, 31 Mar 2026 21:19:49 +0000 (14:19 -0700)] 
powercap: intel_rapl: Move MSR primitives to MSR driver

MSR-specific RAPL primitives differ from those used by TPMI and MMIO
interfaces. Keeping them in the common driver requires
interface-specific handling logic and makes the common layer
unnecessarily complex.

Move the MSR primitive definitions and associated bitmasks into the
MSR interface driver. This change includes:

 1. Move MSR-specific bitmask definitions to RAPL MSR driver.
 2. Add MSR-local struct rapl_primitive_info instance and assign it to
    priv->rpi during MSR probe.
 3. Remove the primitive assignment logic from rapl_config() in the
    common driver.

No functional changes are intended.

Co-developed-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Link: https://patch.msgid.link/20260331211950.3329932-7-sathyanarayanan.kuppuswamy@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
3 months agothermal: intel: int340x: processor: Move MMIO primitives to MMIO driver
Kuppuswamy Sathyanarayanan [Tue, 31 Mar 2026 21:19:48 +0000 (14:19 -0700)] 
thermal: intel: int340x: processor: Move MMIO primitives to MMIO driver

MMIO-specific primitives differ from those used by the TPMI interface.
The MSR and MMIO interfaces shared the same primitives in the common
driver, but MMIO does not require many MSR-specific entries (like PSYS).
Keeping these in the common driver does not add any value and requires
interface-specific handling logic that makes the common layer
unnecessarily complex.

Move the MMIO primitive definitions and associated bitmasks into the
MMIO interface driver. This change includes:

 1. Add MMIO-local struct rapl_primitive_info instance without
    MSR-specific entries and assign it to priv->rpi during MMIO
    initialization.
 2. Remove the RAPL MMIO case from rapl_config() in the common driver.

No functional changes are intended.

Co-developed-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Link: https://patch.msgid.link/20260331211950.3329932-6-sathyanarayanan.kuppuswamy@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
3 months agopowercap: intel_rapl: Move TPMI primitives to TPMI driver
Kuppuswamy Sathyanarayanan [Tue, 31 Mar 2026 21:19:47 +0000 (14:19 -0700)] 
powercap: intel_rapl: Move TPMI primitives to TPMI driver

TPMI-specific RAPL primitives differ from those used by MSR and MMIO
interfaces. Keeping them in the common RAPL driver requires
interface-specific handling logic and makes the common layer
unnecessarily complex.

Move the TPMI primitive definitions and associated bitmasks into the
TPMI interface driver. This change includes:

 1. Move TPMI-specific bitmask definitions from intel_rapl_common.c to
    intel_rapl_tpmi.c.
 2. Add TPMI-local struct rapl_primitive_info instance and assign it to
    priv->rpi during TPMI probe.
 3. Remove the RAPL TPMI related definitions from the common driver.

No functional changes are intended.

Co-developed-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Link: https://patch.msgid.link/20260331211950.3329932-5-sathyanarayanan.kuppuswamy@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
3 months agopowercap: intel_rapl: Move primitive info to header for interface drivers
Kuppuswamy Sathyanarayanan [Tue, 31 Mar 2026 21:19:46 +0000 (14:19 -0700)] 
powercap: intel_rapl: Move primitive info to header for interface drivers

RAPL primitive information varies across different RAPL interfaces
(MSR, TPMI, MMIO). Keeping them in the common code adds no benefit, but
requires interface-specific handling logic and makes the common layer
unnecessarily complex.

Move the primitive info infrastructure to the shared header to allow
interface drivers to configure RAPL primitives. Specific changes:

 1. Move struct rapl_primitive_info, enum unit_type, and
    PRIMITIVE_INFO_INIT macro to intel_rapl.h.
 2. Change the @rpi field in struct rapl_if_priv from void * to
    struct rapl_primitive_info * to improve type safety and eliminate
    unnecessary casts.

No functional changes. This is a preparatory refactoring to allow
interface drivers to supply their own RAPL primitive settings.

Co-developed-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Link: https://patch.msgid.link/20260331211950.3329932-4-sathyanarayanan.kuppuswamy@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
3 months agopowercap: intel_rapl: Remove unused macro definitions
Kuppuswamy Sathyanarayanan [Tue, 31 Mar 2026 21:19:45 +0000 (14:19 -0700)] 
powercap: intel_rapl: Remove unused macro definitions

Remove the following unused macro definitions from the RAPL common
driver:

 * DOMAIN_STATE_INACTIVE and DOMAIN_STATE_POWER_LIMIT_SET
 * IOSF_CPU_POWER_BUDGET_CTL_BYT and IOSF_CPU_POWER_BUDGET_CTL_TNG
 * MAX_PRIM_NAME

No functional changes.

Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Link: https://patch.msgid.link/20260331211950.3329932-3-sathyanarayanan.kuppuswamy@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
3 months agopowercap: intel_rapl: Move MSR default settings into MSR interface driver
Kuppuswamy Sathyanarayanan [Tue, 31 Mar 2026 21:19:44 +0000 (14:19 -0700)] 
powercap: intel_rapl: Move MSR default settings into MSR interface driver

MSR-specific RAPL defaults differ from those used by the TPMI interface.
The MMIO and MSR interfaces shared the same rapl_defaults pointer in the
common driver, but MMIO does not require the CPU-specific variations
needed by MSR. Keeping these in the common driver adds unnecessary
complexity and MSR-specific initialization.

Move MSR defaults and CPU matching into the MSR interface driver.

Moves
-----
  * Move rapl_check_unit_atom(), set_floor_freq_atom(), and
    rapl_compute_time_window_atom() into intel_rapl_msr.c.
  * Move MSR unit-field GENMASK definitions and local constants.
  * Move all MSR-related rapl_defaults tables and the CPU-ID matching
    logic (rapl_ids[]) into the MSR driver.
  * Move iosf_mbi dependencies (floor-frequency control and related MBI
    register definitions) as they are MSR-platform specific.

Modifications
-------------
  * Replace the common driver's platform-device manual alloc/add sequence
    with platform_device_register_data() in the MSR driver to pass
    matching rapl_defaults as platform_data.
  * Update MSR driver probe to assign pdev->dev.platform_data to
    priv->defaults.
  * Update Atom helper functions to use rp->lead_cpu directly for MSR
    reads/writes instead of the generic get_rid().
  * Update Atom floor frequency logic to access defaults via the
    package private data pointer.
  * Convert MSR device creation from fs_initcall() to module_init().
    This preserves existing enumeration behavior as the driver was
    already using module_init().
  * Since rapl_ids need to exist after boot, remove __initconst
    specifier.

No functional changes are expected.

Co-developed-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://patch.msgid.link/20260331211950.3329932-2-sathyanarayanan.kuppuswamy@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
3 months agodrm/i915/mchbar: Provide intel_mchbar_read*() abstraction
Ville Syrjälä [Tue, 31 Mar 2026 15:42:49 +0000 (18:42 +0300)] 
drm/i915/mchbar: Provide intel_mchbar_read*() abstraction

MCHBAR registers are a bit special in that:
- we access them through the mirror
- the mirror is read only on HSW+
- the mirror requires the actual MCHBAR to be enabled in device 0:0.0
- the mirror is gone on MTL+

So I'd prefer to treat MCHBAR registers as a bit special in
the code as well, and do all accesses to them via dedicated
functions. Prodive such functions in the form of
intel_mchbar_read*().

v2: Put the function arguments on one line
    No intel_uncore_read64() on xe, use intel_uncore_read64_2x32()
    Name the new function intel_mchbar_read64_2x32() as well

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260331154259.24600-3-ville.syrjala@linux.intel.com
3 months agodrm/i915/qgv: Use intel_de_read() for MTL_MEM_SS_INFO* reads
Ville Syrjälä [Tue, 31 Mar 2026 15:42:48 +0000 (18:42 +0300)] 
drm/i915/qgv: Use intel_de_read() for MTL_MEM_SS_INFO* reads

The MTL_MEM_SS_INFO* are just regular display registers. Use
intel_de_read() to access them.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260331154259.24600-2-ville.syrjala@linux.intel.com
3 months agocpuidle: clean up dead dependencies on CPU_IDLE in Kconfig
Julian Braha [Tue, 31 Mar 2026 07:49:20 +0000 (08:49 +0100)] 
cpuidle: clean up dead dependencies on CPU_IDLE in Kconfig

The Kconfig in the parent directory already has the first 'if CPU_IDLE'
gating the inclusion of this Kconfig, meaning that the 'depends on
CPUIDLE' statements in these config options are effectively dead code.

Leave the 'if CPU_IDLE...endif' condition, and remove the individual
'depends on' statements in Kconfig.mips and Kconfig.powerpc

This dead code was found by kconfirm, a static analysis tool for
Kconfig.

Signed-off-by: Julian Braha <julianbraha@gmail.com>
[ rjw: Subject and changelog edits ]
Link: https://patch.msgid.link/20260331074920.41269-1-julianbraha@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
3 months agocpufreq: clean up dead code in Kconfig
Julian Braha [Tue, 31 Mar 2026 07:42:42 +0000 (08:42 +0100)] 
cpufreq: clean up dead code in Kconfig

There is already an 'if CPU_FREQ' condition wrapping these config
options, making the 'depends on' statement for each a duplicate
dependency (dead code).

Leave the outer 'if CPU_FREQ...endif' and remove the individual
'depends on' statement from each option.

This dead code was found by kconfirm, a static analysis tool for
Kconfig.

Signed-off-by: Julian Braha <julianbraha@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
[ rjw: Subject and changelog edits ]
Link: https://patch.msgid.link/20260331074242.39986-1-julianbraha@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
3 months agocpufreq: Allocate QoS freq_req objects with policy
Viresh Kumar [Tue, 31 Mar 2026 05:03:46 +0000 (10:33 +0530)] 
cpufreq: Allocate QoS freq_req objects with policy

A recent change exposed a bug in the error path: if
freq_qos_add_request(boost_freq_req) fails, min_freq_req may remain a
valid pointer even though it was never successfully added. During policy
teardown, this leads to an unconditional call to
freq_qos_remove_request(), triggering a WARN.

The current design allocates all three freq_req objects together, making
the lifetime rules unclear and error handling fragile.

Simplify this by allocating the QoS freq_req objects at policy
allocation time. The policy itself is dynamically allocated, and two of
the three requests are always needed anyway. This ensures consistent
lifetime management and eliminates the inconsistent state in failure
paths.

Reported-by: Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>
Fixes: 6e39ba4e5a82 ("cpufreq: Add boost_freq_req QoS request")
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Lifeng Zheng <zhenglifeng1@huawei.com>
Tested-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>
Link: https://patch.msgid.link/a293f29d841b86c51f34699c6e717e01858d8ada.1774933424.git.viresh.kumar@linaro.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
3 months agoASoC: tegra: Add error logging for probe and callback failures
Mark Brown [Wed, 1 Apr 2026 13:53:29 +0000 (14:53 +0100)] 
ASoC: tegra: Add error logging for probe and callback failures

Sheetal <sheetal@nvidia.com> says:

Resend pending  v3 patches with fixes and add remaining
dev_err_probe() conversions.

Patch 1 replaces v3 patch 03/14 (ADMAIF).
Patch 2 replaces v3 patch 09/14 (OPE/PEQ/MBDRC).
Patch 3 is new - adds regmap init conversions across 10 drivers.
Patch 4 is new - adds clock error conversions in tegra_asoc_machine.

3 months agoASoC: tegra: Use dev_err_probe() in tegra_asoc_machine probe
Sheetal [Wed, 1 Apr 2026 11:25:00 +0000 (11:25 +0000)] 
ASoC: tegra: Use dev_err_probe() in tegra_asoc_machine probe

Use dev_err_probe() for clock errors in the tegra_asoc_machine
probe path.

Signed-off-by: Sheetal <sheetal@nvidia.com>
Link: https://patch.msgid.link/20260401112500.4076861-5-sheetal@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: tegra: Use dev_err_probe() for regmap init failures
Sheetal [Wed, 1 Apr 2026 11:24:59 +0000 (11:24 +0000)] 
ASoC: tegra: Use dev_err_probe() for regmap init failures

Use dev_err_probe() for regmap init failures in Tegra audio driver
probe paths.

Signed-off-by: Sheetal <sheetal@nvidia.com>
Link: https://patch.msgid.link/20260401112500.4076861-4-sheetal@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: tegra: Use dev_err_probe() in OPE, PEQ and MBDRC drivers
Sheetal [Wed, 1 Apr 2026 11:24:58 +0000 (11:24 +0000)] 
ASoC: tegra: Use dev_err_probe() in OPE, PEQ and MBDRC drivers

Log errors in the Tegra210 OPE, PEQ and MBDRC probe paths using
dev_err_probe(). Drop redundant dev_err() at tegra210_peq_regmap_init()
and tegra210_mbdrc_regmap_init() call sites in ope_probe() since
these functions already log errors internally.

Signed-off-by: Sheetal <sheetal@nvidia.com>
Link: https://patch.msgid.link/20260401112500.4076861-3-sheetal@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: tegra: Add error logging in tegra210_admaif driver
Sheetal [Wed, 1 Apr 2026 11:24:57 +0000 (11:24 +0000)] 
ASoC: tegra: Add error logging in tegra210_admaif driver

Log errors in the Tegra210 ADMAIF probe and runtime callback paths.
Drop redundant dev_err() at tegra_isomgr_adma_register() call site
since it already logs errors internally.

Signed-off-by: Sheetal <sheetal@nvidia.com>
Link: https://patch.msgid.link/20260401112500.4076861-2-sheetal@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoMerge tag 'counter-fixes-for-7.0' of ssh://gitolite.kernel.org/pub/scm/linux/kernel...
Greg Kroah-Hartman [Wed, 1 Apr 2026 13:45:54 +0000 (15:45 +0200)] 
Merge tag 'counter-fixes-for-7.0' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-linus

William writes:

Counter fixes for 7.0

Two fixes for rz-mut3-cnt: synchronize runtime PM usage count to toggle
state of the counter, and set counter->parent during probe to ensure the
current dev pointer is accessed during driver operation.

* tag 'counter-fixes-for-7.0' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter:
  counter: rz-mtu3-cnt: do not use struct rz_mtu3_channel's dev member
  counter: rz-mtu3-cnt: prevent counter from being toggled multiple times

3 months agoKVM: arm64: Don't hold 'vm_table_lock' across guest page reclaim
Will Deacon [Tue, 31 Mar 2026 15:50:55 +0000 (16:50 +0100)] 
KVM: arm64: Don't hold 'vm_table_lock' across guest page reclaim

Now that the teardown of a VM cannot be finalised as long as a reference
is held on the VM, rework __pkvm_reclaim_dying_guest_page() to hold a
reference to the dying VM rather than take the global 'vm_table_lock'
during the reclaim operation.

Signed-off-by: Will Deacon <will@kernel.org>
Link: https://patch.msgid.link/20260331155056.28220-4-will@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
3 months agoKVM: arm64: Allow get_pkvm_hyp_vm() to take a reference to a dying VM
Will Deacon [Tue, 31 Mar 2026 15:50:54 +0000 (16:50 +0100)] 
KVM: arm64: Allow get_pkvm_hyp_vm() to take a reference to a dying VM

Now that completion of the teardown path requires a refcount of zero for
the target VM, we can allow get_pkvm_hyp_vm() to take a reference on a
dying VM, which is necessary to unshare pages with a non-protected VM
during the teardown process itself.

Note that vCPUs belonging to a dying VM cannot be loaded and pages can
only be reclaimed from a protected VM (via
__pkvm_reclaim_dying_guest_page()) if the target VM is in the dying
state.

Signed-off-by: Will Deacon <will@kernel.org>
Link: https://patch.msgid.link/20260331155056.28220-3-will@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
3 months agoKVM: arm64: Prevent teardown finalisation of referenced 'hyp_vm'
Will Deacon [Tue, 31 Mar 2026 15:50:53 +0000 (16:50 +0100)] 
KVM: arm64: Prevent teardown finalisation of referenced 'hyp_vm'

Destroying a 'hyp_vm' with an elevated referenced count in
__pkvm_finalize_teardown_vm() is only going to lead to tears.

In preparation for allowing limited references to be acquired on dying
VMs during the teardown process, factor out the handle-to-vm logic for
the teardown path and reuse it for both the 'start' and 'finalise'
stages of the teardown process.

Signed-off-by: Will Deacon <will@kernel.org>
Link: https://patch.msgid.link/20260331155056.28220-2-will@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
3 months agorv: Allow epoll in rtapp-sleep monitor
Nam Cao [Wed, 1 Apr 2026 13:08:28 +0000 (15:08 +0200)] 
rv: Allow epoll in rtapp-sleep monitor

Since commit 0c43094f8cc9 ("eventpoll: Replace rwlock with spinlock"),
epoll_wait is real-time-safe syscall for sleeping.

Add epoll_wait to the list of rt-safe sleeping APIs.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Reviewed-by: Gabriele Monaco <gmonaco@redhat.com>
Link: https://lore.kernel.org/r/20260401130828.3115428-1-namcao@linutronix.de
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
3 months agoASoC: mxs-sgtl5000: disable MCLK on error paths of mxs_sgtl5000_probe()
Haoxiang Li [Wed, 1 Apr 2026 05:30:51 +0000 (13:30 +0800)] 
ASoC: mxs-sgtl5000: disable MCLK on error paths of mxs_sgtl5000_probe()

Call mxs_saif_put_mclk() to disable MCLK on error
paths of mxs_sgtl5000_probe().

Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Link: https://patch.msgid.link/20260401053051.586290-1-lihaoxiang@isrc.iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoALSA: es1688: add ISA suspend and resume callbacks
Cássio Gabriel [Wed, 1 Apr 2026 11:45:37 +0000 (08:45 -0300)] 
ALSA: es1688: add ISA suspend and resume callbacks

The ISA ES1688 driver still carries a disabled suspend/resume block in
its isa_driver definition, while the same file already provides minimal
power-management handling for the PnP ES968 path.

Add ISA-specific PM callbacks and factor the existing ES1688 suspend and
resume sequence into common card-level helpers shared by both probe
paths. Suspend moves the card to D3hot. Resume reinitializes the chip
with snd_es1688_reset() and restores the card to D0, propagating reset
failures to the caller.

This wires up power-management callbacks for the ISA path and keeps the
PM handling consistent between the ISA and PnP probe paths.

Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260401-alsa-es1688-pm-v1-1-510767628fe6@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 months agoALSA: ctxfi: Precompute SRC allocation loop bound
Harin Lee [Wed, 1 Apr 2026 09:01:59 +0000 (18:01 +0900)] 
ALSA: ctxfi: Precompute SRC allocation loop bound

Replace the capability checks in the SRC and SRCIMP allocation loops
with a precomputed loop bound. Cards with a dedicated mic input
(SB1270, OK0010) allocate all NUM_ATC_SRCS entries, otherwise stop
at 4.

Signed-off-by: Harin Lee <me@harin.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260401090159.2404387-4-me@harin.net
3 months agoALSA: ctxfi: Use correct DAIO type for da_desc
Harin Lee [Wed, 1 Apr 2026 09:01:58 +0000 (18:01 +0900)] 
ALSA: ctxfi: Use correct DAIO type for da_desc

Skip the unused DAIO type per model (SPDIFIO on CTSB073X, SPDIFI_BAY
on all others) and use the correct DAIO type directly as da_desc
type. This removes the mismatch and misleading between the actual
DAIO resource and the da_desc type like SPDIFI_BAY (formerly SPDIFI1).
Update related functions accordingly, and drop the unreachable
SPDIFI_BAY case from the hw20k2 daio_device_index().

Signed-off-by: Harin Lee <me@harin.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260401090159.2404387-3-me@harin.net
3 months agoALSA: ctxfi: Rename SPDIFI1 to SPDIFI_BAY
Harin Lee [Wed, 1 Apr 2026 09:01:57 +0000 (18:01 +0900)] 
ALSA: ctxfi: Rename SPDIFI1 to SPDIFI_BAY

Rename the SPDIFI1 enum value to SPDIFI_BAY to better reflect its
purpose as the S/PDIF input on the internal drive bay, as opposed to
the S/PDIF input via Flexijack or optical (SPDIFIO; not SPDIFI-zero).

Signed-off-by: Harin Lee <me@harin.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260401090159.2404387-2-me@harin.net
3 months agoMerge branch 'for-linus' into for-next
Takashi Iwai [Wed, 1 Apr 2026 12:42:56 +0000 (14:42 +0200)] 
Merge branch 'for-linus' into for-next

Pull 7.0 devel branch for further cleanups of ctxfi driver & co.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 months agoASoC: amd: ps: Fix missing leading zeros in subsystem_device SSID log
Simon Trimmer [Tue, 31 Mar 2026 13:19:16 +0000 (13:19 +0000)] 
ASoC: amd: ps: Fix missing leading zeros in subsystem_device SSID log

Ensure that subsystem_device is printed with leading zeros when combined
with subsystem_vendor to form the SSID. Without this, devices with upper
bits unset may appear to have an incorrect SSID in the debug output.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://patch.msgid.link/20260331131916.145546-1-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: ak5558: remove unused snd_soc_component
Kuninori Morimoto [Wed, 1 Apr 2026 00:19:23 +0000 (00:19 +0000)] 
ASoC: ak5558: remove unused snd_soc_component

ak5558_priv::component has never been used. Remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/875x6bttv8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: soc.h: remove snd_soc_of_parse_audio_prefix()
Kuninori Morimoto [Wed, 1 Apr 2026 00:19:06 +0000 (00:19 +0000)] 
ASoC: soc.h: remove snd_soc_of_parse_audio_prefix()

No one is using snd_soc_of_parse_audio_prefix(). Remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/877bqrttvp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoMerge tag 'hisi-dts-fixes-for-7.0' of https://github.com/hisilicon/linux-hisi into...
Krzysztof Kozlowski [Wed, 1 Apr 2026 11:51:16 +0000 (13:51 +0200)] 
Merge tag 'hisi-dts-fixes-for-7.0' of https://github.com/hisilicon/linux-hisi into arm/fixes

HiSilicon dts fixes for v7.0

- Correct the PCIe reset GPIO polarity for hi3798cv200-poplar
- Add the missing dma-ranges for hi3798cv200

* tag 'hisi-dts-fixes-for-7.0' of https://github.com/hisilicon/linux-hisi:
  arm64: dts: hisilicon: hi3798cv200: Add missing dma-ranges
  arm64: dts: hisilicon: poplar: Correct PCIe reset GPIO polarity

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 months agoMerge tag 'qcom-drivers-fixes-for-7.0' of ssh://gitolite.kernel.org/pub/scm/linux...
Krzysztof Kozlowski [Wed, 1 Apr 2026 11:47:03 +0000 (13:47 +0200)] 
Merge tag 'qcom-drivers-fixes-for-7.0' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes

Qualcomm driver fixes for v7.0

Fix the length of the PD restart reason string in pd-mapper to avoid
QMI decoding errors, resulting in the notification being dropped.

Fix the newly introduce handling of TBT/USB4 notifications in pmic_glink
altmode driver, as it broke the handling of non-TBT/USB4 DisplayPort
unplug events.

* tag 'qcom-drivers-fixes-for-7.0' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  soc: qcom: pmic_glink_altmode: Fix TBT->SAFE->!TBT transition
  soc: qcom: pmic_glink_altmode: Fix SVID=DP && unconnected edge case
  soc: qcom: pd-mapper: Fix element length in servreg_loc_pfr_req_ei

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 months agoMerge tag 'riscv-soc-fixes-for-v7.0-rc6' of ssh://gitolite.kernel.org/pub/scm/linux...
Krzysztof Kozlowski [Wed, 1 Apr 2026 11:42:51 +0000 (13:42 +0200)] 
Merge tag 'riscv-soc-fixes-for-v7.0-rc6' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/conor/linux into arm/fixes

RISC-V soc fixes for v7.0-rc6

Microchip:
More resource leak fixes for unlikely scenarios, and a change to the
auto-update "firmware" driver to prevent it probing on systems with
engineering silicon where it cannot be used.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
* tag 'riscv-soc-fixes-for-v7.0-rc6' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/conor/linux:
  firmware: microchip: fail auto-update probe if no flash found
  soc: microchip: mpfs-mss-top-sysreg: Fix resource leak on driver unbind
  soc: microchip: mpfs-control-scb: Fix resource leak on driver unbind

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 months agoMerge tag 'nuvoton-arm64-7.1-devicetree-0' of ssh://gitolite.kernel.org/pub/scm/linux...
Krzysztof Kozlowski [Wed, 1 Apr 2026 11:38:29 +0000 (13:38 +0200)] 
Merge tag 'nuvoton-arm64-7.1-devicetree-0' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/bmc/linux into soc/dt

nuvoton: first batch of arm64 devicetree changes for v7.1

Just the one change this time, dropping syscon properties where they weren't
defined.

* tag 'nuvoton-arm64-7.1-devicetree-0' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/bmc/linux:
  arm64: dts: nuvoton: drop unused syscon property from watchdog node

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 months agoMerge tag 'aspeed-7.1-devicetree-0' of ssh://gitolite.kernel.org/pub/scm/linux/kernel...
Krzysztof Kozlowski [Wed, 1 Apr 2026 11:35:29 +0000 (13:35 +0200)] 
Merge tag 'aspeed-7.1-devicetree-0' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/bmc/linux into soc/dt

aspeed: first batch of devicetree changes for v7.1

New platforms:

- Asus Kommando IPMI card
- Asrock Paul IPMI card

Updated platforms:

- Anacapa (Meta): NFC and EEPROMs
- MSX4 (Nvidia): 128M layout for the alternate boot flash

* tag 'aspeed-7.1-devicetree-0' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/bmc/linux:
  ARM: dts: aspeed: anacapa: Add retimer EEPROMs
  ARM: dts: aspeed: anacapa: add NFC device
  ARM: dts: aspeed: Add Asrock Paul IPMI card
  dt-bindings: arm: aspeed: Add Asrock Paul IPMI card
  ARM: dts: aspeed: Add 128M alt flash layout to NVIDIA MSX4
  ARM: dts: aspeed: Add Asus Kommando IPMI card
  dt-bindings: arm: aspeed: Add Asus Kommando IPMI card

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 months agopmdomain: Merge branch fixes into next
Ulf Hansson [Wed, 1 Apr 2026 11:34:40 +0000 (13:34 +0200)] 
pmdomain: Merge branch fixes into next

Merge the pmdomain fixes for v7.0-rc[n] into the next branch, to allow
them to get tested together with the pmdomain changes that are targeted
for the next release.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: Merge branch pmdomain into next
Ulf Hansson [Wed, 1 Apr 2026 11:33:35 +0000 (13:33 +0200)] 
pmdomain: Merge branch pmdomain into next

Merge the immutable branch pmdomain into next to get the changes queued and
tested for the next release. The pmdomain branch hosts minor core changes
for pmdomain.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agoMerge tag 'aspeed-7.0-fixes-0' of ssh://gitolite.kernel.org/pub/scm/linux/kernel...
Krzysztof Kozlowski [Wed, 1 Apr 2026 11:29:57 +0000 (13:29 +0200)] 
Merge tag 'aspeed-7.0-fixes-0' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/bmc/linux into arm/fixes

aspeed: first batch of fixes for v7.0

* tag 'aspeed-7.0-fixes-0' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/bmc/linux:
  soc: aspeed: socinfo: Mask table entries for accurate SoC ID matching

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 months agoMerge tag 'reset-fixes-for-v7.0-2' of https://git.pengutronix.de/git/pza/linux into...
Krzysztof Kozlowski [Wed, 1 Apr 2026 11:25:50 +0000 (13:25 +0200)] 
Merge tag 'reset-fixes-for-v7.0-2' of https://git.pengutronix.de/git/pza/linux into arm/fixes

Reset controller fixes for v7.0, part 2

* Decouple spacemit K3 reset lines that were incorrectly coupled
  together as one, but are in fact separate resets in hardware.
* Fix a double free in the reset_add_gpio_aux_device() error path.
  This has already been fixed on reset/next by commit a9b95ce36de4
  ("reset: gpio: add a devlink between reset-gpio and its consumer").
* Fix the MODULE_AUTHOR string in the rzg2l-usbphy-ctrl driver.

* tag 'reset-fixes-for-v7.0-2' of https://git.pengutronix.de/git/pza/linux:
  reset: spacemit: k3: Decouple composite reset lines
  reset: gpio: fix double free in reset_add_gpio_aux_device() error path
  reset: rzg2l-usbphy-ctrl: Fix malformed MODULE_AUTHOR string

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 months agoPM: domains: De-constify fields in struct dev_pm_domain_attach_data
Dmitry Baryshkov [Sun, 1 Feb 2026 10:48:59 +0000 (12:48 +0200)] 
PM: domains: De-constify fields in struct dev_pm_domain_attach_data

It doesn't really make sense to keep u32 fields to be marked as const.
Having the const fields prevents their modification in the driver. Instead
the whole struct can be defined as const, if it is constant.

Fixes: 161e16a5e50a ("PM: domains: Add helper functions to attach/detach multiple PM domains")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: qcom: cpr: simplify main allocation
Rosen Penev [Sun, 15 Mar 2026 21:41:53 +0000 (14:41 -0700)] 
pmdomain: qcom: cpr: simplify main allocation

Remove kcalloc by using a flexible array member to combine allocations.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: bcm: bcm2835-power: Replace open-coded polling with readl_poll_timeout_atomic()
Maíra Canal [Tue, 17 Mar 2026 22:41:50 +0000 (19:41 -0300)] 
pmdomain: bcm: bcm2835-power: Replace open-coded polling with readl_poll_timeout_atomic()

Replace hand-rolled ktime_get_ns()/cpu_relax() polling loops with
readl_poll_timeout_atomic() for the power-on (POWOK), and memory
repair (MRDONE) waits.

No functional change intended.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: sunxi: Add support for A733 to Allwinner PCK600 driver
Yuanshen Cao [Thu, 5 Mar 2026 03:34:08 +0000 (03:34 +0000)] 
pmdomain: sunxi: Add support for A733 to Allwinner PCK600 driver

The Allwinner A733 PCK600, similar to A523 PCK600, is likely a
customized version of ARM PCK-600 power controller. It shares the same
BSP driver with A523. According to the BSP provided by Radxa, unlike
A523, it doesn't require reset, as well as a different pair of delay
values.

Make reset optional in the sunxi pck600 driver and add support
for A733.

Signed-off-by: Yuanshen Cao <alex.caoys@gmail.com>
Reviewed-by: Chen-Yu Tsai <wens@kernel.org> # matched against BSP driver
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: qcom: rpmhpd: Add Eliza RPMh Power Domains
Abel Vesa [Mon, 2 Mar 2026 13:29:32 +0000 (15:29 +0200)] 
pmdomain: qcom: rpmhpd: Add Eliza RPMh Power Domains

Add RPMh Power Domains support for the Eliza platform. The list of power
domains is taken from downstream. Even though the cmd-db does list MMCX
and MXC, they are not used, so they should not be describe.

Reviewed-by: Taniya Das <taniya.das@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: arm: Add print after a successful probe for SCMI power domains
Ulf Hansson [Wed, 4 Mar 2026 10:14:57 +0000 (11:14 +0100)] 
pmdomain: arm: Add print after a successful probe for SCMI power domains

It can be discussed how useful a print is after a successful probe. In the
SCMI power domain case it's seems valuable, as it let us inform about the
number of initialized power domains too, which is fetched from firmware.

Therefore, let's add a print about this, which also aligns with the
behaviour of the SCMI perf domain driver.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Acked-by: Sudeep Holla <sudeep.holla@kernel.org>
3 months agopmdomain: rockchip: quiet regulator error on -EPROBE_DEFER
Chris Morgan [Fri, 30 Jan 2026 16:31:01 +0000 (10:31 -0600)] 
pmdomain: rockchip: quiet regulator error on -EPROBE_DEFER

Change the dev_err() to dev_err_probe() under rockchip_pd_power_on()
to prevent errors early in the boot process when the requested
regulator is not yet available. This converts errors like the following
to debug messages:

rockchip-pm-domain fd8d8000.power-management:power-controller: Failed to enable supply: -517

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Tested-by: Diederik de Haas <diederik@cknow-tech.com>
Reviewed-by: Anand Moon <linux.amoon@gmail.com>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: mediatek: Add power domain driver for MT8189 SoC
Irving-CH Lin [Mon, 2 Feb 2026 06:48:15 +0000 (14:48 +0800)] 
pmdomain: mediatek: Add power domain driver for MT8189 SoC

Introduce a new power domain (pmd) driver for the MediaTek mt8189 SoC.
This driver ports and refines the power domain framework, dividing
hardware blocks (CPU, GPU, peripherals, etc.) into independent power
domains for precise and energy-efficient power management.

Signed-off-by: Irving-CH Lin <irving-ch.lin@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: mediatek: Add bus protect control flow for MT8189
Irving-CH Lin [Mon, 2 Feb 2026 06:48:14 +0000 (14:48 +0800)] 
pmdomain: mediatek: Add bus protect control flow for MT8189

In MT8189 mminfra power domain, the bus protect policy separates
into two parts, one is set before subsys clocks enabled, and another
need to enable after subsys clocks enable.

Signed-off-by: Irving-CH Lin <irving-ch.lin@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: core: Extend statistics for domain idle states with s2idle data
Ulf Hansson [Mon, 19 Jan 2026 14:31:15 +0000 (15:31 +0100)] 
pmdomain: core: Extend statistics for domain idle states with s2idle data

To allow user space to monitor the selection of the domain idle state
during s2idle for a CPU PM domain, let's extend the debugfs support in
genpd with this information.

Suggested-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: core: Show latency/residency for domain idle states in debugfs
Ulf Hansson [Mon, 19 Jan 2026 14:31:14 +0000 (15:31 +0100)] 
pmdomain: core: Show latency/residency for domain idle states in debugfs

Similar to how cpuidle provides the values for latency and residency for
CPU's idle states through sysfs, let's make the corresponding data for PM
domain's idle states available for user space, via genpd's debugfs support.

Suggested-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: core: Restructure domain idle states data for genpd in debugfs
Ulf Hansson [Mon, 19 Jan 2026 14:31:13 +0000 (15:31 +0100)] 
pmdomain: core: Restructure domain idle states data for genpd in debugfs

To prepare for additional information to be added for the domain idle
states in genpd's debugfs, let's make the existing information denser. To
allow that, let's move the static information of the domain idle states
into a separate debugfs file.

Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: qcom: rpmpd: drop stray semicolon
Gabor Juhos [Wed, 21 Jan 2026 16:18:25 +0000 (17:18 +0100)] 
pmdomain: qcom: rpmpd: drop stray semicolon

Drop the unnecessary semicolon after the rpmpd_send_corner()
function's declaration.

Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: imx: scu-pd: Fix device_node reference leak during ->probe()
Felix Gu [Wed, 21 Jan 2026 14:17:17 +0000 (22:17 +0800)] 
pmdomain: imx: scu-pd: Fix device_node reference leak during ->probe()

When calling of_parse_phandle_with_args(), the caller is responsible
to call of_node_put() to release the reference of device node.
In imx_sc_pd_get_console_rsrc(), it does not release the reference.

Fixes: 893cfb99734f ("firmware: imx: scu-pd: do not power off console domain")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: ti: omap_prm: Fix a reference leak on device node
Felix Gu [Fri, 16 Jan 2026 12:27:47 +0000 (20:27 +0800)] 
pmdomain: ti: omap_prm: Fix a reference leak on device node

When calling of_parse_phandle_with_args(), the caller is responsible
to call of_node_put() to release the reference of device node.
In omap_prm_domain_attach_dev, it does not release the reference.

Fixes: 58cbff023bfa ("soc: ti: omap-prm: Add basic power domain support")
Signed-off-by: Felix Gu <gu_0233@qq.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: mediatek: scpsys: Add MT7622 Audio power domain to legacy driver
AngeloGioacchino Del Regno [Tue, 13 Jan 2026 11:00:10 +0000 (12:00 +0100)] 
pmdomain: mediatek: scpsys: Add MT7622 Audio power domain to legacy driver

Add the Audio power domain of the MT7622 SoC to the legacy
mtk-scpsys driver (as this legacy SoC is supported only there).

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: mediatek: Simplify with scoped for each OF child loop
Krzysztof Kozlowski [Fri, 2 Jan 2026 12:48:41 +0000 (13:48 +0100)] 
pmdomain: mediatek: Simplify with scoped for each OF child loop

Use scoped for-each loop when iterating over device nodes to make code a
bit simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: ti_sci: handle wakeup constraint for out-of-band wakeup
Kendall Willis [Tue, 30 Dec 2025 21:37:18 +0000 (15:37 -0600)] 
pmdomain: ti_sci: handle wakeup constraint for out-of-band wakeup

For devices capable of out-of-band system wakeups via I/O daisy chaining,
prevent sending wakeup constraints to the PM co-processor. This allows
the system to enter deeper low power modes, as the device is not marked
as requiring power.

Replaces the logic from commit b06bc4727991 ("pmdomain: ti_sci: handle
wake IRQs for IO daisy chain wakeups") since checking out-of-band wakeup
will cover the same functionality.

Detect out-of-band wakeup in the suspend path, and if it exists, skip
sending the constraint.

Signed-off-by: Kendall Willis <k-willis@ti.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: mediatek: mtk-mfg: Expose shader_present as nvmem cell
Nicolas Frattaroli [Sat, 20 Dec 2025 18:49:55 +0000 (19:49 +0100)] 
pmdomain: mediatek: mtk-mfg: Expose shader_present as nvmem cell

Implement nvmem-provider functionality in mtk-mfg-pmdomain, such that it
can expose its GF_REG_SHADER_PRESENT value in the shared memory as an
nvmem cell for panthor.

Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: add audio power island for Marvell PXA1908 SoC
Karel Balej [Sat, 13 Dec 2025 08:48:13 +0000 (09:48 +0100)] 
pmdomain: add audio power island for Marvell PXA1908 SoC

Define power domain which needs to be enabled in order for audio to work
on the PXA1908-based samsung,coreprimevelte smartphone. In the
downstream code, this power-on method is marked as specific to the ULCx
series which is allegedly a codename of sorts with ULC1 corresponding to
the PXA1908.

No other audio components needed for sound to work on this phone are
currently available mainline but some successful testing was performed
with the vendor variants of the respective drivers and with the domain
forced always-on.

Signed-off-by: Karel Balej <balejk@matfyz.cz>
Reviewed-by: Duje Mihanović <duje@dujemihanovic.xyz>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: imx93-blk-ctrl: add support for optional subnodes
Marco Felsch [Mon, 15 Dec 2025 19:18:27 +0000 (20:18 +0100)] 
pmdomain: imx93-blk-ctrl: add support for optional subnodes

This particular block can have DT subnodes describing the LVDS LDB, MIPI
DSI and parallel DPI bridge.

Scan for possible sub-devices within the driver, instead of misusing the
simple-bus to perform the scan.

Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: imx93-blk-ctrl: convert to devm_* only
Marco Felsch [Mon, 15 Dec 2025 19:18:26 +0000 (20:18 +0100)] 
pmdomain: imx93-blk-ctrl: convert to devm_* only

Convert the driver to devm_ APIs only by making use of
devm_add_action_or_reset() and devm_pm_runtime_enable() to simplify the
probe error path and to drop the .remove() callback. This also ensures
that the device release order equals the device probe error path order.

Furthermore drop the dev_set_drvdata() usage since the only user was the
.remove() callback which is removed by this commit.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: imx93-blk-ctrl: cleanup error path
Marco Felsch [Mon, 15 Dec 2025 19:18:25 +0000 (20:18 +0100)] 
pmdomain: imx93-blk-ctrl: cleanup error path

Call dev_err_probe() directly during return to make the code more
compact.

Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: Merge branch dt into next
Ulf Hansson [Wed, 1 Apr 2026 11:04:25 +0000 (13:04 +0200)] 
pmdomain: Merge branch dt into next

Merge the immutable branch dt into next, to allow the updated DT bindings
to be tested together with the pmdomain changes that are targeted for the
next release.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agopmdomain: imx8mp-blk-ctrl: Keep the NOC_HDCP clock enabled
Jacky Bai [Fri, 20 Mar 2026 08:43:46 +0000 (16:43 +0800)] 
pmdomain: imx8mp-blk-ctrl: Keep the NOC_HDCP clock enabled

Keep the NOC_HDCP clock always enabled to fix the potential hang
caused by the NoC ADB400 port power down handshake.

Fixes: 77b0ddb42add ("soc: imx: add i.MX8MP HDMI blk ctrl HDCP/HRV_MWR")
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agofirmware: thead: Fix buffer overflow and use standard endian macros
Michal Wilczynski [Thu, 3 Apr 2025 13:10:51 +0000 (15:10 +0200)] 
firmware: thead: Fix buffer overflow and use standard endian macros

Addresses two issues in the TH1520 AON firmware protocol driver:

1. Fix a potential buffer overflow where the code used unsafe pointer
   arithmetic to access the 'mode' field through the 'resource' pointer
   with an offset. This was flagged by Smatch static checker as:
   "buffer overflow 'data' 2 <= 3"

2. Replace custom RPC_SET_BE* and RPC_GET_BE* macros with standard
   kernel endianness conversion macros (cpu_to_be16, etc.) for better
   portability and maintainability.

The functionality was re-tested with the GPU power-up sequence,
confirming the GPU powers up correctly and the driver probes
successfully.

[   12.702370] powervr ffef400000.gpu: [drm] loaded firmware
powervr/rogue_36.52.104.182_v1.fw
[   12.711043] powervr ffef400000.gpu: [drm] FW version v1.0 (build
6645434 OS)
[   12.719787] [drm] Initialized powervr 1.0.0 for ffef400000.gpu on
minor 0

Fixes: e4b3cbd840e5 ("firmware: thead: Add AON firmware protocol driver")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/17a0ccce-060b-4b9d-a3c4-8d5d5823b1c9@stanley.mountain/
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Drew Fustini <fustini@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 months agorust_binder: add `command`/`return` tracepoints
Mohamad Alsadhan [Tue, 17 Mar 2026 14:49:47 +0000 (17:49 +0300)] 
rust_binder: add `command`/`return` tracepoints

Add Rust Binder `command` and `return` tracepoint declarations and
wire them in where BC commands are parsed and BR return codes are
emitted to userspace.

Signed-off-by: Mohamad Alsadhan <mo@sdhn.cc>
Link: https://patch.msgid.link/20260317-rust-binder-trace-v3-6-6fae4fbcf637@sdhn.cc
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 months agorust_binder: add fd translation tracepoints
Mohamad Alsadhan [Tue, 17 Mar 2026 14:49:46 +0000 (17:49 +0300)] 
rust_binder: add fd translation tracepoints

Add Rust Binder tracepoint declarations for both `transaction_fd_send`
and `transaction_fd_recv`. Also, wire in the corresponding trace calls
where fd objects are serialised/deserialised.

Signed-off-by: Mohamad Alsadhan <mo@sdhn.cc>
Link: https://patch.msgid.link/20260317-rust-binder-trace-v3-5-6fae4fbcf637@sdhn.cc
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 months agorust_binder: add `transaction_received` tracepoint
Mohamad Alsadhan [Tue, 17 Mar 2026 14:49:45 +0000 (17:49 +0300)] 
rust_binder: add `transaction_received` tracepoint

Add Rust Binder `transaction_received` tracepoint decalaration and
wire in the corresponding trace call when a transaction work item is
accepted for execution.

Signed-off-by: Mohamad Alsadhan <mo@sdhn.cc>
Link: https://patch.msgid.link/20260317-rust-binder-trace-v3-4-6fae4fbcf637@sdhn.cc
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 months agorust_binder: add `wait_for_work` tracepoint
Mohamad Alsadhan [Tue, 17 Mar 2026 14:49:44 +0000 (17:49 +0300)] 
rust_binder: add `wait_for_work` tracepoint

Add the Rust Binder `wait_for_work` tracepoint declaration and wire
it into the thread read path before selecting the work source.

Signed-off-by: Mohamad Alsadhan <mo@sdhn.cc>
Link: https://patch.msgid.link/20260317-rust-binder-trace-v3-3-6fae4fbcf637@sdhn.cc
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 months agorust_binder: add ioctl/read/write done tracepoints
Mohamad Alsadhan [Tue, 17 Mar 2026 14:49:43 +0000 (17:49 +0300)] 
rust_binder: add ioctl/read/write done tracepoints

Add Rust Binder tracepoints declarations for `ioctl_done`,
`read_done` and `write_done`.

Additionally, wire in the new tracepoints into the corresponding
Binder call sites.

Note that the new tracepoints report final errno-style return values,
matching the existing C model for operation completion.

Signed-off-by: Mohamad Alsadhan <mo@sdhn.cc>
Link: https://patch.msgid.link/20260317-rust-binder-trace-v3-2-6fae4fbcf637@sdhn.cc
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 months agorust_binder: remove "rust_" prefix from tracepoints
Mohamad Alsadhan [Tue, 17 Mar 2026 14:49:42 +0000 (17:49 +0300)] 
rust_binder: remove "rust_" prefix from tracepoints

Remove the "rust_" prefix as the name is part of the uapi, and
userspace expects tracepoints to have the old names.

Link: https://github.com/Rust-for-Linux/linux/issues/1226
Suggested-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Mohamad Alsadhan <mo@sdhn.cc>
Link: https://patch.msgid.link/20260317-rust-binder-trace-v3-1-6fae4fbcf637@sdhn.cc
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 months agorust_binder: drop startup init log message
Pedro Montes Alcalde [Sat, 28 Mar 2026 01:02:51 +0000 (22:02 -0300)] 
rust_binder: drop startup init log message

The "Loaded Rust Binder." message is logged during normal
initialization and does not indicate an error/warning condition.

Logging it creates unnecessary noise and is inconsistent
with other drivers, so this change fixes that

Signed-off-by: Pedro Montes Alcalde <pedro.montes.alcalde@gmail.com>
Acked-by: Carlos Llamas <cmllamas@google.com>
Acked-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260328010250.249131-2-pedro.montes.alcalde@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 months agorust_binder: check current before closing fds
Alice Ryhl [Tue, 24 Mar 2026 20:02:38 +0000 (20:02 +0000)] 
rust_binder: check current before closing fds

This list gets populated once the transaction is delivered to the target
process, at which point it's not touched again except in BC_FREE_BUFFER
and process exit, so if the list has been populated then this code
should not run in the context of the wrong userspace process.

However, why tempt fate? The function itself can run in the context of
both the sender and receiver, and if someone can engineer a scenario
where it runs in the sender and this list is non-empty (or future Rust
Binder changes make such a scenario possible), then that'd be a problem
because we'd be closing random unrelated fds in the wrong process.

Note that on process exit, the == comparison may actually fail because
it's called from a kthread. The fd closing code is a no-op on kthreads,
so there is no actual behavior different though.

Suggested-by: Jann Horn <jannh@google.com>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260324-close-fd-check-current-v3-4-b94274bedac7@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 months agorust_binder: make use of == for Task
Alice Ryhl [Tue, 24 Mar 2026 20:02:37 +0000 (20:02 +0000)] 
rust_binder: make use of == for Task

Now that we have implemented the == operator for Task, replace the two
raw pointer comparisons in Binder with the == operator.

Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260324-close-fd-check-current-v3-3-b94274bedac7@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 months agorust: task: implement == operator for Task
Alice Ryhl [Tue, 24 Mar 2026 20:02:36 +0000 (20:02 +0000)] 
rust: task: implement == operator for Task

It's useful to compare if two tasks are the same task or not. Rust
Binder wants this to check if a certain task is equal to the group
leader of current.

Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260324-close-fd-check-current-v3-2-b94274bedac7@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 months agorust: sync: implement == operator for ARef
Alice Ryhl [Tue, 24 Mar 2026 20:02:35 +0000 (20:02 +0000)] 
rust: sync: implement == operator for ARef

Rust Binder wants to perform a comparison between ARef<Task> and &Task,
so define the == operator for ARef<_> when compared with another ARef<_>
or just a reference. The operator is implemented in terms of the same
operator applied to the inner type.

Note that PartialEq<U> cannot be implemented because it would overlap
with the impl for ARef<U>.

Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260324-close-fd-check-current-v3-1-b94274bedac7@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 months agofuse: fix inode initialization race
Horst Birthelmer [Fri, 27 Mar 2026 17:28:54 +0000 (18:28 +0100)] 
fuse: fix inode initialization race

Fix a race between fuse_iget() and fuse_reverse_inval_inode() where
invalidation can arrive while an inode is being initialized, causing
the invalidation to be lost.
By keeping the inode state I_NEW as long as the attributes are not valid
the invalidation can wait until the inode is fully initialized.

Suggested-by: Joanne Koong <joannelkoong@gmail.com>
Signed-off-by: Horst Birthelmer <hbirthelmer@ddn.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
3 months agonetfilter: nf_tables: reject immediate NF_QUEUE verdict
Pablo Neira Ayuso [Tue, 31 Mar 2026 21:08:02 +0000 (23:08 +0200)] 
netfilter: nf_tables: reject immediate NF_QUEUE verdict

nft_queue is always used from userspace nftables to deliver the NF_QUEUE
verdict. Immediately emitting an NF_QUEUE verdict is never used by the
userspace nft tools, so reject immediate NF_QUEUE verdicts.

The arp family does not provide queue support, but such an immediate
verdict is still reachable. Globally reject NF_QUEUE immediate verdicts
to address this issue.

Fixes: f342de4e2f33 ("netfilter: nf_tables: reject QUEUE/DROP verdict parameters")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
3 months agonetfilter: x_tables: restrict xt_check_match/xt_check_target extensions for NFPROTO_ARP
Pablo Neira Ayuso [Tue, 31 Mar 2026 14:41:25 +0000 (16:41 +0200)] 
netfilter: x_tables: restrict xt_check_match/xt_check_target extensions for NFPROTO_ARP

Weiming Shi says:

xt_match and xt_target structs registered with NFPROTO_UNSPEC can be
loaded by any protocol family through nft_compat. When such a
match/target sets .hooks to restrict which hooks it may run on, the
bitmask uses NF_INET_* constants. This is only correct for families
whose hook layout matches NF_INET_*: IPv4, IPv6, INET, and bridge
all share the same five hooks (PRE_ROUTING ... POST_ROUTING).

ARP only has three hooks (IN=0, OUT=1, FORWARD=2) with different
semantics. Because NF_ARP_OUT == 1 == NF_INET_LOCAL_IN, the .hooks
validation silently passes for the wrong reasons, allowing matches to
run on ARP chains where the hook assumptions (e.g. state->in being
set on input hooks) do not hold. This leads to NULL pointer
dereferences; xt_devgroup is one concrete example:

 Oops: general protection fault, probably for non-canonical address 0xdffffc0000000044: 0000 [#1] SMP KASAN NOPTI
 KASAN: null-ptr-deref in range [0x0000000000000220-0x0000000000000227]
 RIP: 0010:devgroup_mt+0xff/0x350
 Call Trace:
  <TASK>
  nft_match_eval (net/netfilter/nft_compat.c:407)
  nft_do_chain (net/netfilter/nf_tables_core.c:285)
  nft_do_chain_arp (net/netfilter/nft_chain_filter.c:61)
  nf_hook_slow (net/netfilter/core.c:623)
  arp_xmit (net/ipv4/arp.c:666)
  </TASK>
 Kernel panic - not syncing: Fatal exception in interrupt

Fix it by restricting arptables to NFPROTO_ARP extensions only.
Note that arptables-legacy only supports:

- arpt_CLASSIFY
- arpt_mangle
- arpt_MARK

that provide explicit NFPROTO_ARP match/target declarations.

Fixes: 9291747f118d ("netfilter: xtables: add device group match")
Reported-by: Xiang Mei <xmei5@asu.edu>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
3 months agonetfilter: ipset: drop logically empty buckets in mtype_del
Yifan Wu [Mon, 30 Mar 2026 21:39:24 +0000 (14:39 -0700)] 
netfilter: ipset: drop logically empty buckets in mtype_del

mtype_del() counts empty slots below n->pos in k, but it only drops the
bucket when both n->pos and k are zero. This misses buckets whose live
entries have all been removed while n->pos still points past deleted slots.

Treat a bucket as empty when all positions below n->pos are unused and
release it directly instead of shrinking it further.

Fixes: 8af1c6fbd923 ("netfilter: ipset: Fix forceadd evaluation path")
Cc: stable@vger.kernel.org
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
Reported-by: Xin Liu <dstsmallbird@foxmail.com>
Signed-off-by: Yifan Wu <yifanwucs@gmail.com>
Co-developed-by: Yuan Tan <yuantan098@gmail.com>
Signed-off-by: Yuan Tan <yuantan098@gmail.com>
Reviewed-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
3 months agonetfilter: ctnetlink: ignore explicit helper on new expectations
Pablo Neira Ayuso [Mon, 30 Mar 2026 09:26:22 +0000 (11:26 +0200)] 
netfilter: ctnetlink: ignore explicit helper on new expectations

Use the existing master conntrack helper, anything else is not really
supported and it just makes validation more complicated, so just ignore
what helper userspace suggests for this expectation.

This was uncovered when validating CTA_EXPECT_CLASS via different helper
provided by userspace than the existing master conntrack helper:

  BUG: KASAN: slab-out-of-bounds in nf_ct_expect_related_report+0x2479/0x27c0
  Read of size 4 at addr ffff8880043fe408 by task poc/102
  Call Trace:
   nf_ct_expect_related_report+0x2479/0x27c0
   ctnetlink_create_expect+0x22b/0x3b0
   ctnetlink_new_expect+0x4bd/0x5c0
   nfnetlink_rcv_msg+0x67a/0x950
   netlink_rcv_skb+0x120/0x350

Allowing to read kernel memory bytes off the expectation boundary.

CTA_EXPECT_HELP_NAME is still used to offer the helper name to userspace
via netlink dump.

Fixes: bd0779370588 ("netfilter: nfnetlink_queue: allow to attach expectations to conntracks")
Reported-by: Qi Tang <tpluszz77@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
3 months agonetfilter: ctnetlink: zero expect NAT fields when CTA_EXPECT_NAT absent
Qi Tang [Tue, 31 Mar 2026 06:17:12 +0000 (14:17 +0800)] 
netfilter: ctnetlink: zero expect NAT fields when CTA_EXPECT_NAT absent

ctnetlink_alloc_expect() allocates expectations from a non-zeroing
slab cache via nf_ct_expect_alloc().  When CTA_EXPECT_NAT is not
present in the netlink message, saved_addr and saved_proto are
never initialized.  Stale data from a previous slab occupant can
then be dumped to userspace by ctnetlink_exp_dump_expect(), which
checks these fields to decide whether to emit CTA_EXPECT_NAT.

The safe sibling nf_ct_expect_init(), used by the packet path,
explicitly zeroes these fields.

Zero saved_addr, saved_proto and dir in the else branch, guarded
by IS_ENABLED(CONFIG_NF_NAT) since these fields only exist when
NAT is enabled.

Confirmed by priming the expect slab with NAT-bearing expectations,
freeing them, creating a new expectation without CTA_EXPECT_NAT,
and observing that the ctnetlink dump emits a spurious
CTA_EXPECT_NAT containing stale data from the prior allocation.

Fixes: 076a0ca02644 ("netfilter: ctnetlink: add NAT support for expectations")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Qi Tang <tpluszz77@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
3 months agonetfilter: nf_conntrack_helper: pass helper to expect cleanup
Qi Tang [Sun, 29 Mar 2026 16:50:36 +0000 (00:50 +0800)] 
netfilter: nf_conntrack_helper: pass helper to expect cleanup

nf_conntrack_helper_unregister() calls nf_ct_expect_iterate_destroy()
to remove expectations belonging to the helper being unregistered.
However, it passes NULL instead of the helper pointer as the data
argument, so expect_iter_me() never matches any expectation and all
of them survive the cleanup.

After unregister returns, nfnl_cthelper_del() frees the helper
object immediately.  Subsequent expectation dumps or packet-driven
init_conntrack() calls then dereference the freed exp->helper,
causing a use-after-free.

Pass the actual helper pointer so expectations referencing it are
properly destroyed before the helper object is freed.

  BUG: KASAN: slab-use-after-free in string+0x38f/0x430
  Read of size 1 at addr ffff888003b14d20 by task poc/103
  Call Trace:
   string+0x38f/0x430
   vsnprintf+0x3cc/0x1170
   seq_printf+0x17a/0x240
   exp_seq_show+0x2e5/0x560
   seq_read_iter+0x419/0x1280
   proc_reg_read+0x1ac/0x270
   vfs_read+0x179/0x930
   ksys_read+0xef/0x1c0
  Freed by task 103:
  The buggy address is located 32 bytes inside of
   freed 192-byte region [ffff888003b14d00ffff888003b14dc0)

Fixes: ac7b84839003 ("netfilter: expect: add and use nf_ct_expect_iterate helpers")
Signed-off-by: Qi Tang <tpluszz77@gmail.com>
Reviewed-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
3 months agonetfilter: ipset: use nla_strcmp for IPSET_ATTR_NAME attr
Florian Westphal [Mon, 30 Mar 2026 12:16:34 +0000 (14:16 +0200)] 
netfilter: ipset: use nla_strcmp for IPSET_ATTR_NAME attr

IPSET_ATTR_NAME and IPSET_ATTR_NAMEREF are of NLA_STRING type, they
cannot be treated like a c-string.

They either have to be switched to NLA_NUL_STRING, or the compare
operations need to use the nla functions.

Fixes: f830837f0eed ("netfilter: ipset: list:set set type support")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
3 months agonetfilter: x_tables: ensure names are nul-terminated
Florian Westphal [Tue, 31 Mar 2026 21:13:36 +0000 (23:13 +0200)] 
netfilter: x_tables: ensure names are nul-terminated

Reject names that lack a \0 character before feeding them
to functions that expect c-strings.

Fixes tag is the most recent commit that needs this change.

Fixes: c38c4597e4bf ("netfilter: implement xt_cgroup cgroup2 path match")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
3 months agonetfilter: nfnetlink_log: account for netlink header size
Florian Westphal [Thu, 26 Mar 2026 15:17:24 +0000 (16:17 +0100)] 
netfilter: nfnetlink_log: account for netlink header size

This is a followup to an old bug fix: NLMSG_DONE needs to account
for the netlink header size, not just the attribute size.

This can result in a WARN splat + drop of the netlink message,
but other than this there are no ill effects.

Fixes: 9dfa1dfe4d5e ("netfilter: nf_log: account for size of NLMSG_DONE attribute")
Reported-by: Yiming Qian <yimingqian591@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
3 months agonetfilter: flowtable: strictly check for maximum number of actions
Pablo Neira Ayuso [Wed, 25 Mar 2026 23:17:09 +0000 (00:17 +0100)] 
netfilter: flowtable: strictly check for maximum number of actions

The maximum number of flowtable hardware offload actions in IPv6 is:

* ethernet mangling (4 payload actions, 2 for each ethernet address)
* SNAT (4 payload actions)
* DNAT (4 payload actions)
* Double VLAN (4 vlan actions, 2 for popping vlan, and 2 for pushing)
  for QinQ.
* Redirect (1 action)

Which makes 17, while the maximum is 16. But act_ct supports for tunnels
actions too. Note that payload action operates at 32-bit word level, so
mangling an IPv6 address takes 4 payload actions.

Update flow_action_entry_next() calls to check for the maximum number of
supported actions.

While at it, rise the maximum number of actions per flow from 16 to 24
so this works fine with IPv6 setups.

Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support")
Reported-by: Hyunwoo Kim <imv4bel@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
3 months agoUSB: serial: option: add MeiG Smart SRM825WN
Ernestas Kulik [Tue, 24 Mar 2026 11:07:16 +0000 (13:07 +0200)] 
USB: serial: option: add MeiG Smart SRM825WN

Add support for the SDX62-based MeiG Smart SRM825WN module.

If#= 0: RNDIS
If#= 1: RNDIS
If#= 2: Diag
If#= 3: AT
If#= 4: AT
If#= 5: NMEA

T:  Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 19 Spd=480  MxCh= 0
D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=2dee ProdID=4d38 Rev= 5.04
S:  Manufacturer=MEIG
S:  Product=LTE-A Module
S:  SerialNumber=da47a175
C:* #Ifs= 6 Cfg#= 1 Atr=80 MxPwr=500mA
A:  FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=03
I:* If#= 0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=rndis_host
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
E:  Ad=86(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option
E:  Ad=88(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

Signed-off-by: Ernestas Kulik <ernestas.k@iconn-networks.com>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
3 months agodrm/{i915, xe}: add shared header for VLV IOSF sideband units and registers
Jani Nikula [Tue, 31 Mar 2026 11:40:58 +0000 (14:40 +0300)] 
drm/{i915, xe}: add shared header for VLV IOSF sideband units and registers

Move vlv_iosf_sb_reg.h to include/drm/intel/vlv_iosf_sb_regs.h. Use
_regs.h suffix to align better with other register headers. Move enum
vlv_iosf_sb_unit there as well, breaking the final include tie related
to IOSF sideband between display and i915 core.

With this, we can completely remove the xe compat vls_iosf_sb*.h
headers.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/41b060b0d6453de39ca775eab10ee12b25c45b7d.1774957233.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
3 months agodrm/i915: move VLV IOSF sideband to display parent interface
Jani Nikula [Tue, 31 Mar 2026 11:40:57 +0000 (14:40 +0300)] 
drm/i915: move VLV IOSF sideband to display parent interface

Remove another direct dependency from display to i915 core by moving the
VLV IOSF sideband calls to the display parent interface. Xe doesn't need
this, so it'll remain optional and NULL.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/15dfc67b58f5b5b381be0f9bc66d60b43bebfecf.1774957233.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>