Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH net-next v9 2/3] net: airoha: fix ETS QoS stats counter underflow and cross-channel corruption
From: Jacob Keller @ 2026-07-20 22:42 UTC (permalink / raw)
  To: Lorenzo Bianconi, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, Alexander Lobakin, linux-arm-kernel, linux-mediatek,
	netdev
In-Reply-To: <20260721-airoha-ethtool-priv_flags-v9-2-9c15d8b71a56@kernel.org>

On 7/20/2026 3:03 PM, Lorenzo Bianconi wrote:
> airoha_qdma_get_tx_ets_stats() has two bugs:
> - The hardware counters read via airoha_qdma_rr() are 32-bit values
>   but are stored in u64 locals and subtracted from u64 baselines. When
>   a 32-bit hardware counter wraps around, the subtraction produces a
>   large underflow value passed to _bstats_update().

This issue would only be a problem during rollover, which depending on
how fast the counts increment may not be a big problem. I could see this
not being worth going to net since it could be rare enough that it isn't
considered a widespread issue...

> - The baseline counters (cpu_tx_packets, fwd_tx_packets) are stored as
>   single per-device fields, but airoha_qdma_get_tx_ets_stats() is
>   called with different channel values (0-3). Each call reads a
>   different channel's hardware counter but overwrites the same
>   baseline, corrupting the delta computation for other channels.
> 

However, this issue seems like its going to cause a problem every time
you read because any time you use a mix of channels you will get
corrupted values?

> Fix both by:
> - Narrowing the counter locals and baselines to u32 so that 32-bit
>   unsigned subtraction handles wrap-around naturally.
> - Grouping the baselines into a per-channel qos_stats array so each
>   channel tracks its own previous counter value independently.
> - Splitting the delta addition into two statements so the first u32
>   delta is widened to u64 on assignment and the second is added in
>   u64 arithmetic, preventing overflow when both deltas are large.
> 
> Fixes: 20bf7d07c956 ("net: airoha: Add sched ETS offload support")

This targets a commit which merged in v6.14, but the patch is part of a
series aimed at net-next. Could you explain why this shouldn't be
separated out and put as a fix in net? It seems pretty obvious that
users can easily reproduce problems by requesting stats from each
channel? Or is this not really possible to trigger from userspace until
patch 3/3?

