linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI/PPTT: Simplify leaf node detection.
@ 2019-03-01 18:52 Jeremy Linton
  2019-03-04 10:02 ` Sudeep Holla
  0 siblings, 1 reply; 3+ messages in thread
From: Jeremy Linton @ 2019-03-01 18:52 UTC (permalink / raw)
  To: linux-acpi
  Cc: rjw, lenb, sudeep.holla, Lorenzo.Pieralisi, linux-arm-kernel,
	linux-kernel, Jeremy Linton

ACPI 6.3 bumps the PPTT table revision and adds a LEAF_NODE flag.
This allows us to avoid a second pass through the table to assure
that the node in question is a leaf.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
---
 drivers/acpi/pptt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c
index ad31c50de3be..065c4fc245d1 100644
--- a/drivers/acpi/pptt.c
+++ b/drivers/acpi/pptt.c
@@ -209,6 +209,9 @@ static int acpi_pptt_leaf_node(struct acpi_table_header *table_hdr,
 	struct acpi_pptt_processor *cpu_node;
 	u32 proc_sz;
 
+	if (table_hdr->revision > 1)
+		return (node->flags & ACPI_PPTT_ACPI_LEAF_NODE);
+
 	table_end = (unsigned long)table_hdr + table_hdr->length;
 	node_entry = ACPI_PTR_DIFF(node, table_hdr);
 	entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,
-- 
2.20.1


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

* Re: [PATCH] ACPI/PPTT: Simplify leaf node detection.
  2019-03-01 18:52 [PATCH] ACPI/PPTT: Simplify leaf node detection Jeremy Linton
@ 2019-03-04 10:02 ` Sudeep Holla
  2019-03-12  9:31   ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Sudeep Holla @ 2019-03-04 10:02 UTC (permalink / raw)
  To: Jeremy Linton
  Cc: linux-acpi, rjw, lenb, Lorenzo.Pieralisi, linux-arm-kernel,
	linux-kernel, Sudeep Holla

On Fri, Mar 01, 2019 at 12:52:21PM -0600, Jeremy Linton wrote:
> ACPI 6.3 bumps the PPTT table revision and adds a LEAF_NODE flag.
> This allows us to avoid a second pass through the table to assure
> that the node in question is a leaf.
>

Reviewed-by:Sudeep Holla <sudeep.holla@arm.com>

--
Regards,
Sudeep

> Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
> ---
>  drivers/acpi/pptt.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c
> index ad31c50de3be..065c4fc245d1 100644
> --- a/drivers/acpi/pptt.c
> +++ b/drivers/acpi/pptt.c
> @@ -209,6 +209,9 @@ static int acpi_pptt_leaf_node(struct acpi_table_header *table_hdr,
>  	struct acpi_pptt_processor *cpu_node;
>  	u32 proc_sz;
>
> +	if (table_hdr->revision > 1)
> +		return (node->flags & ACPI_PPTT_ACPI_LEAF_NODE);
> +
>  	table_end = (unsigned long)table_hdr + table_hdr->length;
>  	node_entry = ACPI_PTR_DIFF(node, table_hdr);
>  	entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,
> --
> 2.20.1
>


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

* Re: [PATCH] ACPI/PPTT: Simplify leaf node detection.
  2019-03-04 10:02 ` Sudeep Holla
@ 2019-03-12  9:31   ` Rafael J. Wysocki
  0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2019-03-12  9:31 UTC (permalink / raw)
  To: Sudeep Holla, Jeremy Linton
  Cc: linux-acpi, lenb, Lorenzo.Pieralisi, linux-arm-kernel, linux-kernel

On Monday, March 4, 2019 11:02:08 AM CET Sudeep Holla wrote:
> On Fri, Mar 01, 2019 at 12:52:21PM -0600, Jeremy Linton wrote:
> > ACPI 6.3 bumps the PPTT table revision and adds a LEAF_NODE flag.
> > This allows us to avoid a second pass through the table to assure
> > that the node in question is a leaf.
> >
> 
> Reviewed-by:Sudeep Holla <sudeep.holla@arm.com>
> 
> --
> Regards,
> Sudeep
> 
> > Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
> > ---
> >  drivers/acpi/pptt.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c
> > index ad31c50de3be..065c4fc245d1 100644
> > --- a/drivers/acpi/pptt.c
> > +++ b/drivers/acpi/pptt.c
> > @@ -209,6 +209,9 @@ static int acpi_pptt_leaf_node(struct acpi_table_header *table_hdr,
> >  	struct acpi_pptt_processor *cpu_node;
> >  	u32 proc_sz;
> >
> > +	if (table_hdr->revision > 1)
> > +		return (node->flags & ACPI_PPTT_ACPI_LEAF_NODE);
> > +
> >  	table_end = (unsigned long)table_hdr + table_hdr->length;
> >  	node_entry = ACPI_PTR_DIFF(node, table_hdr);
> >  	entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,
> > --

Patch applied, thanks!


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

end of thread, other threads:[~2019-03-12  9:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-01 18:52 [PATCH] ACPI/PPTT: Simplify leaf node detection Jeremy Linton
2019-03-04 10:02 ` Sudeep Holla
2019-03-12  9:31   ` Rafael J. Wysocki

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).