From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D36683B05BD; Wed, 29 Jul 2026 15:17:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785338254; cv=none; b=XCufGwe+VtzcyYgKXoM7Jl6QREhPjzPQhz6XivsJwz+744Zw7H1PvAURPIlAn66NdXuSFqIzNPrYyk9ybgaw7sa2eZLzMpYshfpzs2LiRRsavwtndR49k94S21Rs0nnE7sSJO0SZ/8S1gZLoAST31pNcN43f1ebf82eqTNKFgXs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785338254; c=relaxed/simple; bh=yxG2rPBIIwl247qKcaaMERIvGw6yJjMqKv6TJ9vu+Hw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=lObslG66oRBfy7KPdFhsS//vWtB5Z8Yv7jyHVtqP2x3WqXdWyxzq2wGQGOtQWhdDOCdfbJdhFyvvOQYUrhfdqDGp8CpOyrh23pjiAV+tfUd4Oq2O52Tmk0p4ErA5Habpj8hCv3R23OoEqPDypNHT5bWbHVI7GJwSDvWQ8TmGTuk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=ax5MADys; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="ax5MADys" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 07D1A1688; Wed, 29 Jul 2026 08:17:28 -0700 (PDT) Received: from [192.168.178.24] (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 73A4A3F763; Wed, 29 Jul 2026 08:17:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1785338252; bh=yxG2rPBIIwl247qKcaaMERIvGw6yJjMqKv6TJ9vu+Hw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ax5MADysoC/XxHv4h3VmFwFgWS3XYIyXGU7QVxjLPdu8sDanQ3XF5LaFknF1/YptF cP0EbCYt3MaeZYZKe62IeCpHab9sQBnFhanqVkI3k8eXdFCKhN5OjsCSRSMWu2/VWB +Tg9dTfl957zi0ZDyyV3bjMjvfwl2tUSHqfkacL8= Message-ID: <6266693e-61d1-41df-bbee-c761ecb47353@arm.com> Date: Wed, 29 Jul 2026 17:17:23 +0200 Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 08/10] arm_mpam: add MPAM-Fb MSC firmware access support To: Ben Horgan , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Catalin Marinas , Will Deacon , "Rafael J . Wysocki" , Len Brown , James Morse , Reinette Chatre , Fenghua Yu Cc: Jonathan Cameron , Srivathsa L Rao , Ganapatrao Kulkarni , Trilok Soni , Srinivas Ramana , Niyas Sait , Lee Trager , linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260729134124.2506269-1-andre.przywara@arm.com> <20260729134124.2506269-9-andre.przywara@arm.com> <1da9895e-eaf8-45f0-bac8-c4304a3b4f6a@arm.com> Content-Language: en-GB From: Andre Przywara In-Reply-To: <1da9895e-eaf8-45f0-bac8-c4304a3b4f6a@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Ben, thanks for having a look! On 7/29/26 16:51, Ben Horgan wrote: > Hi Andre, > > On 7/29/26 14:41, Andre Przywara wrote: >> The Arm MPAM Firmware-backed (Fb) Profile document[1] describes an >> alternative way of accessing the "Memory System Components" (MSC) in an >> MPAM enabled system. >> >> Normally the MSCs are MMIO mapped, but in some implementations this >> might not be possible (MSC located outside of the local socket, MSC >> mapped secure-only) or desirable (direct MMIO access too slow or needs >> to be mediated through a control processor). MPAM-fb standardises a >> protocol to abstract MSC accesses, building on the SCMI protocol. >> >> Add functions that do an MSC read or write access by redirecting the >> request through a firmware interface. For now this done via an ACPI >> PCC shared memory and mailbox combination. >> >> Since the protocol used is only a small subset of the full SCMI spec, >> and the SCMI protocol has no full ACPI support anyway, open-code the >> (simple) SCMI message generation, for just the fields we need. >> >> [1] https://developer.arm.com/documentation/den0144/latest >> >> Signed-off-by: Andre Przywara > > [...] > >> diff --git a/drivers/resctrl/mpam_internal.h b/drivers/resctrl/mpam_internal.h >> index 2b81b6b0bf4e..a2193e7df57c 100644 >> --- a/drivers/resctrl/mpam_internal.h >> +++ b/drivers/resctrl/mpam_internal.h >> @@ -11,6 +11,7 @@ >> #include >> #include >> #include >> +#include >> #include >> #include >> #include >> @@ -57,6 +58,15 @@ struct mpam_garbage { >> struct platform_device *pdev; >> }; >> >> +struct mpam_pcc_chan { >> + struct list_head pcc_chans; >> + struct mbox_client pcc_cl; >> + struct pcc_mbox_chan *pcc_chan; >> + struct mutex pcc_chan_lock; /* only one message at a time */ >> + struct kref refcount; >> + int subspace_id; >> +}; >> + >> struct mpam_msc { >> /* member of mpam_all_msc */ >> struct list_head all_msc_list; >> @@ -66,6 +76,8 @@ struct mpam_msc { >> >> /* Not modified after mpam_is_enabled() becomes true */ >> enum mpam_msc_iface iface; >> + struct mpam_pcc_chan *pcc_chan; >> + int mpam_fb_msc_id; /* in its own name space */ > > This gets removed in patch 10 now. I guess you just edited the wrong patch. Argh, you are right, I squashed the fix into 10/10, but indeed the member is already introduced here. Good catch! Cheers, Andre