> Reviewed-by: Simon Horman <horms@kernel.org>
> Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
>  drivers/net/ethernet/airoha/airoha_eth.c | 18 +++++++++++-------
>  drivers/net/ethernet/airoha/airoha_eth.h |  7 ++++---
>  2 files changed, 15 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/net/ethernet/airoha/airoha_eth.c b/drivers/net/ethernet/airoha/airoha_eth.c
> index 41c1a0ffbdd8..aaf2a4717d12 100644
> --- a/drivers/net/ethernet/airoha/airoha_eth.c
> +++ b/drivers/net/ethernet/airoha/airoha_eth.c
> @@ -2482,16 +2482,20 @@ static int airoha_qdma_get_tx_ets_stats(struct net_device *netdev, int channel,
>  {
>  	struct airoha_gdm_dev *dev = netdev_priv(netdev);
>  	struct airoha_qdma *qdma = dev->qdma;
> +	u32 cpu_tx_packets, fwd_tx_packets;
> +	u64 tx_packets;
>  
> -	u64 cpu_tx_packets = airoha_qdma_rr(qdma, REG_CNTR_VAL(channel << 1));
> -	u64 fwd_tx_packets = airoha_qdma_rr(qdma,
> -					    REG_CNTR_VAL((channel << 1) + 1));
> -	u64 tx_packets = (cpu_tx_packets - dev->cpu_tx_packets) +
> -			 (fwd_tx_packets - dev->fwd_tx_packets);
> +	cpu_tx_packets = airoha_qdma_rr(qdma, REG_CNTR_VAL(channel << 1));
> +	fwd_tx_packets = airoha_qdma_rr(qdma,
> +					REG_CNTR_VAL((channel << 1) + 1));
> +	tx_packets = (u32)(cpu_tx_packets -
> +			   dev->qos_stats[channel].cpu_tx_packets);
> +	tx_packets += (u32)(fwd_tx_packets -
> +			    dev->qos_stats[channel].fwd_tx_packets);
>  
>  	_bstats_update(opt->stats.bstats, 0, tx_packets);
> -	dev->cpu_tx_packets = cpu_tx_packets;
> -	dev->fwd_tx_packets = fwd_tx_packets;
> +	dev->qos_stats[channel].cpu_tx_packets = cpu_tx_packets;
> +	dev->qos_stats[channel].fwd_tx_packets = fwd_tx_packets;
>  
>  	return 0;
>  }
> diff --git a/drivers/net/ethernet/airoha/airoha_eth.h b/drivers/net/ethernet/airoha/airoha_eth.h
> index bf1c249255bd..bf44be9f0954 100644
> --- a/drivers/net/ethernet/airoha/airoha_eth.h
> +++ b/drivers/net/ethernet/airoha/airoha_eth.h
> @@ -553,9 +553,10 @@ struct airoha_gdm_dev {
>  	struct airoha_eth *eth;
>  
>  	DECLARE_BITMAP(qos_sq_bmap, AIROHA_NUM_QOS_CHANNELS);
> -	/* qos stats counters */
> -	u64 cpu_tx_packets;
> -	u64 fwd_tx_packets;
> +	struct {
> +		u32 cpu_tx_packets;
> +		u32 fwd_tx_packets;
> +	} qos_stats[AIROHA_NUM_QOS_CHANNELS];
>  
>  	u32 flags;
>  	int nbq;
> 



^ permalink raw reply

* Re: [PATCH v1 07/11] arm_mpam: Initialize all of struct mon_read in mpam_restore_mbwu_state()
From: Lee Trager @ 2026-07-20 23:05 UTC (permalink / raw)
  To: Ben Horgan
  Cc: james.morse, reinette.chatre, fenghuay, linux-kernel,
	linux-arm-kernel, dave.martin, andre.przywara
In-Reply-To: <20260710115546.29644-8-ben.horgan@arm.com>

On 7/10/26 4:55 AM, Ben Horgan wrote:

> m->err may be read before initialization in __ris_msmon_read() when called
> from mpam_restore_mbwu_state().
>
> Initialize the whole struct mon_read in mpam_restore_mbwu_state() and fix
> the spelling of mbwu in the name.
>
> Fixes: 41e8a14950e1 ("arm_mpam: Track bandwidth counter state for power management")
> Signed-off-by: Ben Horgan <ben.horgan@arm.com>
> ---
>   drivers/resctrl/mpam_devices.c | 13 +++++++------
>   1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/resctrl/mpam_devices.c b/drivers/resctrl/mpam_devices.c
> index a49f426aefc0..c9adc450f087 100644
> --- a/drivers/resctrl/mpam_devices.c
> +++ b/drivers/resctrl/mpam_devices.c
> @@ -1640,7 +1640,6 @@ static int mpam_restore_mbwu_state(void *_ris)
>   {
>   	int i;
>   	u64 val;
val is still uninitialized. Its passed to to __ris_mon_read() below 
which does *m->val += now;
> -	struct mon_read mwbu_arg;
>   	struct mpam_msc_ris *ris = _ris;
>   	struct msmon_mbwu_state *mbwu_state;
>   	struct mpam_msc *msc = ris->vmsc->msc;
> @@ -1653,16 +1652,18 @@ static int mpam_restore_mbwu_state(void *_ris)
>   			return -EIO;
>   
>   		if (ris->mbwu_state[i].enabled) {
> -			mwbu_arg.ris = ris;
> -			mwbu_arg.ctx = &ris->mbwu_state[i].cfg;
> -			mwbu_arg.type = mpam_msmon_choose_counter(class);
> -			mwbu_arg.val = &val;
> +			struct mon_read mbwu_arg = {
> +				.ris = ris,
> +				.ctx = &ris->mbwu_state[i].cfg,
> +				.type = mpam_msmon_choose_counter(class),
> +				.val = &val
> +			};
>   
>   			mbwu_state->reset_on_next_read = true;
>   
>   			mpam_mon_sel_unlock(msc);
>   
> -			__ris_msmon_read(&mwbu_arg);
> +			__ris_msmon_read(&mbwu_arg);
>   		} else {
>   			mpam_mon_sel_unlock(msc);
>   		}


^ permalink raw reply

* Re: [PATCH] pmdomain: rockchip: Add a regulator to the RK3568 NPU power domain
From: Sebastian Reichel @ 2026-07-20 23:07 UTC (permalink / raw)
  To: MidG971
  Cc: Ulf Hansson, Heiko Stuebner, Chaoyi Chen, Shawn Lin, Finley Xiao,
	ulf.hansson, linux-pm, linux-rockchip, linux-arm-kernel,
	linux-kernel
In-Reply-To: <20260708234614.499613-1-midgy971@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4742 bytes --]

Hi,

On Thu, Jul 09, 2026 at 01:46:14AM +0200, MidG971 wrote:
> From: Midgy BALON <midgy971@gmail.com>
> 
> The RK3568 NPU rail (vdd_npu) needs to be enabled before the domain is
> powered on and disabled after it is powered off. Give DOMAIN_RK3568 a
> regulator parameter (like DOMAIN_RK3588 already has) so the NPU domain
> can set need_regulator, letting genpd manage the rail wired up as the
> domain's domain-supply instead of marking it always-on in DT.
> 
> Suggested-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
> Signed-off-by: Midgy BALON <midgy971@gmail.com>
> ---

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>

Looking at the RK3568 DTs it seems they all mark vdd_gpu as
always-on. My guess is, that this could also be avoided by adding
the regulator reference to the GPU power domain.

Greetings,

-- Sebastian

> This patch was part of the RFC NPU series [1]; Ulf Hansson and Heiko
> Stübner reviewed it there and confirmed it can be applied independently of
> the rest of the (still-RFC) rocket driver and DT patches, so it is reposted
> standalone. The NPU domain's domain-supply DT wiring follows in a separate
> patch, so this change alone is a no-op at runtime.
> 
> Changes since the RFC posting:
> - Move DOMAIN_M_R below the other DOMAIN_M_* macros so they stay
>   alphabetically sorted (Heiko Stübner).
> 
> [1] https://lore.kernel.org/linux-rockchip/20260613070116.438906-1-midgy971@gmail.com/
> 
>  drivers/pmdomain/rockchip/pm-domains.c | 36 ++++++++++++++++++--------
>  1 file changed, 25 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/pmdomain/rockchip/pm-domains.c b/drivers/pmdomain/rockchip/pm-domains.c
> index 490bbb1d1d8e8..ba66ae7194289 100644
> --- a/drivers/pmdomain/rockchip/pm-domains.c
> +++ b/drivers/pmdomain/rockchip/pm-domains.c
> @@ -204,6 +204,20 @@ struct rockchip_pmu {
>  	.active_wakeup = wakeup,			\
>  }
>  
> +#define DOMAIN_M_R(_name, pwr, status, req, idle, ack, wakeup, regulator)	\
> +{							\
> +	.name = _name,				\
> +	.pwr_w_mask = (pwr) << 16,			\
> +	.pwr_mask = (pwr),				\
> +	.status_mask = (status),			\
> +	.req_w_mask = (req) << 16,			\
> +	.req_mask = (req),				\
> +	.idle_mask = (idle),				\
> +	.ack_mask = (ack),				\
> +	.active_wakeup = wakeup,			\
> +	.need_regulator = regulator,			\
> +}
> +
>  #define DOMAIN_RK3036(_name, req, ack, idle, wakeup)		\
>  {							\
>  	.name = _name,				\
> @@ -241,8 +255,8 @@ struct rockchip_pmu {
>  #define DOMAIN_RK3562(name, pwr, req, g_mask, mem, wakeup)		\
>  	DOMAIN_M_G_SD(name, pwr, pwr, req, req, req, g_mask, mem, wakeup, false)
>  
> -#define DOMAIN_RK3568(name, pwr, req, wakeup)		\
> -	DOMAIN_M(name, pwr, pwr, req, req, req, wakeup)
> +#define DOMAIN_RK3568(name, pwr, req, wakeup, regulator)		\
> +	DOMAIN_M_R(name, pwr, pwr, req, req, req, wakeup, regulator)
>  
>  #define DOMAIN_RK3576(name, p_offset, pwr, status, r_status, r_offset, req, idle, g_mask, wakeup)	\
>  	DOMAIN_M_O_R_G(name, p_offset, pwr, status, 0, r_status, r_status, r_offset, req, idle, idle, g_mask, wakeup)
> @@ -1274,15 +1288,15 @@ static const struct rockchip_domain_info rk3562_pm_domains[] = {
>  };
>  
>  static const struct rockchip_domain_info rk3568_pm_domains[] = {
> -	[RK3568_PD_NPU]		= DOMAIN_RK3568("npu",  BIT(1), BIT(2),  false),
> -	[RK3568_PD_GPU]		= DOMAIN_RK3568("gpu",  BIT(0), BIT(1),  false),
> -	[RK3568_PD_VI]		= DOMAIN_RK3568("vi",   BIT(6), BIT(3),  false),
> -	[RK3568_PD_VO]		= DOMAIN_RK3568("vo",   BIT(7), BIT(4),  false),
> -	[RK3568_PD_RGA]		= DOMAIN_RK3568("rga",  BIT(5), BIT(5),  false),
> -	[RK3568_PD_VPU]		= DOMAIN_RK3568("vpu",  BIT(2), BIT(6),  false),
> -	[RK3568_PD_RKVDEC]	= DOMAIN_RK3568("vdec", BIT(4), BIT(8),  false),
> -	[RK3568_PD_RKVENC]	= DOMAIN_RK3568("venc", BIT(3), BIT(7),  false),
> -	[RK3568_PD_PIPE]	= DOMAIN_RK3568("pipe", BIT(8), BIT(11), false),
> +	[RK3568_PD_NPU]		= DOMAIN_RK3568("npu",  BIT(1), BIT(2),  false, true),
> +	[RK3568_PD_GPU]		= DOMAIN_RK3568("gpu",  BIT(0), BIT(1),  false, false),
> +	[RK3568_PD_VI]		= DOMAIN_RK3568("vi",   BIT(6), BIT(3),  false, false),
> +	[RK3568_PD_VO]		= DOMAIN_RK3568("vo",   BIT(7), BIT(4),  false, false),
> +	[RK3568_PD_RGA]		= DOMAIN_RK3568("rga",  BIT(5), BIT(5),  false, false),
> +	[RK3568_PD_VPU]		= DOMAIN_RK3568("vpu",  BIT(2), BIT(6),  false, false),
> +	[RK3568_PD_RKVDEC]	= DOMAIN_RK3568("vdec", BIT(4), BIT(8),  false, false),
> +	[RK3568_PD_RKVENC]	= DOMAIN_RK3568("venc", BIT(3), BIT(7),  false, false),
> +	[RK3568_PD_PIPE]	= DOMAIN_RK3568("pipe", BIT(8), BIT(11), false, false),
>  };
>  
>  static const struct rockchip_domain_info rk3576_pm_domains[] = {
> -- 
> 2.39.5
> 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply

* Re: [PATCH v4] power: supply: macsmc: Support macOS 27 SMC firmware
From: Sebastian Reichel @ 2026-07-20 23:12 UTC (permalink / raw)
  To: Sven Peter, Janne Grunau, Neal Gompa, Sebastian Reichel,
	Sasha Finkelstein
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, Joshua Peisach,
	stable
In-Reply-To: <20260712-gate-power-v4-1-aa59c6583247@chaosmail.tech>


On Sun, 12 Jul 2026 00:48:56 +0200, Sasha Finkelstein wrote:
> The SMC firmware included in macOS 27 changed the size of BCF0 key from
> 4 to 1 bytes. This key is used for indicating that battery state is
> critically low. In addition, B0RM key has changed endianness.
> 
> 

Applied, thanks!

[1/1] power: supply: macsmc: Support macOS 27 SMC firmware
      commit: f7b253a6e217f71d754d70c525e9b4c1dcbd4414

Best regards,
-- 
Sebastian Reichel <sebastian.reichel@collabora.com>



^ permalink raw reply

* Re: [PATCH v2 5/6] media: nxp: imx8-isi: Correct color map between V4L2 and ISI
From: Laurent Pinchart @ 2026-07-20 23:18 UTC (permalink / raw)
  To: Guoniu Zhou
  Cc: Mauro Carvalho Chehab, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Christian Hemp,
	Stefan Riedmueller, Jacopo Mondi, Loic Poulain,
	Bryan O'Donoghue, Dong Aisheng, Guoniu Zhou, linux-media, imx,
	linux-arm-kernel, linux-kernel, stable
In-Reply-To: <20260720174002.GC50424@killaraus.ideasonboard.com>

On Mon, Jul 20, 2026 at 08:40:04PM +0300, Laurent Pinchart wrote:
> On Mon, Jul 20, 2026 at 11:34:07AM +0800, Guoniu Zhou wrote:
> > Fix the ISI input format for the color map V4L2_PIX_FMT_XBGR32 in
> > memory-to-memory mode.
> > 
> > Fixes: cf21f328fcaf ("media: nxp: Add i.MX8 ISI driver")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Guoniu Zhou <guoniu.zhou@oss.nxp.com>
> 
> Tentatively,
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> I'm running a build to test this change.

Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> > ---
> > Changes in v2:
> > - Reword commit description for clarity (Frank Li)
> > ---
> >  drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> > index 5eb448f4c26f..05b51b98344b 100644
> > --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> > +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> > @@ -151,7 +151,7 @@ static const struct mxc_isi_format_info mxc_isi_formats[] = {
> >  		.fourcc		= V4L2_PIX_FMT_XBGR32,
> >  		.type		= MXC_ISI_VIDEO_CAP | MXC_ISI_VIDEO_M2M_OUT
> >  				| MXC_ISI_VIDEO_M2M_CAP,
> > -		.isi_in_format	= CHNL_MEM_RD_CTRL_IMG_TYPE_XBGR8,
> > +		.isi_in_format	= CHNL_MEM_RD_CTRL_IMG_TYPE_XRGB8,
> >  		.isi_out_format	= CHNL_IMG_CTRL_FORMAT_XRGB888,
> >  		.mem_planes	= 1,
> >  		.color_planes	= 1,

-- 
Regards,

Laurent Pinchart


^ permalink raw reply

* Re: [PATCH net-next] net: stmmac: Simplify ioctl handling
From: Vadim Fedorenko @ 2026-07-20 22:43 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Maxime Chevallier, Andrew Lunn, Jakub Kicinski, davem,
	Eric Dumazet, Paolo Abeni, Simon Horman, Maxime Coquelin,
	Alexandre Torgue, Russell King, thomas.petazzoni,
	Alexis Lothoré, netdev, linux-kernel, linux-arm-kernel,
	linux-stm32
In-Reply-To: <1e640dcb-43ce-4a3b-a74a-ed8e48706b86@lunn.ch>

On 20.07.2026 19:12, Andrew Lunn wrote:
> On Mon, Jul 20, 2026 at 04:17:32PM +0100, Vadim Fedorenko wrote:
>> On 19.07.2026 17:13, Andrew Lunn wrote:
>>>> Looking at this, I'm wondering if we can't just get rid of SIOCSHWTSTAMP
>>>> handling in phy_mii_ioctl(). Looks like we can ?
>>>
>>> I'm not sure about that. We need Richards input.
>>>
>>> The code in phy_mii_ioctl() allows the MAC to be bypassed, it goes
>>> straight to a PHY based stamper. It could be the MAC has no idea the
>>> PHY has this capability, so it has not implemented the .ndo?
>>>
>>> It might be we need to hoist the code from phy_mii_ioctl() into
>>> dev_{sg}et_hwtstamp()?
>>
>> Hi Andrew!
>>
>> I think I've converted all phy drivers while removing support for
>> SIOCSHWTSTAMP/SIOCGHWTSTAMP from netdev ioctl. I believe it's impossible right
>> now to reach SIOCSHWTSTAMP path of phy_mii_ioctl via ioctl on net device.
> 
> Lets look at this, using a random example:
> 
> drivers/net/ethernet/marvell/mv643xx_eth.c
> 
> mv643xx_eth_netdev_ops has nothing about time stamping. However it
> does have a mv643xx_eth_ioctl. Which calls phy_mii_ioctl().
> 
> Lets say this Marvell MAC driver was paired with a
> nxp-c45-tja11xx. nxp_c45_probe() does:
> 
>                  priv->mii_ts.rxtstamp = nxp_c45_rxtstamp;
>                  priv->mii_ts.txtstamp = nxp_c45_txtstamp;
>                  priv->mii_ts.hwtstamp_set = nxp_c45_hwtstamp_set;
>                  priv->mii_ts.hwtstamp_get = nxp_c45_hwtstamp_get;
>                  priv->mii_ts.ts_info = nxp_c45_ts_info;
>                  phydev->mii_ts = &priv->mii_ts;
> 
> So it looks like in phy_mii_ioctl(), the conditions:
> 
>         case SIOCSHWTSTAMP:
>                  if (phydev->mii_ts && phydev->mii_ts->hwtstamp_set) {
> 
> are fulfilled, and
> 
>                          ret = phydev->mii_ts->hwtstamp_set(phydev->mii_ts,
>                                                             &kernel_cfg,
>                                                             &extack);
> 
> will happen.
> 
> Now, this combination of MAC and PHY is very unlikely but it proves
> the point. As far as i remember, Richard added this code for the
> dp83640 PHY device, but i don't remember what MAC driver it was paired
> with. He wanted to make PHY support just work without the MAC driver
> even caring.

looks like it won't work now. we have to create helpers in phy to fix it.
I can work on it, but I don't have such HW combination to test. Do you have some 
HW to test this combination?


> 
> 	Andrew



^ permalink raw reply

* Re: [PATCH net-next v9 3/3] net: airoha: defer GDM3/GDM4 WAN mode and GDM2 loopback to QoS offload
From: Jacob Keller @ 2026-07-20 22:48 UTC (permalink / raw)
  To: Lorenzo Bianconi, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, Alexander Lobakin, linux-arm-kernel, linux-mediatek,
	netdev, Madhur Agrawal
In-Reply-To: <20260721-airoha-ethtool-priv_flags-v9-3-9c15d8b71a56@kernel.org>

On 7/20/2026 3:03 PM, Lorenzo Bianconi wrote:
> GDM3 and GDM4 ports require GDM2 loopback to be enabled for hardware
> QoS offload to function. Without it, HTB and ETS offload on these ports
> do not work.
> Previously, GDM3/GDM4 ports were automatically configured as WAN with
> GDM2 loopback enabled during ndo_init(). Add the capability to configure
> GDM3/GDM4 as WAN/LAN on demand when QoS offload is created or destroyed.
> Hook airoha_enable_qos_for_gdm34() into TC_HTB_CREATE so that requesting
> HTB offload on a GDM3/GDM4 LAN port switches it to WAN mode and enables
> GDM2 loopback, with proper rollback on failure. Introduce the
> AIROHA_DEV_F_QOS flag to track whether a device has an active HTB
> qdisc; clear it on TC_HTB_DESTROY. The device keeps its WAN role after
> qdisc teardown so that its configuration is preserved until another
> device explicitly needs the WAN role for QoS offload.
> If another GDM3/GDM4 device already holds the WAN role without an active
> QoS qdisc, demote it to LAN before promoting the requesting device. Skip
> the demotion when the requesting device is itself already the WAN device.
> Since airoha_dev_set_qdma() can now be called on a running device to
> migrate between QDMA blocks, make dev->qdma an RCU pointer so the TX
> path can safely dereference it without holding RTNL.
> Hold flow_offload_mutex in airoha_enable_qos_for_gdm34() and
> airoha_disable_qos_for_gdm34() around the dev->flags update,
> airoha_dev_set_qdma() and GDM2 loopback configuration, serializing
> against concurrent airoha_ppe_hw_init() in the TC_SETUP_CLSFLOWER
> offload path.
> Introduce airoha_qdma_deref() helper that wraps rcu_dereference_protected()
> with a lockdep condition accepting either rtnl_lock or flow_offload_mutex,
> and use it across all control-path dereferences of the RCU-protected
> dev->qdma pointer.
> Add airoha_disable_gdm2_loopback() to disable GDM2 hw loopback.
> 

A minor nit which may just be my personal preference/style:
I had trouble following this commit message since it goes through a lot
of detail about various problems with dereferencing and other changes
related to allowing the defered configuration of WAN mode.

I do appreciate this detail as it helps understand the changes and
motivations. However.. It might benefit from some additional line breaks
for spacing to help readability.


^ permalink raw reply

* Re: [PATCH v3] ARM: traps: Implement KCFI trap handler for ARM32
From: Nathan Chancellor @ 2026-07-21  0:11 UTC (permalink / raw)
  To: Kees Cook
  Cc: Russell King (Oracle), Linus Walleij, Sami Tolvanen, Zhen Lei,
	Arnd Bergmann, Michał Pecio, Sebastian Andrzej Siewior,
	linux-arm-kernel, Russell King, Will Deacon, Mark Rutland,
	Nick Desaulniers, Bill Wendling, Justin Stitt, linux-kernel, llvm,
	linux-hardening
In-Reply-To: <20260715175223.make.153-kees@kernel.org>

On Wed, Jul 15, 2026 at 10:52:27AM -0700, Kees Cook wrote:
> ARM32 GCC KCFI[1] violations currently show as generic "Oops - undefined
> instruction" errors, making debugging CFI failures difficult. Add a proper
> KCFI trap handler similar to the aarch64 implementation to provide clear
> CFI error messages, including the call target and the expected type.
> 
> Clang and GCC trap CFI failures differently on ARM32. Clang lowers
> its checks to a BKPT, handled via the breakpoint/prefetch-abort path
> in hw_breakpoint.c, which cannot recover the target or expected type
> and so must report via report_cfi_failure_noaddr(). GCC instead lowers
> KCFI checks to a UDF (undefined instruction) whose immediate encodes
> the registers involved, so the handler can decode it and call the full
> report_cfi_failure() with the target and expected type.
> 
> The GCC ARM32 KCFI implementation uses UDF instructions with a specific
> encoding pattern:
> - UDF instruction format: cccc 0111 1111 imm12 1111 imm4
> - 16-bit immediate reconstructed from bits 19-8 and 3-0
> - KCFI encoding: 0x8000 | (type_reg_num << 5) | (target_reg_num & 31)
> - Bit 15: KCFI trap identifier (0x8000)
> - Bits 9-5: Type ID register field (0x1F when unavailable)
> - Bits 4-0: Target address register number
> 
> When the type register field is 0x1F (the type was spilled rather than
> kept in a register), the handler walks back up to 6 preceding
> instructions to recover the 32-bit type ID from the four EOR-immediate
> instructions the compiler emits, similar to x86 CFI trap reconstruction.
> 
> The handler is dispatched directly from do_undefinstr() rather than
> through register_undef_hook(). A registered hook is only installed once
> initcalls run, so any KCFI violation that fires earlier in boot would be
> reported as a generic "undefined instruction"; calling the decoder from
> the exception handler itself catches failures from the very first
> instruction. Dispatching directly also lets the handler ignore
> non-kernel-mode UDFs, preventing a user process from spoofing the KCFI
> encoding.
> 
> Both the UDF handler and the Clang breakpoint handler in hw_breakpoint.c
> act on the report_cfi_failure*() result identically (oops on a fatal
> violation, or skip the trapping instruction under CFI permissive mode)
> so factor that shared tail into arm_cfi_handle_failure(), declared in
> asm/traps.h.
> 
> Link: https://inbox.sourceware.org/gcc-patches/20260618204539.824446-6-kees@kernel.org/ [1]
> Signed-off-by: Kees Cook <kees@kernel.org>

Tested-by: Nathan Chancellor <nathan@kernel.org>

I tested this in QEMU using LKDTM, which shows lkdtm_increment_int() as
the target of the failed call.

-- 
Cheers,
Nathan


^ permalink raw reply

* Re: [PATCH v2 6/6] media: nxp: imx8-isi: Add additional 32-bit RGB format support
From: Laurent Pinchart @ 2026-07-21  0:21 UTC (permalink / raw)
  To: Guoniu Zhou
  Cc: Mauro Carvalho Chehab, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Christian Hemp,
	Stefan Riedmueller, Jacopo Mondi, Loic Poulain,
	Bryan O'Donoghue, Dong Aisheng, Guoniu Zhou, linux-media, imx,
	linux-arm-kernel, linux-kernel, Robert Chiras
In-Reply-To: <20260720-isi-v2-6-45845bc5d4fa@oss.nxp.com>

Hi Guoniu, Robert,

Thank you for the patch.

On Mon, Jul 20, 2026 at 11:34:08AM +0800, Guoniu Zhou wrote:
> Add support for additional 32-bit RGB pixel formats (BGRA32, RGBA32,
> BGRX32, RGBX32, ARGB2101010) and extend existing ABGR32 format with
> full memory-to-memory capabilities to meet Android requirements.

What are those Android requirements ?

> All formats support capture, M2M input, and M2M output operations,
> enabling complete format conversion pipelines.
> 
> Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
> Signed-off-by: Guoniu Zhou <guoniu.zhou@oss.nxp.com>
> ---
> Changes in v2:
> - Add Reviewed-by tag from Frank Li
> ---
>  .../media/platform/nxp/imx8-isi/imx8-isi-video.c   | 59 +++++++++++++++++++++-
>  1 file changed, 58 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> index 05b51b98344b..ef638af350fe 100644
> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> @@ -160,12 +160,69 @@ static const struct mxc_isi_format_info mxc_isi_formats[] = {
>  	}, {
>  		.mbus_code	= MEDIA_BUS_FMT_RGB888_1X24,
>  		.fourcc		= V4L2_PIX_FMT_ABGR32,
> -		.type		= MXC_ISI_VIDEO_CAP | MXC_ISI_VIDEO_M2M_CAP,
> +		.type		= MXC_ISI_VIDEO_CAP | MXC_ISI_VIDEO_M2M_OUT
> +				| MXC_ISI_VIDEO_M2M_CAP,
> +		.isi_in_format	= CHNL_MEM_RD_CTRL_IMG_TYPE_XRGB8,

This doesn't seem right. The value is the same as for
V4L2_PIX_FMT_XBGR32. As far as I understand, the ISI will ignore the
alpha bits (MSBs in the 32-bit data).

This is why the V4L2_PIX_FMT_ABGR32 format doesn't set
MXC_ISI_VIDEO_M2M_OUT: to be supported as an output format (input to the
ISI), we would need a hardware mode where the alpha bits are read from
memory and used by the ISI. I recommend dropping this part of the patch.

>  		.isi_out_format	= CHNL_IMG_CTRL_FORMAT_ARGB8888,
>  		.mem_planes	= 1,
>  		.color_planes	= 1,
>  		.depth		= { 32 },
>  		.encoding	= MXC_ISI_ENC_RGB,
> +	}, {
> +		.mbus_code	= MEDIA_BUS_FMT_RGB888_1X24,
> +		.fourcc		= V4L2_PIX_FMT_BGRA32,
> +		.type		= MXC_ISI_VIDEO_CAP | MXC_ISI_VIDEO_M2M_OUT
> +				| MXC_ISI_VIDEO_M2M_CAP,
> +		.isi_in_format	= CHNL_MEM_RD_CTRL_IMG_TYPE_RGBX8,

Same comment here, this format should not have MXC_ISI_VIDEO_M2M_OUT
set.

> +		.isi_out_format	= CHNL_IMG_CTRL_FORMAT_RGBA8888,
> +		.mem_planes	= 1,
> +		.color_planes	= 1,
> +		.depth		= { 32 },
> +		.encoding	= MXC_ISI_ENC_RGB,
> +	}, {
> +		.mbus_code	= MEDIA_BUS_FMT_RGB888_1X24,
> +		.fourcc		= V4L2_PIX_FMT_RGBA32,
> +		.type		= MXC_ISI_VIDEO_CAP | MXC_ISI_VIDEO_M2M_OUT
> +				| MXC_ISI_VIDEO_M2M_CAP,
> +		.isi_in_format	= CHNL_MEM_RD_CTRL_IMG_TYPE_XBGR8,

Same here too.

> +		.isi_out_format	= CHNL_IMG_CTRL_FORMAT_ABGR8888,
> +		.mem_planes	= 1,
> +		.color_planes	= 1,
> +		.depth		= { 32 },
> +		.encoding	= MXC_ISI_ENC_RGB,
> +	}, {
> +		.mbus_code	= MEDIA_BUS_FMT_RGB888_1X24,
> +		.fourcc		= V4L2_PIX_FMT_BGRX32,
> +		.type		= MXC_ISI_VIDEO_CAP | MXC_ISI_VIDEO_M2M_OUT
> +				| MXC_ISI_VIDEO_M2M_CAP,
> +		.isi_in_format	= CHNL_MEM_RD_CTRL_IMG_TYPE_RGBX8,
> +		.isi_out_format	= CHNL_IMG_CTRL_FORMAT_RGBX888,
> +		.mem_planes	= 1,
> +		.color_planes	= 1,
> +		.depth		= { 32 },
> +		.encoding	= MXC_ISI_ENC_RGB,
> +	}, {
> +		.mbus_code	= MEDIA_BUS_FMT_RGB888_1X24,
> +		.fourcc		= V4L2_PIX_FMT_RGBX32,
> +		.type		= MXC_ISI_VIDEO_CAP | MXC_ISI_VIDEO_M2M_OUT
> +				| MXC_ISI_VIDEO_M2M_CAP,
> +		.isi_in_format	= CHNL_MEM_RD_CTRL_IMG_TYPE_XBGR8,
> +		.isi_out_format	= CHNL_IMG_CTRL_FORMAT_XBGR888,
> +		.mem_planes	= 1,
> +		.color_planes	= 1,
> +		.depth		= { 32 },
> +		.encoding	= MXC_ISI_ENC_RGB,
> +	}, {
> +		.mbus_code	= MEDIA_BUS_FMT_RGB888_1X24,
> +		.fourcc		= V4L2_PIX_FMT_ARGB2101010,
> +		.type		= MXC_ISI_VIDEO_CAP | MXC_ISI_VIDEO_M2M_OUT
> +				| MXC_ISI_VIDEO_M2M_CAP,
> +		.isi_in_format	= CHNL_MEM_RD_CTRL_IMG_TYPE_A2RGB10,
> +		.isi_out_format	= CHNL_IMG_CTRL_FORMAT_A2RGB10,
> +		.mem_planes	= 1,
> +		.color_planes	= 1,
> +		.depth		= { 32 },
> +		.encoding	= MXC_ISI_ENC_RGB,

The rest looks good. I have tested all the new formats, both on the
input and output side, and have not noticed any issue.

Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  	},
>  	/*
>  	 * RAW formats

-- 
Regards,

Laurent Pinchart


^ permalink raw reply

* Re: [PATCH v2 0/6] imx8-isi: Bug fixes and format support enhancements
From: Laurent Pinchart @ 2026-07-21  0:32 UTC (permalink / raw)
  To: Guoniu Zhou
  Cc: Mauro Carvalho Chehab, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Christian Hemp,
	Stefan Riedmueller, Jacopo Mondi, Loic Poulain,
	Bryan O'Donoghue, Dong Aisheng, Guoniu Zhou, linux-media, imx,
	linux-arm-kernel, linux-kernel, stable, Laurentiu Palcu,
	Robert Chiras
In-Reply-To: <20260720-isi-v2-0-45845bc5d4fa@oss.nxp.com>

On Mon, Jul 20, 2026 at 11:34:02AM +0800, Guoniu Zhou wrote:
> This series addresses critical bugs in the imx8-isi driver and extends
> format support for high-end sensors and Android requirements.
> 
> Patch 1 fixes a critical stream ID validation bug in the crossbar routing
> where the validation loop iterates over the wrong routing table, allowing
> userspace to bypass validation entirely and configure invalid routes.
> 
> Patch 2 adds additional stream ID validation to enforce hardware constraints
> (SOURCE stream must be 0).
> 
> Patch 3 fixes a stream reference counting bug in the crossbar that prevents
> multiple streams from different virtual channels on the same input pad from
> being enabled correctly. Only the first stream gets enabled in hardware,
> subsequent streams are silently ignored.
> 
> Patch 4 adds support for 16-bit raw Bayer formats (SBGGR16, SGBRG16,
> SGRBG16, SRGGB16) commonly used by high-end image sensors.
> 
> Patch 5 fixes incorrect color mapping for XBGR32 format in memory-to-memory
> mode (marked for stable backport).
> 
> Patch 6 extends RGB format support by adding BGRA32, RGBA32, BGRX32, RGBX32,
> and ARGB2101010 formats with full M2M capabilities to meet Android
> requirements.
> 
> Signed-off-by: Guoniu Zhou <guoniu.zhou@oss.nxp.com>

I have taken patches 1, 2 and 5 in my tree already ([1]). The CI
pipeline is running ([2]). Once it completes successfully, I will send a
pull request. You can base the next version of this series (patches 3, 4
and 6) on top of [1].

[1] https://gitlab.freedesktop.org/linux-media/users/pinchartl/-/commit/db30b841e534f6b97008583f6e63c93473f14afc
[2] https://gitlab.freedesktop.org/linux-media/users/pinchartl/-/pipelines/1710408

> ---
> Changes in v2:
> - [1/6] Split v1 patch 1/5 into two patches: this patch fixes the core
>   for_each_active_route() bug, next patch adds additional stream
>   validation (Frank Li)
> - [2/6] New patch split from v1 1/5: adds stream ID validation on top of
>   for_each_active_route() fix (Frank Li)
> - [2/6] Remove incorrect sink_stream validation
> - [3/6] Use fixed-size array for enabled_count instead of dynamic allocation
> - [3/6] Use BIT_ULL() macro for u64 bitmask operations
> - [3/6] Use MXC_ISI_MAX_STREAMS (64) as loop boundary instead of num_sources
> - [3/6] Remove mxc_isi_stream_counters_alloc/free functions
> - [4/6] Add Reviewed-by tag from Frank Li
> - [5/6] Reword commit description for clarity (Frank Li)
> - [6/6] Add Reviewed-by tag from Frank Li
> - Link to v1: https://lore.kernel.org/r/20260629-isi-v1-0-deebfdb1b07b@oss.nxp.com
> 
> ---
> Guoniu Zhou (5):
>       media: nxp: imx8-isi: Fix stream ID validation bypass in crossbar routing
>       media: nxp: imx8-isi: Add stream ID validation for crossbar routing
>       media: nxp: imx8-isi: Fix per-stream reference counting for multiplexed streams
>       media: nxp: imx8-isi: Correct color map between V4L2 and ISI
>       media: nxp: imx8-isi: Add additional 32-bit RGB format support
> 
> Laurentiu Palcu (1):
>       media: nxp: imx8-isi: Add 16-bit raw Bayer format support
> 
>  .../media/platform/nxp/imx8-isi/imx8-isi-core.h    |  7 +-
>  .../platform/nxp/imx8-isi/imx8-isi-crossbar.c      | 92 +++++++++++++++-----
>  .../media/platform/nxp/imx8-isi/imx8-isi-pipe.c    | 24 ++++++
>  .../media/platform/nxp/imx8-isi/imx8-isi-video.c   | 97 +++++++++++++++++++++-
>  4 files changed, 196 insertions(+), 24 deletions(-)
> ---
> base-commit: 06cb687a5132fcffe624c0070576ab852ac6b568
> change-id: 20260626-isi-00f05b044ac9

-- 
Regards,

Laurent Pinchart


^ permalink raw reply

* Re: [PATCH v2 0/6] imx8-isi: Bug fixes and format support enhancements
From: Laurent Pinchart @ 2026-07-21  0:35 UTC (permalink / raw)
  To: Guoniu Zhou
  Cc: Mauro Carvalho Chehab, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Christian Hemp,
	Stefan Riedmueller, Jacopo Mondi, Loic Poulain,
	Bryan O'Donoghue, Dong Aisheng, Guoniu Zhou, linux-media, imx,
	linux-arm-kernel, linux-kernel, stable, Laurentiu Palcu,
	Robert Chiras
In-Reply-To: <20260721003240.GG50424@killaraus.ideasonboard.com>

On Tue, Jul 21, 2026 at 03:32:41AM +0300, Laurent Pinchart wrote:
> On Mon, Jul 20, 2026 at 11:34:02AM +0800, Guoniu Zhou wrote:
> > This series addresses critical bugs in the imx8-isi driver and extends
> > format support for high-end sensors and Android requirements.
> > 
> > Patch 1 fixes a critical stream ID validation bug in the crossbar routing
> > where the validation loop iterates over the wrong routing table, allowing
> > userspace to bypass validation entirely and configure invalid routes.
> > 
> > Patch 2 adds additional stream ID validation to enforce hardware constraints
> > (SOURCE stream must be 0).
> > 
> > Patch 3 fixes a stream reference counting bug in the crossbar that prevents
> > multiple streams from different virtual channels on the same input pad from
> > being enabled correctly. Only the first stream gets enabled in hardware,
> > subsequent streams are silently ignored.
> > 
> > Patch 4 adds support for 16-bit raw Bayer formats (SBGGR16, SGBRG16,
> > SGRBG16, SRGGB16) commonly used by high-end image sensors.
> > 
> > Patch 5 fixes incorrect color mapping for XBGR32 format in memory-to-memory
> > mode (marked for stable backport).
> > 
> > Patch 6 extends RGB format support by adding BGRA32, RGBA32, BGRX32, RGBX32,
> > and ARGB2101010 formats with full M2M capabilities to meet Android
> > requirements.
> > 
> > Signed-off-by: Guoniu Zhou <guoniu.zhou@oss.nxp.com>
> 
> I have taken patches 1, 2 and 5 in my tree already ([1]). The CI
> pipeline is running ([2]). Once it completes successfully, I will send a
> pull request. You can base the next version of this series (patches 3, 4
> and 6) on top of [1].
> 
> [1] https://gitlab.freedesktop.org/linux-media/users/pinchartl/-/commit/db30b841e534f6b97008583f6e63c93473f14afc
> [2] https://gitlab.freedesktop.org/linux-media/users/pinchartl/-/pipelines/1710408

This failed due to a mistake on my side. I've submitted a new pipeline:

https://gitlab.freedesktop.org/linux-media/users/pinchartl/-/pipelines/1710412

> > ---
> > Changes in v2:
> > - [1/6] Split v1 patch 1/5 into two patches: this patch fixes the core
> >   for_each_active_route() bug, next patch adds additional stream
> >   validation (Frank Li)
> > - [2/6] New patch split from v1 1/5: adds stream ID validation on top of
> >   for_each_active_route() fix (Frank Li)
> > - [2/6] Remove incorrect sink_stream validation
> > - [3/6] Use fixed-size array for enabled_count instead of dynamic allocation
> > - [3/6] Use BIT_ULL() macro for u64 bitmask operations
> > - [3/6] Use MXC_ISI_MAX_STREAMS (64) as loop boundary instead of num_sources
> > - [3/6] Remove mxc_isi_stream_counters_alloc/free functions
> > - [4/6] Add Reviewed-by tag from Frank Li
> > - [5/6] Reword commit description for clarity (Frank Li)
> > - [6/6] Add Reviewed-by tag from Frank Li
> > - Link to v1: https://lore.kernel.org/r/20260629-isi-v1-0-deebfdb1b07b@oss.nxp.com
> > 
> > ---
> > Guoniu Zhou (5):
> >       media: nxp: imx8-isi: Fix stream ID validation bypass in crossbar routing
> >       media: nxp: imx8-isi: Add stream ID validation for crossbar routing
> >       media: nxp: imx8-isi: Fix per-stream reference counting for multiplexed streams
> >       media: nxp: imx8-isi: Correct color map between V4L2 and ISI
> >       media: nxp: imx8-isi: Add additional 32-bit RGB format support
> > 
> > Laurentiu Palcu (1):
> >       media: nxp: imx8-isi: Add 16-bit raw Bayer format support
> > 
> >  .../media/platform/nxp/imx8-isi/imx8-isi-core.h    |  7 +-
> >  .../platform/nxp/imx8-isi/imx8-isi-crossbar.c      | 92 +++++++++++++++-----
> >  .../media/platform/nxp/imx8-isi/imx8-isi-pipe.c    | 24 ++++++
> >  .../media/platform/nxp/imx8-isi/imx8-isi-video.c   | 97 +++++++++++++++++++++-
> >  4 files changed, 196 insertions(+), 24 deletions(-)
> > ---
> > base-commit: 06cb687a5132fcffe624c0070576ab852ac6b568
> > change-id: 20260626-isi-00f05b044ac9

-- 
Regards,

Laurent Pinchart


^ permalink raw reply

* Re: [PATCH net] net: stmmac: raise TX completion interrupt at the end of an xmit burst
From: Jakub Kicinski @ 2026-07-21  0:35 UTC (permalink / raw)
  To: Johan Alvarado
  Cc: andrew+netdev, davem, edumazet, pabeni, mcoquelin.stm32,
	alexandre.torgue, Jose.Abreu, pavel, netdev, linux-stm32,
	linux-arm-kernel, linux-kernel
In-Reply-To: <0100019f35ea26e0-42ad009c-01ab-4a8f-b126-fa65fbacae5c-000000@email.amazonses.com>

On Mon, 6 Jul 2026 05:32:45 +0000 Johan Alvarado wrote:
> The TX mitigation logic only sets the Interrupt on Completion bit once
> every tx_coal_frames descriptors (STMMAC_TX_FRAMES = 25), with the
> tx_coal_timer hrtimer (STMMAC_COAL_TX_TIMER = 5000 us) as the only
> fallback. TX skbs are freed exclusively from the TX completion path,
> so any flow that keeps fewer than 25 frames in flight has all of its
> skbs held for up to 5 ms after transmission.

The netdev patch queue has overflown.
If these patches are still relevant you'll have to repost them.


^ permalink raw reply

* Re: [PATCH net-next] net: stmmac: Simplify ioctl handling
From: Andrew Lunn @ 2026-07-21  0:39 UTC (permalink / raw)
  To: Vadim Fedorenko
  Cc: Maxime Chevallier, Andrew Lunn, Jakub Kicinski, davem,
	Eric Dumazet, Paolo Abeni, Simon Horman, Maxime Coquelin,
	Alexandre Torgue, Russell King, thomas.petazzoni,
	Alexis Lothoré, netdev, linux-kernel, linux-arm-kernel,
	linux-stm32
In-Reply-To: <d4f606b9-d793-47c1-8c91-9c9da0e68b4a@linux.dev>

> looks like it won't work now. we have to create helpers in phy to fix it.
> I can work on it, but I don't have such HW combination to test. Do you have
> some HW to test this combination?

I don't. You should ask Richard Cochran. He added this code.

  Andrew


^ permalink raw reply

* Re: [PATCH v5 4/4] irqchip/gic-v3-its: Fix grammar and replace a bit number with its symbol
From: Radu Rendec @ 2026-07-21  0:58 UTC (permalink / raw)
  To: Kemeng Shi, maz, tglx, jason, lpieralisi; +Cc: linux-arm-kernel, linux-kernel
In-Reply-To: <20260720071215.50705-5-shikemeng@huaweicloud.com>

On Mon, 2026-07-20 at 15:12 +0800, Kemeng Shi wrote:
> Fix grammatical errors in comments and simplify the comment about reading
> GITS_BASER_INDIRECT to check two-level support.
> 
> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
> ---
>  drivers/irqchip/irq-gic-v3-its.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
> index 5dc91862fc15..8935a6e7a20f 100644
> --- a/drivers/irqchip/irq-gic-v3-its.c
> +++ b/drivers/irqchip/irq-gic-v3-its.c
> @@ -163,7 +163,7 @@ struct event_lpi_map {
>  
>  /*
>   * The ITS view of a device - belongs to an ITS, owns an interrupt
> - * translation table, and a list of interrupts.  If it some of its
> + * translation table, and a list of interrupts.  If some of its
>   * LPIs are injected into a guest (GICv4), the event_map.vm field
>   * indicates which one.
>   */
> @@ -2502,8 +2502,7 @@ static bool its_parse_indirect_baser(struct its_node *its,
>  	/* No need to enable Indirection if memory requirement < (psz*2)bytes */
>  	if ((esz << ids) > (psz * 2)) {
>  		/*
> -		 * Find out whether hw supports a single or two-level table by
> -		 * table by reading bit at offset '62' after writing '1' to it.
> +		 * Find out whether hw supports a single or two-level table
>  		 */

nit: since it's just one line of text now, you can put the /* */
comment markers on the same line, which is the preferred style for
single-line comments.

>  		its_write_baser(its, baser, val | GITS_BASER_INDIRECT);
>  		indirect = !!(baser->val & GITS_BASER_INDIRECT);

With that,

Reviewed-by: Radu Rendec <radu@rendec.net>


^ permalink raw reply

* [PATCH v3 2/5] ASoC: atmel: use .auto_selectable_formats
From: Kuninori Morimoto @ 2026-07-21  1:00 UTC (permalink / raw)
  To: Alexandre Belloni, Claudiu Beznea, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Nicolas Ferre, Takashi Iwai
  Cc: linux-arm-kernel, linux-sound
In-Reply-To: <87zezljgxy.wl-kuninori.morimoto.gx@renesas.com>

We can use .auto_selectable_formats. Let's adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/atmel/atmel-i2s.c     | 4 ++++
 sound/soc/atmel/atmel_ssc_dai.c | 7 +++++++
 sound/soc/atmel/mchp-i2s-mcc.c  | 9 +++++++++
 sound/soc/atmel/mchp-pdmc.c     | 4 ++++
 4 files changed, 24 insertions(+)

diff --git a/sound/soc/atmel/atmel-i2s.c b/sound/soc/atmel/atmel-i2s.c
index 762199faf872e..d9ad262ec44de 100644
--- a/sound/soc/atmel/atmel-i2s.c
+++ b/sound/soc/atmel/atmel-i2s.c
@@ -540,12 +540,16 @@ static int atmel_i2s_dai_probe(struct snd_soc_dai *dai)
 	return 0;
 }
 
+static const u64 atmel_i2s_selectable_formats = SND_SOC_POSSIBLE_DAIFMT_I2S;
+
 static const struct snd_soc_dai_ops atmel_i2s_dai_ops = {
 	.probe		= atmel_i2s_dai_probe,
 	.prepare	= atmel_i2s_prepare,
 	.trigger	= atmel_i2s_trigger,
 	.hw_params	= atmel_i2s_hw_params,
 	.set_fmt	= atmel_i2s_set_dai_fmt,
+	.auto_selectable_formats	= &atmel_i2s_selectable_formats,
+	.num_auto_selectable_formats	= 1,
 };
 
 static struct snd_soc_dai_driver atmel_i2s_dai = {
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
index 89098f41679c0..f4f886bf678d2 100644
--- a/sound/soc/atmel/atmel_ssc_dai.c
+++ b/sound/soc/atmel/atmel_ssc_dai.c
@@ -825,6 +825,11 @@ static int atmel_ssc_resume(struct snd_soc_component *component)
 #define ATMEL_SSC_FORMATS (SNDRV_PCM_FMTBIT_S8     | SNDRV_PCM_FMTBIT_S16_LE |\
 			   SNDRV_PCM_FMTBIT_S32_LE)
 
+static const u64 atmel_ssc_selectable_formats =
+	SND_SOC_POSSIBLE_DAIFMT_I2S	|
+	SND_SOC_POSSIBLE_DAIFMT_LEFT_J	|
+	SND_SOC_POSSIBLE_DAIFMT_DSP_A;
+
 static const struct snd_soc_dai_ops atmel_ssc_dai_ops = {
 	.startup	= atmel_ssc_startup,
 	.shutdown	= atmel_ssc_shutdown,
@@ -833,6 +838,8 @@ static const struct snd_soc_dai_ops atmel_ssc_dai_ops = {
 	.hw_params	= atmel_ssc_hw_params,
 	.set_fmt	= atmel_ssc_set_dai_fmt,
 	.set_clkdiv	= atmel_ssc_set_dai_clkdiv,
+	.auto_selectable_formats	= &atmel_ssc_selectable_formats,
+	.num_auto_selectable_formats	= 1,
 };
 
 static struct snd_soc_dai_driver atmel_ssc_dai = {
diff --git a/sound/soc/atmel/mchp-i2s-mcc.c b/sound/soc/atmel/mchp-i2s-mcc.c
index 17d138bb90648..a832dee73ac78 100644
--- a/sound/soc/atmel/mchp-i2s-mcc.c
+++ b/sound/soc/atmel/mchp-i2s-mcc.c
@@ -912,6 +912,13 @@ static int mchp_i2s_mcc_dai_probe(struct snd_soc_dai *dai)
 	return 0;
 }
 
+static const u64 mchp_i2s_selectable_formats =
+	SND_SOC_POSSIBLE_DAIFMT_I2S	|
+	SND_SOC_POSSIBLE_DAIFMT_LEFT_J	|
+	SND_SOC_POSSIBLE_DAIFMT_DSP_A	|
+	SND_SOC_POSSIBLE_DAIFMT_GATED	|
+	SND_SOC_POSSIBLE_DAIFMT_NB_NF;
+
 static const struct snd_soc_dai_ops mchp_i2s_mcc_dai_ops = {
 	.probe		= mchp_i2s_mcc_dai_probe,
 	.set_sysclk	= mchp_i2s_mcc_set_sysclk,
@@ -922,6 +929,8 @@ static const struct snd_soc_dai_ops mchp_i2s_mcc_dai_ops = {
 	.hw_free	= mchp_i2s_mcc_hw_free,
 	.set_fmt	= mchp_i2s_mcc_set_dai_fmt,
 	.set_tdm_slot	= mchp_i2s_mcc_set_dai_tdm_slot,
+	.auto_selectable_formats	= &mchp_i2s_selectable_formats,
+	.num_auto_selectable_formats	= 1,
 };
 
 #define MCHP_I2SMCC_RATES              SNDRV_PCM_RATE_8000_192000
diff --git a/sound/soc/atmel/mchp-pdmc.c b/sound/soc/atmel/mchp-pdmc.c
index ec7233ce1f78b..a6a9b5e6cd95e 100644
--- a/sound/soc/atmel/mchp-pdmc.c
+++ b/sound/soc/atmel/mchp-pdmc.c
@@ -741,6 +741,8 @@ static int mchp_pdmc_pcm_new(struct snd_soc_pcm_runtime *rtd,
 	return ret;
 }
 
+static const u64 mchp_selectable_formats = SND_SOC_POSSIBLE_DAIFMT_PDM;
+
 static const struct snd_soc_dai_ops mchp_pdmc_dai_ops = {
 	.probe		= mchp_pdmc_dai_probe,
 	.set_fmt	= mchp_pdmc_set_fmt,
@@ -748,6 +750,8 @@ static const struct snd_soc_dai_ops mchp_pdmc_dai_ops = {
 	.hw_params	= mchp_pdmc_hw_params,
 	.trigger	= mchp_pdmc_trigger,
 	.pcm_new	= &mchp_pdmc_pcm_new,
+	.auto_selectable_formats	= &mchp_selectable_formats,
+	.num_auto_selectable_formats	= 1,
 };
 
 static struct snd_soc_dai_driver mchp_pdmc_dai = {
-- 
2.53.0



^ permalink raw reply related

* [PATCH v3 4/5] ASoC: bcm: use .auto_selectable_formats
From: Kuninori Morimoto @ 2026-07-21  1:00 UTC (permalink / raw)
  To: "Cássio Gabriel", Florian Fainelli, Jaroslav Kysela,
	Liam Girdwood, Mark Brown, Ray Jui, Scott Branden, Takashi Iwai
  Cc: Cássio Gabriel, linux-arm-kernel, linux-sound
In-Reply-To: <87zezljgxy.wl-kuninori.morimoto.gx@renesas.com>

We can use .auto_selectable_formats. Let's adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/bcm/bcm2835-i2s.c | 13 +++++++++++++
 sound/soc/bcm/cygnus-ssp.c  |  7 +++++++
 2 files changed, 20 insertions(+)

diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c
index 87d2f06c2f53a..2089778282541 100644
--- a/sound/soc/bcm/bcm2835-i2s.c
+++ b/sound/soc/bcm/bcm2835-i2s.c
@@ -748,6 +748,17 @@ static int bcm2835_i2s_dai_probe(struct snd_soc_dai *dai)
 	return 0;
 }
 
+static const u64 bcm2835_selectable_formats =
+	SND_SOC_POSSIBLE_DAIFMT_I2S	|
+	SND_SOC_POSSIBLE_DAIFMT_RIGHT_J	|
+	SND_SOC_POSSIBLE_DAIFMT_LEFT_J	|
+	SND_SOC_POSSIBLE_DAIFMT_DSP_A	|
+	SND_SOC_POSSIBLE_DAIFMT_DSP_B	|
+	SND_SOC_POSSIBLE_DAIFMT_NB_NF	|
+	SND_SOC_POSSIBLE_DAIFMT_NB_IF	|
+	SND_SOC_POSSIBLE_DAIFMT_IB_NF	|
+	SND_SOC_POSSIBLE_DAIFMT_IB_IF;
+
 static const struct snd_soc_dai_ops bcm2835_i2s_dai_ops = {
 	.probe		= bcm2835_i2s_dai_probe,
 	.startup	= bcm2835_i2s_startup,
@@ -758,6 +769,8 @@ static const struct snd_soc_dai_ops bcm2835_i2s_dai_ops = {
 	.set_fmt	= bcm2835_i2s_set_dai_fmt,
 	.set_bclk_ratio	= bcm2835_i2s_set_dai_bclk_ratio,
 	.set_tdm_slot	= bcm2835_i2s_set_dai_tdm_slot,
+	.auto_selectable_formats	= &bcm2835_selectable_formats,
+	.num_auto_selectable_formats	= 1,
 };
 
 static struct snd_soc_dai_driver bcm2835_i2s_dai = {
diff --git a/sound/soc/bcm/cygnus-ssp.c b/sound/soc/bcm/cygnus-ssp.c
index 47706ae0a31f0..753021789a522 100644
--- a/sound/soc/bcm/cygnus-ssp.c
+++ b/sound/soc/bcm/cygnus-ssp.c
@@ -1133,6 +1133,11 @@ static int cygnus_ssp_resume(struct snd_soc_component *component)
 #define cygnus_ssp_resume  NULL
 #endif
 
+static const u64 cygnus_selectable_formats =
+	SND_SOC_POSSIBLE_DAIFMT_I2S	|
+	SND_SOC_POSSIBLE_DAIFMT_DSP_A	|
+	SND_SOC_POSSIBLE_DAIFMT_DSP_B;
+
 static const struct snd_soc_dai_ops cygnus_ssp_dai_ops = {
 	.startup	= cygnus_ssp_startup,
 	.shutdown	= cygnus_ssp_shutdown,
@@ -1141,6 +1146,8 @@ static const struct snd_soc_dai_ops cygnus_ssp_dai_ops = {
 	.set_fmt	= cygnus_ssp_set_fmt,
 	.set_sysclk	= cygnus_ssp_set_sysclk,
 	.set_tdm_slot	= cygnus_set_dai_tdm_slot,
+	.auto_selectable_formats	= &cygnus_selectable_formats,
+	.num_auto_selectable_formats	= 1,
 };
 
 static const struct snd_soc_dai_ops cygnus_spdif_dai_ops = {
-- 
2.53.0



^ permalink raw reply related

* Re: [PATCH] clk: mmp: allow COMPILE_TEST builds
From: Rosen Penev @ 2026-07-21  1:04 UTC (permalink / raw)
  To: Brian Masney
  Cc: Duje Mihanović, linux-clk, Michael Turquette, Stephen Boyd,
	Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt,
	open list, moderated list:ARM/Marvell PXA1908 SOC support,
	open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b
In-Reply-To: <al6ALM2eIWots1Zr@redhat.com>

On Mon, Jul 20, 2026 at 1:08 PM Brian Masney <bmasney@redhat.com> wrote:
>
> Hi Duje,
>
> On Mon, Jul 20, 2026 at 04:46:40PM +0200, Duje Mihanović wrote:
> > On Sunday, 19 July 2026 23:43:49 Central European Summer Time Rosen Penev
> > wrote:
> >
> > [...]
> >
> > > diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
> > > index 4b2c089f46a1..8383f9f1da51 100644
> > > --- a/drivers/clk/Makefile
> > > +++ b/drivers/clk/Makefile
> > > @@ -130,7 +130,7 @@ obj-y                                   +=
> > mediatek/
> > >  obj-$(CONFIG_ARCH_MESON)           += meson/
> > >  obj-y                                      += microchip/
> > >  ifeq ($(CONFIG_COMMON_CLK), y)
> > > -obj-$(CONFIG_ARCH_MMP)                     += mmp/
> > > +obj-$(CONFIG_COMMON_CLK_MMP)               += mmp/
> >
> > Could it be possible to select mmp unconditionally, like most of the other
> > subtrees are? AFAICT, that would also require creating new Kconfig symbols for
> > the PXA168, PXA910 and PXA1928 clocks, but I suspect it may be the more proper
> > choice in the long term.
>
> Just by sheer numbers, the CONFIG_COMMON_CLK_XXX approach is the most
> common use case right now.
It's much simpler this way.
>
>     x1:~/src/linux/linux-next ((next-20260720) %)$ grep "CONFIG_COMMON_CLK" drivers/clk/Makefile | grep "+=" | wc -l
>     68
>     x1:~/src/linux/linux-next ((next-20260720) %)$ grep "obj-y" drivers/clk/Makefile | wc -l
>     25
>
> I have no strong opinions about this either way other than to drive
> consistency across various drivers as much as possible.
>
> Currently the mmp directory currently only has COMMON_CLK_PXA1908
> defined. When the other PXA* drivers are introduced, will there be a
> CONFIG_COMMON_CLK_MMA_COMMON that all of the drivers will use?
>
> If so, we could put that MMA_COMMON in the toplevel clk Makefile.
>
> If not, then yes I agree that obj-y will be fine.
>
> Brian
>


^ permalink raw reply

* Re: [PATCH v5 3/4] irqchip/gic-v3-its: Fix leak in its_vpe_irq_domain_alloc()
From: Kemeng Shi @ 2026-07-21  1:28 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: tglx, jason, lpieralisi, radu, linux-arm-kernel, linux-kernel
In-Reply-To: <86a4rmf3k7.wl-maz@kernel.org>

在 2026/7/20 16:50:00, Marc Zyngier 写道:
> On Mon, 20 Jul 2026 08:12:14 +0100,
> Kemeng Shi <shikemeng@huaweicloud.com> wrote:
>>
>> When its_irq_gic_domain_alloc() fails, the following
>> its_vpe_irq_domain_free() skips calling its_vep_teardown() for the
>> corresponding irq. Try its_vpe_teardown() in error handling to avoid
>> the leak issue.
>>
>> Fixes: 7d75bbb4bc1ad ("irqchip/gic-v3-its: Add VPE irq domain allocation/teardown")
>> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
>> ---
>>  drivers/irqchip/irq-gic-v3-its.c | 12 ++++++++----
>>  1 file changed, 8 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
>> index 3e4edcb64065..5dc91862fc15 100644
>> --- a/drivers/irqchip/irq-gic-v3-its.c
>> +++ b/drivers/irqchip/irq-gic-v3-its.c
>> @@ -4594,9 +4594,11 @@ static int its_vpe_init(struct its_vpe *vpe)
>>  
>>  static void its_vpe_teardown(struct its_vpe *vpe)
>>  {
>> -	its_vpe_db_proxy_unmap(vpe);
>> -	its_vpe_id_free(vpe->vpe_id);
>> -	its_free_pending_table(vpe->vpt_page);
>> +	if (vpe->vpt_page != NULL) {
>> +		its_vpe_db_proxy_unmap(vpe);
>> +		its_vpe_id_free(vpe->vpe_id);
>> +		its_free_pending_table(vpe->vpt_page);
>> +	}
> 
> Please keep the diff minimal by doing an early return. This also
> deserves a comment, because this is not completely obvious:
Sure, I will do it in next version soon.> 
> diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
> index 6f5811aae59c1..38032067135b6 100644
> --- a/drivers/irqchip/irq-gic-v3-its.c
> +++ b/drivers/irqchip/irq-gic-v3-its.c
> @@ -4592,6 +4592,13 @@ static int its_vpe_init(struct its_vpe *vpe)
>  
>  static void its_vpe_teardown(struct its_vpe *vpe)
>  {
> +	/*
> +	 * If vpt_page is NULL, then its_vpe_init() has failed, and
> +	 * there is nothing to do as no resource has been allocated.
> +	 */
> +	if (!vpe->vpt_page)
> +		return;
> +
>  	its_vpe_db_proxy_unmap(vpe);
>  	its_vpe_id_free(vpe->vpe_id);
>  	its_free_pending_table(vpe->vpt_page);
> 
> 	M.
> 



^ permalink raw reply

* [PATCH 0/4] ASoC: mediatek: preparation for Card capsuling
From: Kuninori Morimoto @ 2026-07-21  1:33 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Darren Ye, Jaroslav Kysela,
	Liam Girdwood, Mark Brown, Matthias Brugger, Takashi Iwai
  Cc: linux-arm-kernel, linux-sound


Hi Mediatek developers

I will post Card capsuling patch.
To makes its review easy, tidyup mediatek drivers to reduce
un-related diff as preparation.
No functional change, but is preparation for cleanup driver.


Kuninori Morimoto (4):
  ASoC: mediatek: mt8192-mt6359-rt1015-rt5682: use *dev in mt8192_mt6359_card_set_be_link()
  ASoC: mediatek: common/mtk-dsp-sof-common: use for_each_card_prelinks()
  ASoC: mediatek: mt8196-nau8825: remove unnecessary declaration
  ASoC: mediatek: mt8365-mt6357: remove useless assignment

 sound/soc/mediatek/common/mtk-dsp-sof-common.c       |  7 ++++---
 .../mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c    | 12 ++++++------
 sound/soc/mediatek/mt8196/mt8196-nau8825.c           |  2 --
 sound/soc/mediatek/mt8365/mt8365-mt6357.c            |  1 -
 4 files changed, 10 insertions(+), 12 deletions(-)

-- 
2.53.0



^ permalink raw reply

* [PATCH 1/4] ASoC: mediatek: mt8192-mt6359-rt1015-rt5682: use *dev in mt8192_mt6359_card_set_be_link()
From: Kuninori Morimoto @ 2026-07-21  1:33 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Darren Ye, Jaroslav Kysela,
	Liam Girdwood, Mark Brown, Matthias Brugger, Takashi Iwai
  Cc: linux-arm-kernel, linux-sound
In-Reply-To: <8733xdjfdq.wl-kuninori.morimoto.gx@renesas.com>

use *dev, instead of card->dev.
No functional change, but is preparation for cleanup driver.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c    | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
index 91c57765ab57b..864b4d7228f50 100644
--- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
+++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
@@ -1019,7 +1019,7 @@ static struct snd_soc_card mt8192_mt6359_rt1015p_rt5682x_card = {
 	.num_dapm_routes = ARRAY_SIZE(mt8192_mt6359_rt1015p_rt5682x_routes),
 };
 
-static int mt8192_mt6359_card_set_be_link(struct snd_soc_card *card,
+static int mt8192_mt6359_card_set_be_link(struct device *dev,
 					  struct snd_soc_dai_link *link,
 					  struct device_node *node,
 					  char *link_name)
@@ -1027,9 +1027,9 @@ static int mt8192_mt6359_card_set_be_link(struct snd_soc_card *card,
 	int ret;
 
 	if (node && strcmp(link->name, link_name) == 0) {
-		ret = snd_soc_of_get_dai_link_codecs(card->dev, node, link);
+		ret = snd_soc_of_get_dai_link_codecs(dev, node, link);
 		if (ret < 0) {
-			dev_err_probe(card->dev, ret, "get dai link codecs fail\n");
+			dev_err_probe(dev, ret, "get dai link codecs fail\n");
 			return ret;
 		}
 	}
@@ -1065,21 +1065,21 @@ static int mt8192_mt6359_legacy_probe(struct mtk_soc_card_data *soc_card_data)
 	}
 
 	for_each_card_prelinks(card, i, dai_link) {
-		ret = mt8192_mt6359_card_set_be_link(card, dai_link, speaker_codec, "I2S3");
+		ret = mt8192_mt6359_card_set_be_link(dev, dai_link, speaker_codec, "I2S3");
 		if (ret) {
 			dev_err_probe(dev, ret, "%s set speaker_codec fail\n",
 				      dai_link->name);
 			break;
 		}
 
-		ret = mt8192_mt6359_card_set_be_link(card, dai_link, headset_codec, "I2S8");
+		ret = mt8192_mt6359_card_set_be_link(dev, dai_link, headset_codec, "I2S8");
 		if (ret) {
 			dev_err_probe(dev, ret, "%s set headset_codec fail\n",
 				      dai_link->name);
 			break;
 		}
 
-		ret = mt8192_mt6359_card_set_be_link(card, dai_link, headset_codec, "I2S9");
+		ret = mt8192_mt6359_card_set_be_link(dev, dai_link, headset_codec, "I2S9");
 		if (ret) {
 			dev_err_probe(dev, ret, "%s set headset_codec fail\n",
 				      dai_link->name);
-- 
2.53.0



^ permalink raw reply related

* [PATCH 3/4] ASoC: mediatek: mt8196-nau8825: remove unnecessary declaration
From: Kuninori Morimoto @ 2026-07-21  1:33 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Darren Ye, Jaroslav Kysela,
	Liam Girdwood, Mark Brown, Matthias Brugger, Takashi Iwai
  Cc: linux-arm-kernel, linux-sound
In-Reply-To: <8733xdjfdq.wl-kuninori.morimoto.gx@renesas.com>

No need to declarate mt8196_nau8825_soc_card. Remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/mediatek/mt8196/mt8196-nau8825.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sound/soc/mediatek/mt8196/mt8196-nau8825.c b/sound/soc/mediatek/mt8196/mt8196-nau8825.c
index c9424786c53df..8303ab960f80b 100644
--- a/sound/soc/mediatek/mt8196/mt8196-nau8825.c
+++ b/sound/soc/mediatek/mt8196/mt8196-nau8825.c
@@ -104,8 +104,6 @@ static const struct snd_kcontrol_new mt8196_nau8825_controls[] = {
 
 #define EXT_SPK_AMP_W_NAME "Ext_Speaker_Amp"
 
-static struct snd_soc_card mt8196_nau8825_soc_card;
-
 static const struct snd_soc_dapm_widget mt8196_nau8825_card_widgets[] = {
 	/* SOF Uplink */
 	SND_SOC_DAPM_MIXER("SOF_DMA_UL0", SND_SOC_NOPM, 0, 0, NULL, 0),
-- 
2.53.0



^ permalink raw reply related

* [PATCH 2/4] ASoC: mediatek: common/mtk-dsp-sof-common: use for_each_card_prelinks()
From: Kuninori Morimoto @ 2026-07-21  1:33 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Darren Ye, Jaroslav Kysela,
	Liam Girdwood, Mark Brown, Matthias Brugger, Takashi Iwai
  Cc: linux-arm-kernel, linux-sound
In-Reply-To: <8733xdjfdq.wl-kuninori.morimoto.gx@renesas.com>

We already have for_each_card_prelinks(). Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/mediatek/common/mtk-dsp-sof-common.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sound/soc/mediatek/common/mtk-dsp-sof-common.c b/sound/soc/mediatek/common/mtk-dsp-sof-common.c
index 17b9ea6be6040..adefbed5bbe72 100644
--- a/sound/soc/mediatek/common/mtk-dsp-sof-common.c
+++ b/sound/soc/mediatek/common/mtk-dsp-sof-common.c
@@ -232,6 +232,7 @@ int mtk_sof_dailink_parse_of(struct device *dev, struct snd_soc_card *card,
 			     const char *propname)
 {
 	struct device_node *np = dev->of_node;
+	struct snd_soc_dai_link *dai_link;
 	struct snd_soc_dai_link *parsed_dai_link;
 	const char *dai_name = NULL;
 	int i, j, ret, num_links, parsed_num_links = 0;
@@ -254,9 +255,9 @@ int mtk_sof_dailink_parse_of(struct device *dev, struct snd_soc_card *card,
 			return ret;
 		}
 		dev_dbg(dev, "ASoC: Property get dai_name:%s\n", dai_name);
-		for (j = 0; j < card->num_links; j++) {
-			if (!strcmp(dai_name, card->dai_link[j].name)) {
-				memcpy(&parsed_dai_link[parsed_num_links++], &card->dai_link[j],
+		for_each_card_prelinks(card, j, dai_link) {
+			if (!strcmp(dai_name, dai_link->name)) {
+				memcpy(&parsed_dai_link[parsed_num_links++], dai_link,
 				       sizeof(struct snd_soc_dai_link));
 				break;
 			}
-- 
2.53.0



^ permalink raw reply related

* [PATCH 4/4] ASoC: mediatek: mt8365-mt6357: remove useless assignment
From: Kuninori Morimoto @ 2026-07-21  1:33 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Darren Ye, Jaroslav Kysela,
	Liam Girdwood, Mark Brown, Matthias Brugger, Takashi Iwai
  Cc: linux-arm-kernel, linux-sound
In-Reply-To: <8733xdjfdq.wl-kuninori.morimoto.gx@renesas.com>

	static int mt8365_mt6357_dev_probe(...)
	{
		...
		struct device *dev = card->dev;
		...
=>		card->dev = dev;
		...
	}

This is useless. Remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/mediatek/mt8365/mt8365-mt6357.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/mediatek/mt8365/mt8365-mt6357.c b/sound/soc/mediatek/mt8365/mt8365-mt6357.c
index 4339f45ee115a..dceee837c67d8 100644
--- a/sound/soc/mediatek/mt8365/mt8365-mt6357.c
+++ b/sound/soc/mediatek/mt8365/mt8365-mt6357.c
@@ -297,7 +297,6 @@ static int mt8365_mt6357_dev_probe(struct mtk_soc_card_data *soc_card_data, bool
 	struct mt8365_mt6357_priv *mach_priv;
 	int ret;
 
-	card->dev = dev;
 	ret = parse_dai_link_info(card);
 	if (ret)
 		goto err;
-- 
2.53.0



^ permalink raw reply related

* [PATCH 0/2] ASoC: meson: preparation for Card capsuling
From: Kuninori Morimoto @ 2026-07-21  1:36 UTC (permalink / raw)
  To: Jaroslav Kysela, Jerome Brunet, Kevin Hilman, Liam Girdwood,
	Mark Brown, Martin Blumenstingl, Neil Armstrong, Takashi Iwai
  Cc: linux-arm-kernel, linux-sound


Hi Meson developers

I will post Card capsuling patch.
To makes its review easy, tidyup meson drivers to reduce
un-related diff as preparation.
No functional change, but is preparation for cleanup driver.

[1/2] is RFC

Kuninori Morimoto (2):
  ASoC: meson: meson-card-utils: use meson_card_parse_of_optional()
  ASoC: meson: meson-card: use priv instead of card on each functions

 sound/soc/meson/axg-card.c         | 63 ++++++++++++++++--------------
 sound/soc/meson/gx-card.c          | 23 +++++------
 sound/soc/meson/meson-card-utils.c | 59 +++++++++++++++-------------
 sound/soc/meson/meson-card.h       | 11 +++---
 4 files changed, 83 insertions(+), 73 deletions(-)

-- 
2.53.0



^ permalink raw reply

* [PATCH RFC 1/2] ASoC: meson: meson-card-utils: use meson_card_parse_of_optional()
From: Kuninori Morimoto @ 2026-07-21  1:36 UTC (permalink / raw)
  To: Jaroslav Kysela, Jerome Brunet, Kevin Hilman, Liam Girdwood,
	Mark Brown, Martin Blumenstingl, Neil Armstrong, Takashi Iwai
  Cc: linux-arm-kernel, linux-sound
In-Reply-To: <87v7a9i0o8.wl-kuninori.morimoto.gx@renesas.com>

We already have meson_card_parse_of_optional(). Let's use it for
snd_soc_of_parse_aux_devs() too.

It is using snd_soc_of_parse_card_name(), but let's keep as-is
for it for now. Beuase it will be not able to share code when
Card capsuling.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/meson/meson-card-utils.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/meson/meson-card-utils.c b/sound/soc/meson/meson-card-utils.c
index 8617a4661a339..d144ab79b645b 100644
--- a/sound/soc/meson/meson-card-utils.c
+++ b/sound/soc/meson/meson-card-utils.c
@@ -300,7 +300,8 @@ int meson_card_probe(struct platform_device *pdev)
 	if (ret)
 		goto out_err;
 
-	ret = snd_soc_of_parse_aux_devs(&priv->card, "audio-aux-devs");
+	ret = meson_card_parse_of_optional(&priv->card, "audio-aux-devs",
+					   snd_soc_of_parse_aux_devs);
 	if (ret)
 		goto out_err;
 
-- 
2.53.0



^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox