linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI: PPTT: Inform user that table offset used for Physical processor node ID
@ 2020-04-02 12:22 John Garry
  2020-04-02 13:08 ` Sudeep Holla
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: John Garry @ 2020-04-02 12:22 UTC (permalink / raw)
  To: rjw, lenb
  Cc: linux-acpi, linux-kernel, sudeep.holla, jeremy.linton, linuxarm,
	wanghuiqiang, John Garry

If the the Processor ID valid is not set for a Physical Processor Package
node, then the node table offset is used as a substitute. As such, we
may get info like this from sysfs:

root@(none)$ pwd
/sys/devices/system/cpu/cpu0/topology
root@(none)$ more physical_package_id
56

Inform the user of this in the bootlog, as it is much less than ideal, and
they can remedy this in their FW.

This topic was originally discussed in:
https://lore.kernel.org/linux-acpi/c325cfe2-7dbf-e341-7f0f-081b6545e890@huawei.com/T/#m0ec18637d8586f832084a8a6af22580e6174669a

Signed-off-by: John Garry <john.garry@huawei.com>

diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c
index 4ae93350b70d..b4ed3c818e00 100644
--- a/drivers/acpi/pptt.c
+++ b/drivers/acpi/pptt.c
@@ -515,6 +515,8 @@ static int topology_get_acpi_cpu_tag(struct acpi_table_header *table,
 		if (level == 0 ||
 		    cpu_node->flags & ACPI_PPTT_ACPI_PROCESSOR_ID_VALID)
 			return cpu_node->acpi_processor_id;
+		if (level == PPTT_ABORT_PACKAGE)
+			pr_notice_once("Physical package node Processor ID valid not set, will use table offset as substitute\n");
 		return ACPI_PTR_DIFF(cpu_node, table);
 	}
 	pr_warn_once("PPTT table found, but unable to locate core %d (%d)\n",
-- 
2.16.4


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

* Re: [PATCH] ACPI: PPTT: Inform user that table offset used for Physical processor node ID
  2020-04-02 12:22 [PATCH] ACPI: PPTT: Inform user that table offset used for Physical processor node ID John Garry
@ 2020-04-02 13:08 ` Sudeep Holla
  2020-04-02 13:17   ` John Garry
  2020-04-02 13:24 ` Hanjun Guo
  2020-04-02 13:55 ` Jeremy Linton
  2 siblings, 1 reply; 8+ messages in thread
From: Sudeep Holla @ 2020-04-02 13:08 UTC (permalink / raw)
  To: John Garry
  Cc: rjw, lenb, linux-acpi, linux-kernel, jeremy.linton, linuxarm,
	wanghuiqiang, Sudeep Holla

(I see 2 copies of this patch, replying on the latest)

On Thu, Apr 02, 2020 at 08:22:25PM +0800, John Garry wrote:
> If the the Processor ID valid is not set for a Physical Processor Package
> node, then the node table offset is used as a substitute. As such, we
> may get info like this from sysfs:
>
> root@(none)$ pwd
> /sys/devices/system/cpu/cpu0/topology
> root@(none)$ more physical_package_id
> 56
>
> Inform the user of this in the bootlog, as it is much less than ideal, and
> they can remedy this in their FW.
>
> This topic was originally discussed in:
> https://lore.kernel.org/linux-acpi/c325cfe2-7dbf-e341-7f0f-081b6545e890@huawei.com/T/#m0ec18637d8586f832084a8a6af22580e6174669a
>

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

--
Regards,
Sudeep

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

* Re: [PATCH] ACPI: PPTT: Inform user that table offset used for Physical processor node ID
  2020-04-02 13:08 ` Sudeep Holla
@ 2020-04-02 13:17   ` John Garry
  0 siblings, 0 replies; 8+ messages in thread
From: John Garry @ 2020-04-02 13:17 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: rjw, lenb, linux-acpi, linux-kernel, jeremy.linton, linuxarm,
	wanghuiqiang

On 02/04/2020 14:08, Sudeep Holla wrote:
> (I see 2 copies of this patch, replying on the latest)

I sent 2x copies accidentally. WFH....

> 
> On Thu, Apr 02, 2020 at 08:22:25PM +0800, John Garry wrote:
>> If the the Processor ID valid is not set for a Physical Processor Package
>> node, then the node table offset is used as a substitute. As such, we
>> may get info like this from sysfs:
>>
>> root@(none)$ pwd
>> /sys/devices/system/cpu/cpu0/topology
>> root@(none)$ more physical_package_id
>> 56
>>
>> Inform the user of this in the bootlog, as it is much less than ideal, and
>> they can remedy this in their FW.
>>
>> This topic was originally discussed in:
>> https://lore.kernel.org/linux-acpi/c325cfe2-7dbf-e341-7f0f-081b6545e890@huawei.com/T/#m0ec18637d8586f832084a8a6af22580e6174669a
>>
> 
> Acked-by: Sudeep Holla <sudeep.holla@arm.com>

thanks

> 
> --
> Regards,
> Sudeep
> .
> 


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

* Re: [PATCH] ACPI: PPTT: Inform user that table offset used for Physical processor node ID
  2020-04-02 12:22 [PATCH] ACPI: PPTT: Inform user that table offset used for Physical processor node ID John Garry
  2020-04-02 13:08 ` Sudeep Holla
