Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@kernel.org>
To: arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	kernel-team@meta.com, sashiko-bot@kernel.org
Cc: Cristian Marussi <cristian.marussi@arm.com>,
	Breno Leitao <leitao@debian.org>,
	Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Subject: Re: [PATCH v5 7/9] firmware: arm_scmi: Add ACPI PCC transport
Date: Tue, 15 Sep 2026 18:44:01 +0100	[thread overview]
Message-ID: <20260915-tidy-glaring-wasp-5b8d0f@sudeepholla> (raw)
In-Reply-To: <20260915-acpi_scmi_pcc-v5-7-298579e9f359@kernel.org>

>On Tue, Sep 15, 2026 at 06:03:41PM +0100, Sudeep Holla wrote:
>> Add an SCMI transport for ACPI-described systems using PCCT PCC
>> subspaces through the Linux PCC mailbox layer.
>> 
>> Parse the SCMI Device Properties _DSD packages defined by Arm document
>> 111115A v1.0, sections 2.2.1.1, 2.2.2.1 and 2.2.3. Map transport
>> UIDs to PCC subspaces for common and protocol-exclusive A2P and P2A
>> channels, validate the mappings, and cache them for channel setup.
>> 
>> Support the Powercap and System Telemetry protocol properties and add
>> the System Telemetry protocol ID. Implement PCC channel management,
>> message framing, shared-memory bounds validation, and response and
>> notification delivery.
>> 
>> Add the corresponding Kconfig, module and ARML0001 ACPI matching
>> plumbing.
>> 
>> Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
>> ---
>>  drivers/firmware/arm_scmi/common.h            |  11 +
>>  drivers/firmware/arm_scmi/transports/Kconfig  |  12 +
>>  drivers/firmware/arm_scmi/transports/Makefile |   2 +
>>  drivers/firmware/arm_scmi/transports/pcc.c    | 867 ++++++++++++++++++++++++++
>>  include/linux/scmi_protocol.h                 |   1 +
>>  5 files changed, 893 insertions(+)
>> 
>> diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h
>> index 7fc9560dc4ea..ef5e19ecfe20 100644
>> --- a/drivers/firmware/arm_scmi/common.h
>> +++ b/drivers/firmware/arm_scmi/common.h
>> @@ -468,6 +468,17 @@ struct scmi_transport_core_operations {
>>  	const struct scmi_message_operations *msg;
>>  };
>>  
>> +struct scmi_dsd_info {
>> +	u32 protocol_id;
>> +	const char *const property_name;
>> +};
>> +
>> +static const struct scmi_dsd_info scmi_dsd_info_list[] __maybe_unused = {
>> +	{ SCMI_PROTOCOL_BASE, "arm-arml0001-transport-pcc" },
>> +	{ SCMI_PROTOCOL_POWERCAP, "arm-arml0001-protocol-pcap" },
>> +	{ SCMI_PROTOCOL_TELEMETRY, "arm-arml0001-protocol-telemetry" },
>> +};
>> +

> [Below is copied from sashiko-bot@kernel.org review comments Severity: High]
>
> Since scmi_dsd_info_list is defined as a static const array in a header file,
> won't this cause the array to be duplicated in the .rodata section of every
> translation unit that includes common.h?

> Could this array be defined in a .c file and exported via extern to prevent
> unnecessary binary bloat?

Although the header gives each translation unit its own definition, unused
instances are discarded by the compiler. The table is referenced only by
the SCMI core and PCC transport, which are separate modules. Moving it to a
C file would require exporting the table and its size between those modules.
Given that each emitted table is only 48 bytes, I prefer to avoid that
additional interface and keep the local copies.

-- 
Regards,
Sudeep


  reply	other threads:[~2026-09-15 17:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 17:03 [PATCH v5 0/9] firmware: arm_scmi: Refactoring and enablement of ACPI PCC transport Sudeep Holla
2026-09-15 17:03 ` [PATCH v5 1/9] firmware: arm_scmi: Set generated device fwnode with platform helpers Sudeep Holla
2026-09-15 17:03 ` [PATCH v5 2/9] firmware: arm_scmi: Extend transport driver macro to support ACPI Sudeep Holla
2026-09-15 17:03 ` [PATCH v5 3/9] firmware: arm_scmi: Convert OF-only paths to generic fwnode in SCMI core Sudeep Holla
2026-09-15 17:03 ` [PATCH v5 4/9] firmware: arm_scmi: Fall back to ACPI HID when "compatible" is absent Sudeep Holla
2026-09-15 17:03 ` [PATCH v5 5/9] firmware: arm_scmi: Pass protocol ID to transport chan_available() Sudeep Holla
2026-09-15 17:03 ` [PATCH v5 6/9] firmware: arm_scmi: Refactor protocol device creation logic Sudeep Holla
2026-09-15 17:03 ` [PATCH v5 7/9] firmware: arm_scmi: Add ACPI PCC transport Sudeep Holla
2026-09-15 17:44   ` Sudeep Holla [this message]
2026-09-15 17:03 ` [PATCH v5 8/9] firmware: arm_scmi: Initialise known ACPI protocol devices and channels Sudeep Holla
2026-09-15 17:03 ` [PATCH v5 9/9] firmware: arm_scmi: Validate PCC shared memory signature Sudeep Holla
2026-09-18 16:53 ` [PATCH v5 0/9] firmware: arm_scmi: Refactoring and enablement of ACPI PCC transport Sudeep Holla

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=20260915-tidy-glaring-wasp-5b8d0f@sudeepholla \
    --to=sudeep.holla@kernel.org \
    --cc=arm-scmi@vger.kernel.org \
    --cc=cristian.marussi@arm.com \
    --cc=jonathan.cameron@oss.qualcomm.com \
    --cc=kernel-team@meta.com \
    --cc=leitao@debian.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=sashiko-bot@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