1 #ifndef _ASM_PPC64_TOPOLOGY_H
2 #define _ASM_PPC64_TOPOLOGY_H
4 #include <linux/config.h>
5 #include <asm/mmzone.h>
9 static inline int cpu_to_node(int cpu)
13 node = numa_cpu_lookup_table[cpu];
22 #define parent_node(node) (node)
24 static inline cpumask_t node_to_cpumask(int node)
26 return numa_cpumask_lookup_table[node];
29 static inline int node_to_first_cpu(int node)
32 tmp = node_to_cpumask(node);
33 return first_cpu(tmp);
36 #define pcibus_to_node(node) (-1)
37 #define pcibus_to_cpumask(bus) (cpu_online_map)
39 #define nr_cpus_node(node) (nr_cpus_in_node[node])
41 /* sched_domains SD_NODE_INIT for PPC64 machines */
42 #define SD_NODE_INIT (struct sched_domain) { \
43 .span = CPU_MASK_NONE, \
49 .imbalance_pct = 125, \
50 .cache_hot_time = (10*1000000), \
51 .cache_nice_tries = 1, \
52 .per_cpu_gain = 100, \
53 .flags = SD_LOAD_BALANCE \
55 | SD_BALANCE_NEWIDLE \
58 .last_balance = jiffies, \
59 .balance_interval = 1, \
60 .nr_balance_failed = 0, \
65 #include <asm-generic/topology.h>
67 #endif /* CONFIG_NUMA */
69 #endif /* _ASM_PPC64_TOPOLOGY_H */