diff mbox series

[2/4] acpi: Add header struct in CDAT subtables

Message ID 168330798275.2042604.11217169699695338532.stgit@djiang5-mobl3
State New
Headers show
Series acpi: Add CDAT parsing support to ACPI tables code | expand

Commit Message

Dave Jiang May 5, 2023, 5:33 p.m. UTC
Add the common header struct in all CDAT subtables. This change
complies with other ACPI sub-tables in the header file. The change
also eases the usage with the helper functions in tables.c.

Cc: Rafael J. Wysocki <rafael@kernel.org>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
 include/acpi/actbl1.h |    6 ++++++
 1 file changed, 6 insertions(+)

Comments

Jonathan Cameron May 12, 2023, noon UTC | #1
On Fri, 05 May 2023 10:33:02 -0700
Dave Jiang <dave.jiang@intel.com> wrote:

> Add the common header struct in all CDAT subtables. This change
> complies with other ACPI sub-tables in the header file. The change
> also eases the usage with the helper functions in tables.c.
> 
> Cc: Rafael J. Wysocki <rafael@kernel.org>
> Cc: Len Brown <lenb@kernel.org>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Other than the naming question from previous patch (should these have acpi
in their names at all?), this looks sensible to me.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> ---
>  include/acpi/actbl1.h |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
> index 3119be093cfe..166337b04306 100644
> --- a/include/acpi/actbl1.h
> +++ b/include/acpi/actbl1.h
> @@ -350,6 +350,7 @@ enum acpi_cdat_type {
>  /* Subtable 0: Device Scoped Memory Affinity Structure (DSMAS) */
>  
>  struct acpi_cdat_dsmas {
> +	struct acpi_cdat_header header;
>  	u8 dsmad_handle;
>  	u8 flags;
>  	u16 reserved;
> @@ -364,6 +365,7 @@ struct acpi_cdat_dsmas {
>  /* Subtable 1: Device scoped Latency and Bandwidth Information Structure (DSLBIS) */
>  
>  struct acpi_cdat_dslbis {
> +	struct acpi_cdat_header header;
>  	u8 handle;
>  	u8 flags;		/* If Handle matches a DSMAS handle, the definition of this field matches
>  				 * Flags field in HMAT System Locality Latency */
> @@ -377,6 +379,7 @@ struct acpi_cdat_dslbis {
>  /* Subtable 2: Device Scoped Memory Side Cache Information Structure (DSMSCIS) */
>  
>  struct acpi_cdat_dsmscis {
> +	struct acpi_cdat_header header;
>  	u8 dsmas_handle;
>  	u8 reserved[3];
>  	u64 side_cache_size;
> @@ -386,6 +389,7 @@ struct acpi_cdat_dsmscis {
>  /* Subtable 3: Device Scoped Initiator Structure (DSIS) */
>  
>  struct acpi_cdat_dsis {
> +	struct acpi_cdat_header header;
>  	u8 flags;
>  	u8 handle;
>  	u16 reserved;
> @@ -398,6 +402,7 @@ struct acpi_cdat_dsis {
>  /* Subtable 4: Device Scoped EFI Memory Type Structure (DSEMTS) */
>  
>  struct acpi_cdat_dsemts {
> +	struct acpi_cdat_header header;
>  	u8 dsmas_handle;
>  	u8 memory_type;
>  	u16 reserved;
> @@ -408,6 +413,7 @@ struct acpi_cdat_dsemts {
>  /* Subtable 5: Switch Scoped Latency and Bandwidth Information Structure (SSLBIS) */
>  
>  struct acpi_cdat_sslbis {
> +	struct acpi_cdat_header header;
>  	u8 data_type;
>  	u8 reserved[3];
>  	u64 entry_base_unit;
> 
> 
>
diff mbox series

Patch

diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index 3119be093cfe..166337b04306 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -350,6 +350,7 @@  enum acpi_cdat_type {
 /* Subtable 0: Device Scoped Memory Affinity Structure (DSMAS) */
 
 struct acpi_cdat_dsmas {
+	struct acpi_cdat_header header;
 	u8 dsmad_handle;
 	u8 flags;
 	u16 reserved;
@@ -364,6 +365,7 @@  struct acpi_cdat_dsmas {
 /* Subtable 1: Device scoped Latency and Bandwidth Information Structure (DSLBIS) */
 
 struct acpi_cdat_dslbis {
+	struct acpi_cdat_header header;
 	u8 handle;
 	u8 flags;		/* If Handle matches a DSMAS handle, the definition of this field matches
 				 * Flags field in HMAT System Locality Latency */
@@ -377,6 +379,7 @@  struct acpi_cdat_dslbis {
 /* Subtable 2: Device Scoped Memory Side Cache Information Structure (DSMSCIS) */
 
 struct acpi_cdat_dsmscis {
+	struct acpi_cdat_header header;
 	u8 dsmas_handle;
 	u8 reserved[3];
 	u64 side_cache_size;
@@ -386,6 +389,7 @@  struct acpi_cdat_dsmscis {
 /* Subtable 3: Device Scoped Initiator Structure (DSIS) */
 
 struct acpi_cdat_dsis {
+	struct acpi_cdat_header header;
 	u8 flags;
 	u8 handle;
 	u16 reserved;
@@ -398,6 +402,7 @@  struct acpi_cdat_dsis {
 /* Subtable 4: Device Scoped EFI Memory Type Structure (DSEMTS) */
 
 struct acpi_cdat_dsemts {
+	struct acpi_cdat_header header;
 	u8 dsmas_handle;
 	u8 memory_type;
 	u16 reserved;
@@ -408,6 +413,7 @@  struct acpi_cdat_dsemts {
 /* Subtable 5: Switch Scoped Latency and Bandwidth Information Structure (SSLBIS) */
 
 struct acpi_cdat_sslbis {
+	struct acpi_cdat_header header;
 	u8 data_type;
 	u8 reserved[3];
 	u64 entry_base_unit;