diff options
Diffstat (limited to 'include/asm-x86/topology_64.h')
-rw-r--r-- | include/asm-x86/topology_64.h | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/include/asm-x86/topology_64.h b/include/asm-x86/topology_64.h deleted file mode 100644 index 93de948bd337..000000000000 --- a/include/asm-x86/topology_64.h +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | #ifndef _ASM_X86_TOPOLOGY_H | ||
2 | #define _ASM_X86_TOPOLOGY_H | ||
3 | |||
4 | #ifdef CONFIG_NUMA | ||
5 | #include <linux/cpumask.h> | ||
6 | #include <asm/mpspec.h> | ||
7 | |||
8 | /* Mappings between logical cpu number and node number */ | ||
9 | extern int cpu_to_node_map[]; | ||
10 | extern cpumask_t node_to_cpumask_map[]; | ||
11 | |||
12 | #ifdef CONFIG_ACPI_NUMA | ||
13 | extern int __node_distance(int, int); | ||
14 | #define node_distance(a,b) __node_distance(a,b) | ||
15 | #endif | ||
16 | |||
17 | /* Returns the number of the node containing CPU 'cpu' */ | ||
18 | static inline int cpu_to_node(int cpu) | ||
19 | { | ||
20 | return cpu_to_node_map[cpu]; | ||
21 | } | ||
22 | |||
23 | /* | ||
24 | * Returns the number of the node containing Node 'node'. This | ||
25 | * architecture is flat, so it is a pretty simple function! | ||
26 | */ | ||
27 | #define parent_node(node) (node) | ||
28 | |||
29 | /* Returns a bitmask of CPUs on Node 'node'. */ | ||
30 | static inline cpumask_t node_to_cpumask(int node) | ||
31 | { | ||
32 | return node_to_cpumask_map[node]; | ||
33 | } | ||
34 | |||
35 | /* Returns the number of the first CPU on Node 'node'. */ | ||
36 | static inline int node_to_first_cpu(int node) | ||
37 | { | ||
38 | cpumask_t mask = node_to_cpumask(node); | ||
39 | |||
40 | return first_cpu(mask); | ||
41 | } | ||
42 | |||
43 | #define pcibus_to_node(bus) __pcibus_to_node(bus) | ||
44 | #define pcibus_to_cpumask(bus) __pcibus_to_cpumask(bus) | ||
45 | |||
46 | #define numa_node_id() read_pda(nodenumber) | ||
47 | |||
48 | /* sched_domains SD_NODE_INIT for x86_64 machines */ | ||
49 | #define SD_NODE_INIT (struct sched_domain) { \ | ||
50 | .span = CPU_MASK_NONE, \ | ||
51 | .parent = NULL, \ | ||
52 | .child = NULL, \ | ||
53 | .groups = NULL, \ | ||
54 | .min_interval = 8, \ | ||
55 | .max_interval = 32, \ | ||
56 | .busy_factor = 32, \ | ||
57 | .imbalance_pct = 125, \ | ||
58 | .cache_nice_tries = 2, \ | ||
59 | .busy_idx = 3, \ | ||
60 | .idle_idx = 2, \ | ||
61 | .newidle_idx = 0, \ | ||
62 | .wake_idx = 1, \ | ||
63 | .forkexec_idx = 1, \ | ||
64 | .flags = SD_LOAD_BALANCE \ | ||
65 | | SD_BALANCE_EXEC \ | ||
66 | | SD_BALANCE_FORK \ | ||
67 | | SD_SERIALIZE \ | ||
68 | | SD_WAKE_BALANCE, \ | ||
69 | .last_balance = jiffies, \ | ||
70 | .balance_interval = 1, \ | ||
71 | .nr_balance_failed = 0, \ | ||
72 | } | ||
73 | |||
74 | #else /* CONFIG_NUMA */ | ||
75 | |||
76 | #include <asm-generic/topology.h> | ||
77 | |||
78 | #endif | ||
79 | |||
80 | extern cpumask_t cpu_coregroup_map(int cpu); | ||
81 | |||
82 | #ifdef CONFIG_SMP | ||
83 | #define topology_physical_package_id(cpu) (cpu_data(cpu).phys_proc_id) | ||
84 | #define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id) | ||
85 | #define topology_core_siblings(cpu) (per_cpu(cpu_core_map, cpu)) | ||
86 | #define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) | ||
87 | #define mc_capable() (boot_cpu_data.x86_max_cores > 1) | ||
88 | #define smt_capable() (smp_num_siblings > 1) | ||
89 | #endif | ||
90 | |||
91 | #endif | ||