mbox series

[for-stable-5.3,0/3] ACPI, arm64: Backport for ACPI PPTT 6.3 thread flag

Message ID 1571054162-71090-1-git-send-email-john.garry@huawei.com
Headers show
Series ACPI, arm64: Backport for ACPI PPTT 6.3 thread flag | expand

Message

John Garry Oct. 14, 2019, 11:56 a.m. UTC
This series is a backport of the ACPI PPTT 6.3 thread flag feature for
supporting arm64 systems.

The background is that some arm64 implementations are broken, in that they
incorrectly advertise that a CPU is mutli-threaded, when it is not - the
HiSilicon Taishanv110 rev 2, aka tsv110, being an example.

This leads to the system topology being incorrect. The reason being that
arm64 topology code uses a combination of ACPI PPTT (Processor Properties
Topology Table) and the system MPIDR (Multiprocessor Affinity Register) MT
bit to determine the topology.

Until ACPI 6.3, the PPTT did not have any method to determine whether
a CPU was multi-threaded, so only the MT bit is used - hence the
broken topology for some systems.

In ACPI 6.3, a PPTT thread flag was introduced, which - when supported -
would be used by the kernel to determine really if a CPU is multi-threaded
or not, so that we don't get incorrect topology.

RFC originally sent for 4.19: https://lkml.org/lkml/2019/10/10/724
Jeremy Linton (2):
  ACPI/PPTT: Add support for ACPI 6.3 thread flag
  arm64: topology: Use PPTT to determine if PE is a thread

 arch/arm64/kernel/topology.c | 19 ++++++++++---
 drivers/acpi/pptt.c          | 52 ++++++++++++++++++++++++++++++++++++
 include/linux/acpi.h         |  5 ++++
 3 files changed, 72 insertions(+), 4 deletions(-)

-- 
2.17.1

Comments

Sasha Levin Oct. 14, 2019, 11:29 p.m. UTC | #1
On Mon, Oct 14, 2019 at 07:56:01PM +0800, John Garry wrote:
>From: Jeremy Linton <jeremy.linton@arm.com>

>

>Commit bbd1b70639f785a970d998f35155c713f975e3ac upstream.

>

>ACPI 6.3 adds a flag to the CPU node to indicate whether

>the given PE is a thread. Add a function to return that

>information for a given linux logical CPU.

>

>Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>

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

>Reviewed-by: Robert Richter <rrichter@marvell.com>

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

>Signed-off-by: Will Deacon <will@kernel.org>

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


How far back should these patches be backported?

-- 
Thanks,
Sasha