aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNathan Lynch <ntl@pobox.com>2008-07-27 01:24:53 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-07-28 02:30:51 -0400
commit440a0857e32a05979fb01fc59ea454a723e80e4b (patch)
tree9776655cd83b18cdd9cc8f08b836a6811f77ced0 /include
parent0764bf63da5466474eebf7d21994cf6b106265a3 (diff)
powerpc: Make core sibling information available to userspace
Implement the notion of "core siblings" for powerpc. This makes /sys/devices/system/cpu/cpu*/topology/core_siblings present sensible values, indicating online CPUs which share an L2 cache. BenH: Made cpu_to_l2cache() use of_find_node_by_phandle() instead of IBM-specific open coded search Signed-off-by: Nathan Lynch <ntl@pobox.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-powerpc/smp.h1
-rw-r--r--include/asm-powerpc/topology.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-powerpc/smp.h b/include/asm-powerpc/smp.h
index 416d4c288cea..32e910006250 100644
--- a/include/asm-powerpc/smp.h
+++ b/include/asm-powerpc/smp.h
@@ -62,6 +62,7 @@ extern int smp_hw_index[];
62#endif 62#endif
63 63
64DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); 64DECLARE_PER_CPU(cpumask_t, cpu_sibling_map);
65DECLARE_PER_CPU(cpumask_t, cpu_core_map);
65 66
66/* Since OpenPIC has only 4 IPIs, we use slightly different message numbers. 67/* Since OpenPIC has only 4 IPIs, we use slightly different message numbers.
67 * 68 *
diff --git a/include/asm-powerpc/topology.h b/include/asm-powerpc/topology.h
index 100c6fbfc587..f00e8e551738 100644
--- a/include/asm-powerpc/topology.h
+++ b/include/asm-powerpc/topology.h
@@ -108,6 +108,7 @@ static inline void sysfs_remove_device_from_node(struct sys_device *dev,
108#include <asm/smp.h> 108#include <asm/smp.h>
109 109
110#define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) 110#define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu))
111#define topology_core_siblings(cpu) (per_cpu(cpu_core_map, cpu))
111#endif 112#endif
112#endif 113#endif
113 114