mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Niyas Sait <niyas.sait@arm.com>
Cc: ben.horgan@arm.com, catalin.marinas@arm.com, fenghuay@nvidia.com,
	guohanjun@huawei.com, james.morse@arm.com, jic23@kernel.org,
	lenb@kernel.org, linux-acpi@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, lpieralisi@kernel.org,
	rafael@kernel.org, reinette.chatre@intel.com,
	sudeep.holla@kernel.org, will@kernel.org
Subject: Re: [PATCH 5/5] arm_mpam: detect and enable MPAM-Fb PCC support
Date: Thu, 21 May 2026 18:04:50 +0200	[thread overview]
Message-ID: <88ed47c1-f84f-4aac-8ec7-ffe87a2a8138@arm.com> (raw)
In-Reply-To: <20260518111422.3269965-1-niyas.sait@arm.com>

Hi Niyas,

On 5/18/26 13:14, Niyas Sait wrote:
> Hi Andre,
> 
> On Wed, Apr 29, 2026 at 04:13:39PM +0200, Andre Przywara wrote:
> 
>> +		msc->pcc_chan = pcc_mbox_request_channel(&msc->pcc_cl,
>> +							 pcc_subspace_id);
>> +		if (IS_ERR(msc->pcc_chan)) {
>> +			pr_err("Failed to request MSC PCC channel\n");
>> +			return (void *)msc->pcc_chan;
>> +		}
>> +
>> +		if (msc->pcc_chan->shmem_size < MPAM_FB_MAX_MSG_SIZE) {
>> +			pr_err("MPAM-Fb PCC channel size too small.\n");
>> +			pcc_mbox_free_channel(msc->pcc_chan);
>> +			return ERR_PTR(-ENOMEM);
>> +		}
> 
> I think this allocates one PCC channel per MSC instance.
> 
> MPAM-Fb spec. allows MPAM manager to support multiple MSCs and does not

Ouch, that's right, the MSC ID parameter in the protocol would be pretty 
pointless otherwise ;-)
I guess me testing with just one MSC kind of hides this problem ;-)

> require seperate channels per MSC. Each MSC is targeted via its msc_id
> in the MPAM_MSC_READ/WRITE commands.
> 
> So for systems where multiple MSC nodes point to the same PCC subspace,
> should we share one pcc_mbox_chan and serialize requests through it?

I think we serialise already, because we have this pcc_chan_lock. This 
makes sure that each access is done in isolation. But on the setup side 
we need to indeed make sure to share an already allocated channel, which 
required some code changes.

Thanks for pointing this out!

Cheers,
Andre


      reply	other threads:[~2026-05-21 16:04 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-29 14:13 [PATCH 0/5] arm_mpam: Add MPAM-Fb firmware support Andre Przywara
2026-04-29 14:13 ` [PATCH 1/5] arm_mpam: Parse the rest of the ACPI table Andre Przywara
2026-05-08 10:21   ` Ben Horgan
2026-05-12 16:13     ` Andre Przywara
2026-05-21 17:27   ` Srivathsa L Rao
2026-04-29 14:13 ` [PATCH 2/5] arm_mpam: Split the locking around the mon_sel registers Andre Przywara
2026-05-08 10:23   ` Ben Horgan
2026-05-18 10:31   ` Niyas Sait
2026-04-29 14:13 ` [PATCH 3/5] arm_mpam: add MPAM-Fb MSC firmware access support Andre Przywara
2026-05-08 10:33   ` Ben Horgan
2026-05-15 16:04     ` Andre Przywara
2026-05-14  9:30   ` Ben Horgan
2026-05-18  8:52   ` Niyas Sait
2026-05-21 15:54     ` Andre Przywara
2026-05-18 14:11   ` Sudeep Holla
2026-04-29 14:13 ` [PATCH 4/5] arm_mpam: prevent MPAM-Fb accesses inside IRQ handler Andre Przywara
2026-05-18 10:57   ` Niyas Sait
2026-05-21 15:59     ` Andre Przywara
2026-04-29 14:13 ` [PATCH 5/5] arm_mpam: detect and enable MPAM-Fb PCC support Andre Przywara
2026-04-30  8:35   ` Sudeep Holla
2026-04-30  9:20     ` Andre Przywara
2026-04-30 10:25       ` Sudeep Holla
2026-05-08 10:48   ` Ben Horgan
2026-05-13 14:51     ` Andre Przywara
2026-05-14  9:10       ` Ben Horgan
2026-05-18 11:14   ` Niyas Sait
2026-05-21 16:04     ` Andre Przywara [this message]

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=88ed47c1-f84f-4aac-8ec7-ffe87a2a8138@arm.com \
    --to=andre.przywara@arm.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=jic23@kernel.org \
    --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=niyas.sait@arm.com \
    --cc=rafael@kernel.org \
    --cc=reinette.chatre@intel.com \
    --cc=sudeep.holla@kernel.org \
    --cc=will@kernel.org \
    /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

all inboxes | Powered by JetHome®