From 6d597a0032d1eec8319026ae180c5b2d16c53039 Mon Sep 17 00:00:00 2001 From: Len Brown Date: Sat, 11 Sep 2021 12:11:28 +0800 Subject: [PATCH] Intel: x86/topology: Define topology_die_id() mainline inclusion from mainline-v5.3-rc1 commit 306a0de329f77537f29022c2982006f9145d782d category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I47H3V CVE: NA -------------------------------- commit 306a0de329f77537f29022c2982006f9145d782d upstream. topology_die_id(cpu) is a simple macro for use inside the kernel to get the die_id associated with the given cpu. Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/6463bc422b1b05445a502dc505c1d7c6756bda6a.1557769318.git.len.brown@intel.com Signed-off-by: Youquan Song Signed-off-by: Jackie Liu Signed-off-by: Zheng Zengkai Reviewed-by: Xie XiuQi Signed-off-by: Yang Yingliang --- arch/x86/include/asm/topology.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h index e0232f7042c3..3777dbe9c0ff 100644 --- a/arch/x86/include/asm/topology.h +++ b/arch/x86/include/asm/topology.h @@ -106,6 +106,7 @@ extern const struct cpumask *cpu_coregroup_mask(int cpu); #define topology_logical_package_id(cpu) (cpu_data(cpu).logical_proc_id) #define topology_physical_package_id(cpu) (cpu_data(cpu).phys_proc_id) +#define topology_die_id(cpu) (cpu_data(cpu).cpu_die_id) #define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id) #ifdef CONFIG_SMP -- GitLab