linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] acpi/hmat: Update acpi_hmat_type enum with ACPI_HMAT_TYPE_PROXIMITY
@ 2019-04-17 18:13 Alison Schofield
  2019-04-18 14:52 ` Rafael J. Wysocki
  2019-04-18 14:56 ` Keith Busch
  0 siblings, 2 replies; 6+ messages in thread
From: Alison Schofield @ 2019-04-17 18:13 UTC (permalink / raw)
  To: rjw
  Cc: Alison Schofield, robert.moore, erik.schmauss, keith.busch,
	linux-acpi, linux-kernel

ACPI 6.3 changed the subtable "Memory Subsystem Address Range Structure"
to "Memory Proximity Domain Attributes Structure".

Updating and renaming of the structure was included in commit:
ACPICA: ACPI 6.3: HMAT updates (9a8d961f1ef835b0d338fbe13da03cb424e87ae5)

Rename the enum type to match the subtable and structure naming.

Signed-off-by: Alison Schofield <alison.schofield@intel.com>
---
 drivers/acpi/hmat/hmat.c | 4 ++--
 include/acpi/actbl1.h    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/hmat/hmat.c b/drivers/acpi/hmat/hmat.c
index b7824a0309f7..3e32120e2dab 100644
--- a/drivers/acpi/hmat/hmat.c
+++ b/drivers/acpi/hmat/hmat.c
@@ -411,7 +411,7 @@ static int __init hmat_parse_subtable(union acpi_subtable_headers *header,
 		return -EINVAL;
 
 	switch (hdr->type) {
-	case ACPI_HMAT_TYPE_ADDRESS_RANGE:
+	case ACPI_HMAT_TYPE_PROXIMITY:
 		return hmat_parse_proximity_domain(header, end);
 	case ACPI_HMAT_TYPE_LOCALITY:
 		return hmat_parse_locality(header, end);
@@ -649,7 +649,7 @@ static __init int hmat_init(void)
 		goto out_put;
 	}
 
-	for (i = ACPI_HMAT_TYPE_ADDRESS_RANGE; i < ACPI_HMAT_TYPE_RESERVED; i++) {
+	for (i = ACPI_HMAT_TYPE_PROXIMITY; i < ACPI_HMAT_TYPE_RESERVED; i++) {
 		if (acpi_table_parse_entries(ACPI_SIG_HMAT,
 					     sizeof(struct acpi_table_hmat), i,
 					     hmat_parse_subtable, 0) < 0) {
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index d14037ddf108..22c039ebc6c5 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -1395,7 +1395,7 @@ struct acpi_table_hmat {
 /* Values for HMAT structure types */
 
 enum acpi_hmat_type {
-	ACPI_HMAT_TYPE_ADDRESS_RANGE = 0,	/* Memory subsystem address range */
+	ACPI_HMAT_TYPE_PROXIMITY = 0,	/* Memory proximity domain attributes */
 	ACPI_HMAT_TYPE_LOCALITY = 1,	/* System locality latency and bandwidth information */
 	ACPI_HMAT_TYPE_CACHE = 2,	/* Memory side cache information */
 	ACPI_HMAT_TYPE_RESERVED = 3	/* 3 and greater are reserved */
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] acpi/hmat: Update acpi_hmat_type enum with ACPI_HMAT_TYPE_PROXIMITY
  2019-04-17 18:13 [PATCH] acpi/hmat: Update acpi_hmat_type enum with ACPI_HMAT_TYPE_PROXIMITY Alison Schofield
@ 2019-04-18 14:52 ` Rafael J. Wysocki
  2019-04-18 14:56 ` Keith Busch
  1 sibling, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2019-04-18 14:52 UTC (permalink / raw)
  To: Alison Schofield
  Cc: Rafael J. Wysocki, Robert Moore, Schmauss, Erik, Keith Busch,
	ACPI Devel Maling List, Linux Kernel Mailing List,
	Greg Kroah-Hartman

On Wed, Apr 17, 2019 at 8:10 PM Alison Schofield
<alison.schofield@intel.com> wrote:
>
> ACPI 6.3 changed the subtable "Memory Subsystem Address Range Structure"
> to "Memory Proximity Domain Attributes Structure".
>
> Updating and renaming of the structure was included in commit:
> ACPICA: ACPI 6.3: HMAT updates (9a8d961f1ef835b0d338fbe13da03cb424e87ae5)
>
> Rename the enum type to match the subtable and structure naming.
>
> Signed-off-by: Alison Schofield <alison.schofield@intel.com>

Since the original HMAT material is there in the Greg's tree, this one
would need to go into his tree too, so

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

> ---
>  drivers/acpi/hmat/hmat.c | 4 ++--
>  include/acpi/actbl1.h    | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/acpi/hmat/hmat.c b/drivers/acpi/hmat/hmat.c
> index b7824a0309f7..3e32120e2dab 100644
> --- a/drivers/acpi/hmat/hmat.c
> +++ b/drivers/acpi/hmat/hmat.c
> @@ -411,7 +411,7 @@ static int __init hmat_parse_subtable(union acpi_subtable_headers *header,
>                 return -EINVAL;
>
>         switch (hdr->type) {
> -       case ACPI_HMAT_TYPE_ADDRESS_RANGE:
> +       case ACPI_HMAT_TYPE_PROXIMITY:
>                 return hmat_parse_proximity_domain(header, end);
>         case ACPI_HMAT_TYPE_LOCALITY:
>                 return hmat_parse_locality(header, end);
> @@ -649,7 +649,7 @@ static __init int hmat_init(void)
>                 goto out_put;
>         }
>
> -       for (i = ACPI_HMAT_TYPE_ADDRESS_RANGE; i < ACPI_HMAT_TYPE_RESERVED; i++) {
> +       for (i = ACPI_HMAT_TYPE_PROXIMITY; i < ACPI_HMAT_TYPE_RESERVED; i++) {
>                 if (acpi_table_parse_entries(ACPI_SIG_HMAT,
>                                              sizeof(struct acpi_table_hmat), i,
>                                              hmat_parse_subtable, 0) < 0) {
> diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
> index d14037ddf108..22c039ebc6c5 100644
> --- a/include/acpi/actbl1.h
> +++ b/include/acpi/actbl1.h
> @@ -1395,7 +1395,7 @@ struct acpi_table_hmat {
>  /* Values for HMAT structure types */
>
>  enum acpi_hmat_type {
> -       ACPI_HMAT_TYPE_ADDRESS_RANGE = 0,       /* Memory subsystem address range */
> +       ACPI_HMAT_TYPE_PROXIMITY = 0,   /* Memory proximity domain attributes */
>         ACPI_HMAT_TYPE_LOCALITY = 1,    /* System locality latency and bandwidth information */
>         ACPI_HMAT_TYPE_CACHE = 2,       /* Memory side cache information */
>         ACPI_HMAT_TYPE_RESERVED = 3     /* 3 and greater are reserved */
> --
> 2.14.1
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] acpi/hmat: Update acpi_hmat_type enum with ACPI_HMAT_TYPE_PROXIMITY
  2019-04-17 18:13 [PATCH] acpi/hmat: Update acpi_hmat_type enum with ACPI_HMAT_TYPE_PROXIMITY Alison Schofield
  2019-04-18 14:52 ` Rafael J. Wysocki
@ 2019-04-18 14:56 ` Keith Busch
  2019-04-18 15:07   ` Rafael J. Wysocki
  1 sibling, 1 reply; 6+ messages in thread
From: Keith Busch @ 2019-04-18 14:56 UTC (permalink / raw)
  To: Alison Schofield
  Cc: rjw, robert.moore, erik.schmauss, linux-acpi, linux-kernel

On Wed, Apr 17, 2019 at 11:13:10AM -0700, Alison Schofield wrote:
> ACPI 6.3 changed the subtable "Memory Subsystem Address Range Structure"
> to "Memory Proximity Domain Attributes Structure".
> 
> Updating and renaming of the structure was included in commit:
> ACPICA: ACPI 6.3: HMAT updates (9a8d961f1ef835b0d338fbe13da03cb424e87ae5)

I was not really happy with that HMAT update. Platforms implementing
6.2's HMAT continue to exist even if 6.3 isn't backward compatible. We
just lost the original subtable definition.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] acpi/hmat: Update acpi_hmat_type enum with ACPI_HMAT_TYPE_PROXIMITY
  2019-04-18 14:56 ` Keith Busch
@ 2019-04-18 15:07   ` Rafael J. Wysocki
  2019-04-19 16:54     ` Alison Schofield
  0 siblings, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2019-04-18 15:07 UTC (permalink / raw)
  To: Keith Busch
  Cc: Alison Schofield, Rafael J. Wysocki, Robert Moore, Schmauss,
	Erik, ACPI Devel Maling List, Linux Kernel Mailing List

On Thu, Apr 18, 2019 at 5:02 PM Keith Busch <keith.busch@intel.com> wrote:
>
> On Wed, Apr 17, 2019 at 11:13:10AM -0700, Alison Schofield wrote:
> > ACPI 6.3 changed the subtable "Memory Subsystem Address Range Structure"
> > to "Memory Proximity Domain Attributes Structure".
> >
> > Updating and renaming of the structure was included in commit:
> > ACPICA: ACPI 6.3: HMAT updates (9a8d961f1ef835b0d338fbe13da03cb424e87ae5)
>
> I was not really happy with that HMAT update. Platforms implementing
> 6.2's HMAT continue to exist even if 6.3 isn't backward compatible. We
> just lost the original subtable definition.

Well, that's true, sadly, but the question is what to do in the kernel.

Definitely, the 6.3 format needs to be supported, but if the 6.2 ships
anywhere in practice, that will need to be supported too.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] acpi/hmat: Update acpi_hmat_type enum with ACPI_HMAT_TYPE_PROXIMITY
  2019-04-18 15:07   ` Rafael J. Wysocki
@ 2019-04-19 16:54     ` Alison Schofield
  2019-04-19 17:09       ` Keith Busch
  0 siblings, 1 reply; 6+ messages in thread
From: Alison Schofield @ 2019-04-19 16:54 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Keith Busch, Rafael J. Wysocki, Robert Moore, Schmauss, Erik,
	ACPI Devel Maling List, Linux Kernel Mailing List

On Thu, Apr 18, 2019 at 05:07:12PM +0200, Rafael J. Wysocki wrote:
> On Thu, Apr 18, 2019 at 5:02 PM Keith Busch <keith.busch@intel.com> wrote:
> >
> > On Wed, Apr 17, 2019 at 11:13:10AM -0700, Alison Schofield wrote:
> > > ACPI 6.3 changed the subtable "Memory Subsystem Address Range Structure"
> > > to "Memory Proximity Domain Attributes Structure".
> > >
> > > Updating and renaming of the structure was included in commit:
> > > ACPICA: ACPI 6.3: HMAT updates (9a8d961f1ef835b0d338fbe13da03cb424e87ae5)
> >
> > I was not really happy with that HMAT update. Platforms implementing
> > 6.2's HMAT continue to exist even if 6.3 isn't backward compatible. We
> > just lost the original subtable definition.
> 
> Well, that's true, sadly, but the question is what to do in the kernel.
> 
> Definitely, the 6.3 format needs to be supported, but if the 6.2 ships
> anywhere in practice, that will need to be supported too.

So, what's the usual practice when ACPI tables are updated?
Do we define separate 6.2 and 6.3 versions of this subtable and let
the kernel figure out which one its looking at?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] acpi/hmat: Update acpi_hmat_type enum with ACPI_HMAT_TYPE_PROXIMITY
  2019-04-19 16:54     ` Alison Schofield
@ 2019-04-19 17:09       ` Keith Busch
  0 siblings, 0 replies; 6+ messages in thread
From: Keith Busch @ 2019-04-19 17:09 UTC (permalink / raw)
  To: Alison Schofield
  Cc: Rafael J. Wysocki, Rafael J. Wysocki, Robert Moore, Schmauss,
	Erik, ACPI Devel Maling List, Linux Kernel Mailing List

On Fri, Apr 19, 2019 at 09:54:35AM -0700, Alison Schofield wrote:
> On Thu, Apr 18, 2019 at 05:07:12PM +0200, Rafael J. Wysocki wrote:
> > On Thu, Apr 18, 2019 at 5:02 PM Keith Busch <keith.busch@intel.com> wrote:
> > >
> > > On Wed, Apr 17, 2019 at 11:13:10AM -0700, Alison Schofield wrote:
> > > > ACPI 6.3 changed the subtable "Memory Subsystem Address Range Structure"
> > > > to "Memory Proximity Domain Attributes Structure".
> > > >
> > > > Updating and renaming of the structure was included in commit:
> > > > ACPICA: ACPI 6.3: HMAT updates (9a8d961f1ef835b0d338fbe13da03cb424e87ae5)
> > >
> > > I was not really happy with that HMAT update. Platforms implementing
> > > 6.2's HMAT continue to exist even if 6.3 isn't backward compatible. We
> > > just lost the original subtable definition.
> > 
> > Well, that's true, sadly, but the question is what to do in the kernel.
> > 
> > Definitely, the 6.3 format needs to be supported, but if the 6.2 ships
> > anywhere in practice, that will need to be supported too.
> 
> So, what's the usual practice when ACPI tables are updated?
> Do we define separate 6.2 and 6.3 versions of this subtable and let
> the kernel figure out which one its looking at?

Yeah, I think either new struct definitions for incompatible versions,
or unions for conflicting members would be good.

But I think Rafael is saying we only care if someone's shipping platform
implements a particular version. I don't happen to know which ACPI
version platforms I'm interested are going to release with, so I have
HMAT supporting either right now. The 6.3 update wasn't difficult to
handle this time.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-04-19 18:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-17 18:13 [PATCH] acpi/hmat: Update acpi_hmat_type enum with ACPI_HMAT_TYPE_PROXIMITY Alison Schofield
2019-04-18 14:52 ` Rafael J. Wysocki
2019-04-18 14:56 ` Keith Busch
2019-04-18 15:07   ` Rafael J. Wysocki
2019-04-19 16:54     ` Alison Schofield
2019-04-19 17:09       ` Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).