[PATCH v5 7/9] firmware: arm_scmi: Add ACPI PCC transport
Sudeep Holla
sudeep.holla at kernel.org
Tue Sep 15 10:44:01 PDT 2026
>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 at 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 at 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
More information about the linux-arm-kernel
mailing list