aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64/topology.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86_64/topology.h')
-rw-r--r--include/asm-x86_64/topology.h28
1 files changed, 11 insertions, 17 deletions
diff --git a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h
index 67f24e0ea819..c1bc3fad482e 100644
--- a/include/asm-x86_64/topology.h
+++ b/include/asm-x86_64/topology.h
@@ -3,7 +3,7 @@
3 3
4#include <linux/config.h> 4#include <linux/config.h>
5 5
6#ifdef CONFIG_DISCONTIGMEM 6#ifdef CONFIG_NUMA
7 7
8#include <asm/mpspec.h> 8#include <asm/mpspec.h>
9#include <asm/bitops.h> 9#include <asm/bitops.h>
@@ -13,8 +13,8 @@
13extern cpumask_t cpu_online_map; 13extern cpumask_t cpu_online_map;
14 14
15extern unsigned char cpu_to_node[]; 15extern unsigned char cpu_to_node[];
16extern unsigned char pci_bus_to_node[];
16extern cpumask_t node_to_cpumask[]; 17extern cpumask_t node_to_cpumask[];
17extern cpumask_t pci_bus_to_cpumask[];
18 18
19#ifdef CONFIG_ACPI_NUMA 19#ifdef CONFIG_ACPI_NUMA
20extern int __node_distance(int, int); 20extern int __node_distance(int, int);
@@ -26,18 +26,9 @@ extern int __node_distance(int, int);
26#define parent_node(node) (node) 26#define parent_node(node) (node)
27#define node_to_first_cpu(node) (__ffs(node_to_cpumask[node])) 27#define node_to_first_cpu(node) (__ffs(node_to_cpumask[node]))
28#define node_to_cpumask(node) (node_to_cpumask[node]) 28#define node_to_cpumask(node) (node_to_cpumask[node])
29#define pcibus_to_node(bus) pci_bus_to_node[(bus)->number]
30#define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus));
29 31
30static inline cpumask_t __pcibus_to_cpumask(int bus)
31{
32 cpumask_t busmask = pci_bus_to_cpumask[bus];
33 cpumask_t online = cpu_online_map;
34 cpumask_t res;
35 cpus_and(res, busmask, online);
36 return res;
37}
38#define pcibus_to_cpumask(bus) __pcibus_to_cpumask(bus->number)
39
40#ifdef CONFIG_NUMA
41/* sched_domains SD_NODE_INIT for x86_64 machines */ 32/* sched_domains SD_NODE_INIT for x86_64 machines */
42#define SD_NODE_INIT (struct sched_domain) { \ 33#define SD_NODE_INIT (struct sched_domain) { \
43 .span = CPU_MASK_NONE, \ 34 .span = CPU_MASK_NONE, \
@@ -48,18 +39,21 @@ static inline cpumask_t __pcibus_to_cpumask(int bus)
48 .busy_factor = 32, \ 39 .busy_factor = 32, \
49 .imbalance_pct = 125, \ 40 .imbalance_pct = 125, \
50 .cache_hot_time = (10*1000000), \ 41 .cache_hot_time = (10*1000000), \
51 .cache_nice_tries = 1, \ 42 .cache_nice_tries = 2, \
43 .busy_idx = 3, \
44 .idle_idx = 2, \
45 .newidle_idx = 0, \
46 .wake_idx = 1, \
47 .forkexec_idx = 1, \
52 .per_cpu_gain = 100, \ 48 .per_cpu_gain = 100, \
53 .flags = SD_LOAD_BALANCE \ 49 .flags = SD_LOAD_BALANCE \
54 | SD_BALANCE_NEWIDLE \ 50 | SD_BALANCE_FORK \
55 | SD_BALANCE_EXEC \ 51 | SD_BALANCE_EXEC \
56 | SD_WAKE_IDLE \
57 | SD_WAKE_BALANCE, \ 52 | SD_WAKE_BALANCE, \
58 .last_balance = jiffies, \ 53 .last_balance = jiffies, \
59 .balance_interval = 1, \ 54 .balance_interval = 1, \
60 .nr_balance_failed = 0, \ 55 .nr_balance_failed = 0, \
61} 56}
62#endif
63 57
64#endif 58#endif
65 59