aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/cputopology.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/cputopology.txt')
-rw-r--r--Documentation/cputopology.txt26
1 files changed, 9 insertions, 17 deletions
diff --git a/Documentation/cputopology.txt b/Documentation/cputopology.txt
index b61cb956402..bd699da2466 100644
--- a/Documentation/cputopology.txt
+++ b/Documentation/cputopology.txt
@@ -14,9 +14,8 @@ represent the thread siblings to cpu X in the same physical package;
14To implement it in an architecture-neutral way, a new source file, 14To implement it in an architecture-neutral way, a new source file,
15drivers/base/topology.c, is to export the 4 attributes. 15drivers/base/topology.c, is to export the 4 attributes.
16 16
17If one architecture wants to support this feature, it just needs to 17For an architecture to support this feature, it must define some of
18implement 4 defines, typically in file include/asm-XXX/topology.h. 18these macros in include/asm-XXX/topology.h:
19The 4 defines are:
20#define topology_physical_package_id(cpu) 19#define topology_physical_package_id(cpu)
21#define topology_core_id(cpu) 20#define topology_core_id(cpu)
22#define topology_thread_siblings(cpu) 21#define topology_thread_siblings(cpu)
@@ -25,17 +24,10 @@ The 4 defines are:
25The type of **_id is int. 24The type of **_id is int.
26The type of siblings is cpumask_t. 25The type of siblings is cpumask_t.
27 26
28To be consistent on all architectures, the 4 attributes should have 27To be consistent on all architectures, include/linux/topology.h
29default values if their values are unavailable. Below is the rule. 28provides default definitions for any of the above macros that are
301) physical_package_id: If cpu has no physical package id, -1 is the 29not defined by include/asm-XXX/topology.h:
31default value. 301) physical_package_id: -1
322) core_id: If cpu doesn't support multi-core, its core id is 0. 312) core_id: 0
333) thread_siblings: Just include itself, if the cpu doesn't support 323) thread_siblings: just the given CPU
34HT/multi-thread. 334) core_siblings: just the given CPU
354) core_siblings: Just include itself, if the cpu doesn't support
36multi-core and HT/Multi-thread.
37
38So be careful when declaring the 4 defines in include/asm-XXX/topology.h.
39
40If an attribute isn't defined on an architecture, it won't be exported.
41