aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/smp.h
diff options
context:
space:
mode:
authorNathan Lynch <ntl@pobox.com>2008-07-27 15:24:54 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-07-28 16:30:52 +1000
commite9efed3b80a83e44b98fc626f3268ae072550b84 (patch)
treecbe7cc897dc112e2eb93f9bbded5aa3a8e6e0bf3 /include/asm-powerpc/smp.h
parentpowerpc: Make core sibling information available to userspace (diff)
downloadlinux-dev-e9efed3b80a83e44b98fc626f3268ae072550b84.tar.xz
linux-dev-e9efed3b80a83e44b98fc626f3268ae072550b84.zip
powerpc: Make core id information available to userspace
Existing Open Firmware practice is to report each processor core as a separate node in the device tree. Report the value of the "reg" OF property corresponding to a logical CPU's device node as the core_id attribute in /sys/devices/system/cpu/cpu*/topology/core_id. Signed-off-by: Nathan Lynch <ntl@pobox.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'include/asm-powerpc/smp.h')
-rw-r--r--include/asm-powerpc/smp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-powerpc/smp.h b/include/asm-powerpc/smp.h
index 32e910006250..4d28e1e4521b 100644
--- a/include/asm-powerpc/smp.h
+++ b/include/asm-powerpc/smp.h
@@ -63,6 +63,7 @@ extern int smp_hw_index[];
DECLARE_PER_CPU(cpumask_t, cpu_sibling_map);
DECLARE_PER_CPU(cpumask_t, cpu_core_map);
+extern int cpu_to_core_id(int cpu);
/* Since OpenPIC has only 4 IPIs, we use slightly different message numbers.
*