@ 2020-04-02 13:24 ` Hanjun Guo
  2020-04-02 13:55 ` Jeremy Linton
  2 siblings, 0 replies; 8+ messages in thread
From: Hanjun Guo @ 2020-04-02 13:24 UTC (permalink / raw)
  To: John Garry, rjw, lenb
  Cc: linux-acpi, linux-kernel, sudeep.holla, jeremy.linton, linuxarm,
	wanghuiqiang

On 2020/4/2 20:22, John Garry wrote:
> If the the Processor ID valid is not set for a Physical Processor Package
> node, then the node table offset is used as a substitute. As such, we
> may get info like this from sysfs:
> 
> root@(none)$ pwd
> /sys/devices/system/cpu/cpu0/topology
> root@(none)$ more physical_package_id
> 56
> 
> Inform the user of this in the bootlog, as it is much less than ideal, and
> they can remedy this in their FW.
> 
> This topic was originally discussed in:
> https://lore.kernel.org/linux-acpi/c325cfe2-7dbf-e341-7f0f-081b6545e890@huawei.com/T/#m0ec18637d8586f832084a8a6af22580e6174669a
> 
> Signed-off-by: John Garry <john.garry@huawei.com>
> 
> diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c
> index 4ae93350b70d..b4ed3c818e00 100644
> --- a/drivers/acpi/pptt.c
> +++ b/drivers/acpi/pptt.c
> @@ -515,6 +515,8 @@ static int topology_get_acpi_cpu_tag(struct acpi_table_header *table,
>  		if (level == 0 ||
>  		    cpu_node->flags & ACPI_PPTT_ACPI_PROCESSOR_ID_VALID)
>  			return cpu_node->acpi_processor_id;
> +		if (level == PPTT_ABORT_PACKAGE)
> +			pr_notice_once("Physical package node Processor ID valid not set, will use table offset as substitute\n");
>  		return ACPI_PTR_DIFF(cpu_node, table);
>  	}
>  	pr_warn_once("PPTT table found, but unable to locate core %d (%d)\n",

Looks good to me,

Reviewed-by: Hanjun Guo <guohanjun@huawei.com>


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

* Re: [PATCH] ACPI: PPTT: Inform user that table offset used for Physical processor node ID
  2020-04-02 12:22 [PATCH] ACPI: PPTT: Inform user that table offset used for Physical processor node ID John Garry
  2020-04-02 13:08 ` Sudeep Holla
  2020-04-02 13:24 ` Hanjun Guo
@ 2020-04-02 13:55 ` Jeremy Linton
  2020-04-02 14:51   ` John Garry
  2 siblings, 1 reply; 8+ messages in thread
From: Jeremy Linton @ 2020-04-02 13:55 UTC (permalink / raw)
  To: John Garry, rjw, lenb
  Cc: linux-acpi, linux-kernel, sudeep.holla, linuxarm, wanghuiqiang

Hi,

On 4/2/20 7:22 AM, John Garry wrote:
> If the the Processor ID valid is not set for a Physical Processor Package
> node, then the node table offset is used as a substitute. As such, we
> may get info like this from sysfs:
> 
> root@(none)$ pwd
> /sys/devices/system/cpu/cpu0/topology
> root@(none)$ more physical_package_id
> 56
> 
> Inform the user of this in the bootlog, as it is much less than ideal, and
> they can remedy this in their FW.
> 
> This topic was originally discussed in:
> https://lore.kernel.org/linux-acpi/c325cfe2-7dbf-e341-7f0f-081b6545e890@huawei.com/T/#m0ec18637d8586f832084a8a6af22580e6174669a
> 
> Signed-off-by: John Garry <john.garry@huawei.com>
> 
> diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c
> index 4ae93350b70d..b4ed3c818e00 100644
> --- a/drivers/acpi/pptt.c
> +++ b/drivers/acpi/pptt.c
> @@ -515,6 +515,8 @@ static int topology_get_acpi_cpu_tag(struct acpi_table_header *table,
>   		if (level == 0 ||
>   		    cpu_node->flags & ACPI_PPTT_ACPI_PROCESSOR_ID_VALID)
>   			return cpu_node->acpi_processor_id;
> +		if (level == PPTT_ABORT_PACKAGE)
> +			pr_notice_once("Physical package node Processor ID valid not set, will use table offset as substitute\n");

What happens in the find_acpi_cpu_topology_hetro_id() case, if the last 
IDENTICAL node isn't a socket/etc. Are we expecting to warn of a missing 
processor container there as well?



>   		return ACPI_PTR_DIFF(cpu_node, table);
>   	}
>   	pr_warn_once("PPTT table found, but unable to locate core %d (%d)\n",
> 


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

* Re: [PATCH] ACPI: PPTT: Inform user that table offset used for Physical processor node ID
  2020-04-02 13:55 ` Jeremy Linton
@ 2020-04-02 14:51   ` John Garry
  2020-04-02 14:54     ` Jeremy Linton
  0 siblings, 1 reply; 8+ messages in thread
From: John Garry @ 2020-04-02 14:51 UTC (permalink / raw)
  To: Jeremy Linton, rjw, lenb
  Cc: linux-acpi, linux-kernel, sudeep.holla, linuxarm, wanghuiqiang

On 02/04/2020 14:55, Jeremy Linton wrote:
> Hi,
> 
> On 4/2/20 7:22 AM, John Garry wrote:
>> If the the Processor ID valid is not set for a Physical Processor Package
>> node, then the node table offset is used as a substitute. As such, we
>> may get info like this from sysfs:
>>
>> root@(none)$ pwd
>> /sys/devices/system/cpu/cpu0/topology
>> root@(none)$ more physical_package_id
>> 56
>>
>> Inform the user of this in the bootlog, as it is much less than ideal, 
>> and
>> they can remedy this in their FW.
>>
>> This topic was originally discussed in:
>> https://lore.kernel.org/linux-acpi/c325cfe2-7dbf-e341-7f0f-081b6545e890@huawei.com/T/#m0ec18637d8586f832084a8a6af22580e6174669a 
>>
>>
>> Signed-off-by: John Garry <john.garry@huawei.com>
>>
>> diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c
>> index 4ae93350b70d..b4ed3c818e00 100644
>> --- a/drivers/acpi/pptt.c
>> +++ b/drivers/acpi/pptt.c
>> @@ -515,6 +515,8 @@ static int topology_get_acpi_cpu_tag(struct 
>> acpi_table_header *table,
>>           if (level == 0 ||
>>               cpu_node->flags & ACPI_PPTT_ACPI_PROCESSOR_ID_VALID)
>>               return cpu_node->acpi_processor_id;
>> +        if (level == PPTT_ABORT_PACKAGE)
>> +            pr_notice_once("Physical package node Processor ID valid 
>> not set, will use table offset as substitute\n");

Hi Jeremy,

> 
> What happens in the find_acpi_cpu_topology_hetro_id() case, if the last 
> IDENTICAL node isn't a socket/etc. Are we expecting to warn of a missing 
> processor container there as well?

ok, I could just use this then:

if (flags & ACPI_PPTT_PHYSCIAL_PACKAGE)
	pr_notice_once("Physical package node Processor ID ...")

As I recall, this tag for hetro id is not exposed to userspace (yet).

Thanks,
John

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

* Re: [PATCH] ACPI: PPTT: Inform user that table offset used for Physical processor node ID
  2020-04-02 14:51   ` John Garry
@ 2020-04-02 14:54     ` Jeremy Linton
  0 siblings, 0 replies; 8+ messages in thread
From: Jeremy Linton @ 2020-04-02 14:54 UTC (permalink / raw)
  To: John Garry, rjw, lenb
  Cc: linux-acpi, linux-kernel, sudeep.holla, linuxarm, wanghuiqiang

Hi,

On 4/2/20 9:51 AM, John Garry wrote:
> On 02/04/2020 14:55, Jeremy Linton wrote:
>> Hi,
>>
>> On 4/2/20 7:22 AM, John Garry wrote:
>>> If the the Processor ID valid is not set for a Physical Processor 
>>> Package
>>> node, then the node table offset is used as a substitute. As such, we
>>> may get info like this from sysfs:
>>>
>>> root@(none)$ pwd
>>> /sys/devices/system/cpu/cpu0/topology
>>> root@(none)$ more physical_package_id
>>> 56
>>>
>>> Inform the user of this in the bootlog, as it is much less than 
>>> ideal, and
>>> they can remedy this in their FW.
>>>
>>> This topic was originally discussed in:
>>> https://lore.kernel.org/linux-acpi/c325cfe2-7dbf-e341-7f0f-081b6545e890@huawei.com/T/#m0ec18637d8586f832084a8a6af22580e6174669a 
>>>
>>>
>>> Signed-off-by: John Garry <john.garry@huawei.com>
>>>
>>> diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c
>>> index 4ae93350b70d..b4ed3c818e00 100644
>>> --- a/drivers/acpi/pptt.c
>>> +++ b/drivers/acpi/pptt.c
>>> @@ -515,6 +515,8 @@ static int topology_get_acpi_cpu_tag(struct 
>>> acpi_table_header *table,
>>>           if (level == 0 ||
>>>               cpu_node->flags & ACPI_PPTT_ACPI_PROCESSOR_ID_VALID)
>>>               return cpu_node->acpi_processor_id;
>>> +        if (level == PPTT_ABORT_PACKAGE)
>>> +            pr_notice_once("Physical package node Processor ID valid 
>>> not set, will use table offset as substitute\n");
> 
> Hi Jeremy,
> 
>>
>> What happens in the find_acpi_cpu_topology_hetro_id() case, if the 
>> last IDENTICAL node isn't a socket/etc. Are we expecting to warn of a 
>> missing processor container there as well?
> 
> ok, I could just use this then:
> 
> if (flags & ACPI_PPTT_PHYSCIAL_PACKAGE)
>      pr_notice_once("Physical package node Processor ID ...")

I think that is a better plan.

> 
> As I recall, this tag for hetro id is not exposed to userspace (yet).

Correct.

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

* [PATCH] ACPI: PPTT: Inform user that table offset used for Physical processor node ID
@ 2020-04-02 10:59 John Garry
  0 siblings, 0 replies; 8+ messages in thread
From: John Garry @ 2020-04-02 10:59 UTC (permalink / raw)
  To: rjw, lenb
  Cc: linux-acpi, linux-kernel, sudeep.holla, jeremy.linton, linuxarm,
	wanghuiqiang, John Garry

If the the Processor ID valid is not set for a Physical Processor Package
node, then the node table offset is used as a substitute. As such, we
may get info like this from sysfs:

root@(none)$ pwd
/sys/devices/system/cpu/cpu0/topology
root@(none)$ more physical_package_id
56

Inform the user of this in the bootlog, as it is much less than ideal, and
they can remedy this in their FW.

This topic was originally discussed in:
https://lore.kernel.org/linux-acpi/c325cfe2-7dbf-e341-7f0f-081b6545e890@huawei.com/T/#m0ec18637d8586f832084a8a6af22580e6174669a

Signed-off-by: John Garry <john.garry@huawei.com>

diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c
index 4ae93350b70d..b4ed3c818e00 100644
--- a/drivers/acpi/pptt.c
+++ b/drivers/acpi/pptt.c
@@ -515,6 +515,8 @@ static int topology_get_acpi_cpu_tag(struct acpi_table_header *table,
 		if (level == 0 ||
 		    cpu_node->flags & ACPI_PPTT_ACPI_PROCESSOR_ID_VALID)
 			return cpu_node->acpi_processor_id;
+		if (level == PPTT_ABORT_PACKAGE)
+			pr_notice_once("Physical package node Processor ID valid not set, will use table offset as substitute\n");
 		return ACPI_PTR_DIFF(cpu_node, table);
 	}
 	pr_warn_once("PPTT table found, but unable to locate core %d (%d)\n",
-- 
2.16.4


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

end of thread, other threads:[~2020-04-02 14:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-02 12:22 [PATCH] ACPI: PPTT: Inform user that table offset used for Physical processor node ID John Garry
2020-04-02 13:08 ` Sudeep Holla
2020-04-02 13:17   ` John Garry
2020-04-02 13:24 ` Hanjun Guo
2020-04-02 13:55 ` Jeremy Linton
2020-04-02 14:51   ` John Garry
2020-04-02 14:54     ` Jeremy Linton
  -- strict thread matches above, loose matches on Subject: below --
2020-04-02 10:59 John Garry

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