Commit 6573f913 authored by Hanjun Guo's avatar Hanjun Guo Committed by Yang Yingliang
Browse files

arm64: topology: Support PHYTIUM CPU



hulk inclusion
category: feature
bugzilla: NA
CVE: NA
---------------------------

Add the support for PHYTIUM topology detect, it's better
use PPTT ACPI table to report the topology, but we can live
with it at now.

Signed-off-by: default avatarHanjun Guo <guohanjun@huawei.com>
Reviewed-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 88244048
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@
#define ARM_CPU_IMP_QCOM		0x51
#define ARM_CPU_IMP_NVIDIA		0x4E
#define ARM_CPU_IMP_HISI		0x48
#define ARM_CPU_IMP_PHYTIUM		0x70

#define ARM_CPU_PART_AEM_V8		0xD0F
#define ARM_CPU_PART_FOUNDATION		0xD00
+6 −0
Original line number Diff line number Diff line
@@ -286,6 +286,12 @@ void store_cpu_topology(unsigned int cpuid)
		cpuid_topo->package_id = MPIDR_AFFINITY_LEVEL(mpidr, 1) |
					 MPIDR_AFFINITY_LEVEL(mpidr, 2) << 8 |
					 MPIDR_AFFINITY_LEVEL(mpidr, 3) << 16;

		if (read_cpuid_implementor() == ARM_CPU_IMP_PHYTIUM) {
			cpuid_topo->thread_id  = 0;
			cpuid_topo->core_id  = cpuid;
			cpuid_topo->package_id = 0;
		}
	}

	pr_debug("CPU%u: cluster %d core %d thread %d mpidr %#016llx\n",