Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: <yadong.qi@linux.alibaba.com>
To: "'Ben Horgan'" <ben.horgan@arm.com>, <james.morse@arm.com>,
	<reinette.chatre@intel.com>, <fenghuay@nvidia.com>,
	<linux-kernel@vger.kernel.org>, <lpieralisi@kernel.org>,
	<guohanjun@huawei.com>, <sudeep.holla@kernel.org>,
	<catalin.marinas@arm.com>, <will@kernel.org>, <rafael@kernel.org>,
	<lenb@kernel.org>, <linux-acpi@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<ying.huang@linux.alibaba.com>
Cc: <ptg-linux-kernel@linux.alibaba.com>
Subject: RE: [RFC PATCH] arm_mpam: remove sanity check of accessibility when error interrupt is SPI on SMT platforms
Date: Fri, 31 Jul 2026 10:15:57 +0800	[thread overview]
Message-ID: <000d01dd2092$8739f760$95ade620$@linux.alibaba.com> (raw)
In-Reply-To: <d471ead3-d6fd-4e2e-a800-5bbeba42cb90@arm.com>

> Hi Yadong,
> 
> On 7/20/26 08:24, Yadong Qi wrote:
> > On SMT platforms, an L2 cache MSC is typically shared between sibling
> > threads. Per the MPAM ACPI spec (DEN0065B), the MSC's linked device
> > should be set to the processor container of those siblings, so the
> > kernel derives msc->accessibility as just the sibling CPUs.
> >
> > Per the MPAM spec (IHI0099B), when an MSC is not integrated into a PE,
> > SPI/LPI is the recommended error interrupt. SPIs are not per-CPU, and a
> > sanity check in mpam_msc_setup_error_irq() requires accessibility ==
> > cpu_possible_mask — assuming a shared interrupt must be routable to all
> > CPUs. This creates a conflict on SMT platforms: the MSC has a restricted
> > accessibility but a shared error interrupt, causing probe to fail with:
> >
> >   msc:N is a private resource with a shared error interrupt
> >
> > This RFC patch removes the check to allow MSC probe to succeed on SMT
> > platforms, but this is mainly intended to start a discussion. We would
> > appreciate advice on the right way to handle this conflict. Is this a
> > spec issue, or should the driver handle SPI error interrupts differently
> 
> For advice on questions broader than just linux please ask arm support:
> support@arm.com

Thanks Ben, I will send mail for arm support.

> 
> > when an MSC has a restricted accessibility mask?
> 
> I expect the MPAM driver could be taught to deal with SPI interrupts without global
> affinity.

I guess MPAM driver could set the interrupt affinity to accessibility mask if SPI interrupt
is per-MSC. But if the SPI interrupt is shared between different MSCs, it seems no proper
method.

> 
> >
> > Signed-off-by: Yadong Qi <yadong.qi@linux.alibaba.com>
> > ---
> >  drivers/resctrl/mpam_devices.c | 7 -------
> >  1 file changed, 7 deletions(-)
> >
> > diff --git a/drivers/resctrl/mpam_devices.c b/drivers/resctrl/mpam_devices.c
> > index b69f99488111..e8b2b5e00d7c 100644
> > --- a/drivers/resctrl/mpam_devices.c
> > +++ b/drivers/resctrl/mpam_devices.c
> > @@ -1964,13 +1964,6 @@ static int mpam_msc_setup_error_irq(struct
> mpam_msc *msc)
> >  	if (irq_is_percpu(irq))
> >  		return __setup_ppi(msc);
> >
> > -	/* sanity check: shared interrupts can be routed anywhere? */
> > -	if (!cpumask_equal(&msc->accessibility, cpu_possible_mask)) {
> > -		pr_err_once("msc:%u is a private resource with a shared error interrupt",
> > -			    msc->id);
> > -		return -EINVAL;
> > -	}
> > -
> 
> To do this the MPAM driver would have to remove the interrupt from balancing,
> IRQF_NOBALANCING, and
> control the balancing itself.

Yes, but another problem is SPI could be shared between different MSCs, interrupt
affinity could not be set correctly.
Currently, the error irq handler print the error message and disabled MPAM, maybe
we can allow interrupt from any CPU?

> 
> Thanks,
> 
> Ben


Best Regard
Yadong



  reply	other threads:[~2026-07-31  2:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260720072409.2660-1-yadong.qi@linux.alibaba.com_quarantine>
2026-07-28 15:48 ` [RFC PATCH] arm_mpam: remove sanity check of accessibility when error interrupt is SPI on SMT platforms Ben Horgan
2026-07-31  2:15   ` yadong.qi [this message]
2026-07-20  7:24 Yadong Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000d01dd2092$8739f760$95ade620$@linux.alibaba.com' \
    --to=yadong.qi@linux.alibaba.com \
    --cc=ben.horgan@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=fenghuay@nvidia.com \
    --cc=guohanjun@huawei.com \
    --cc=james.morse@arm.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=ptg-linux-kernel@linux.alibaba.com \
    --cc=rafael@kernel.org \
    --cc=reinette.chatre@intel.com \
    --cc=sudeep.holla@kernel.org \
    --cc=will@kernel.org \
    --cc=ying.huang@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox