[lkml]   [2009]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] x86, topology: Swap semantic of core_siblings and cpu_node_siblings
Brice Goglin suggested to use the following semantic for
CPU topology information

Level | Set of CPUs
phys_package | cpu_node_siblings
cpu_node | core_siblings
core | thread_siblings
thread | one CPU

Done that.

CC: Brice Goglin <>
Signed-off-by: Andreas Herrmann <>
arch/x86/include/asm/topology.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

Patch is on top of the 5 previous patches.
Documentation update will follow.


diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
index 9eddb69..d53ef91 100644
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -188,10 +188,10 @@ extern const struct cpumask *cpu_coregroup_mask(int cpu);
#define topology_physical_package_id(cpu) (cpu_data(cpu).phys_proc_id)
#define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id)
-#define topology_core_cpumask(cpu) (per_cpu(cpu_core_map, cpu))
+#define topology_core_cpumask(cpu) (per_cpu(cpu_node_map, cpu))
#define topology_thread_cpumask(cpu) (per_cpu(cpu_sibling_map, cpu))
#define topology_cpu_node_id(cpu) (cpu_data(cpu).cpu_node_id)
-#define topology_cpu_node_cpumask(cpu) (per_cpu(cpu_node_map, cpu))
+#define topology_cpu_node_cpumask(cpu) (per_cpu(cpu_core_map, cpu))

/* indicates that pointers to the topology cpumask_t maps are valid */
#define arch_provides_topology_pointers yes

 \ /
  Last update: 2009-08-06 19:33    [W:0.168 / U:3.768 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site