提交 dc4b2b76 编写于 作者: H Hanjun Guo 提交者: Zheng Zengkai

arm64: topology: Support PHYTIUM CPU

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4CGER
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: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 d910aa8a
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
#define ARM_CPU_IMP_NVIDIA 0x4E #define ARM_CPU_IMP_NVIDIA 0x4E
#define ARM_CPU_IMP_FUJITSU 0x46 #define ARM_CPU_IMP_FUJITSU 0x46
#define ARM_CPU_IMP_HISI 0x48 #define ARM_CPU_IMP_HISI 0x48
#define ARM_CPU_IMP_PHYTIUM 0x70
#define ARM_CPU_PART_AEM_V8 0xD0F #define ARM_CPU_PART_AEM_V8 0xD0F
#define ARM_CPU_PART_FOUNDATION 0xD00 #define ARM_CPU_PART_FOUNDATION 0xD00
......
...@@ -53,6 +53,11 @@ void store_cpu_topology(unsigned int cpuid) ...@@ -53,6 +53,11 @@ void store_cpu_topology(unsigned int cpuid)
cpuid_topo->thread_id = -1; cpuid_topo->thread_id = -1;
cpuid_topo->core_id = cpuid; cpuid_topo->core_id = cpuid;
cpuid_topo->package_id = cpu_to_node(cpuid); cpuid_topo->package_id = cpu_to_node(cpuid);
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", pr_debug("CPU%u: cluster %d core %d thread %d mpidr %#016llx\n",
cpuid, cpuid_topo->package_id, cpuid_topo->core_id, cpuid, cpuid_topo->package_id, cpuid_topo->core_id,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册