1 #ifndef _ASM_POWERPC_TOPOLOGY_H
2 #define _ASM_POWERPC_TOPOLOGY_H
4 #include <linux/config.h>
8 #include <asm/mmzone.h>
10 static inline int cpu_to_node(int cpu)
14 node = numa_cpu_lookup_table[cpu];
23 #define parent_node(node) (node)
25 static inline cpumask_t node_to_cpumask(int node)
27 return numa_cpumask_lookup_table[node];
30 static inline int node_to_first_cpu(int node)
33 tmp = node_to_cpumask(node);
34 return first_cpu(tmp);
37 #define pcibus_to_node(node) (-1)
38 #define pcibus_to_cpumask(bus) (cpu_online_map)
40 #define nr_cpus_node(node) (nr_cpus_in_node[node])
42 /* sched_domains SD_NODE_INIT for PPC64 machines */
43 #define SD_NODE_INIT (struct sched_domain) { \
44 .span = CPU_MASK_NONE, \
50 .imbalance_pct = 125, \
51 .cache_hot_time = (10*1000000), \
52 .cache_nice_tries = 1, \
53 .per_cpu_gain = 100, \
54 .flags = SD_LOAD_BALANCE \
56 | SD_BALANCE_NEWIDLE \
59 .last_balance = jiffies, \
60 .balance_interval = 1, \
61 .nr_balance_failed = 0, \
66 #include <asm-generic/topology.h>
68 #endif /* CONFIG_NUMA */
70 #endif /* _ASM_POWERPC_TOPOLOGY_H */