diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-ppc64/topology.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/asm-ppc64/topology.h')
-rw-r--r-- | include/asm-ppc64/topology.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/include/asm-ppc64/topology.h b/include/asm-ppc64/topology.h new file mode 100644 index 000000000000..d58d9dd79998 --- /dev/null +++ b/include/asm-ppc64/topology.h | |||
@@ -0,0 +1,68 @@ | |||
1 | #ifndef _ASM_PPC64_TOPOLOGY_H | ||
2 | #define _ASM_PPC64_TOPOLOGY_H | ||
3 | |||
4 | #include <linux/config.h> | ||
5 | #include <asm/mmzone.h> | ||
6 | |||
7 | #ifdef CONFIG_NUMA | ||
8 | |||
9 | static inline int cpu_to_node(int cpu) | ||
10 | { | ||
11 | int node; | ||
12 | |||
13 | node = numa_cpu_lookup_table[cpu]; | ||
14 | |||
15 | #ifdef DEBUG_NUMA | ||
16 | BUG_ON(node == -1); | ||
17 | #endif | ||
18 | |||
19 | return node; | ||
20 | } | ||
21 | |||
22 | #define parent_node(node) (node) | ||
23 | |||
24 | static inline cpumask_t node_to_cpumask(int node) | ||
25 | { | ||
26 | return numa_cpumask_lookup_table[node]; | ||
27 | } | ||
28 | |||
29 | static inline int node_to_first_cpu(int node) | ||
30 | { | ||
31 | cpumask_t tmp; | ||
32 | tmp = node_to_cpumask(node); | ||
33 | return first_cpu(tmp); | ||
34 | } | ||
35 | |||
36 | #define pcibus_to_cpumask(bus) (cpu_online_map) | ||
37 | |||
38 | #define nr_cpus_node(node) (nr_cpus_in_node[node]) | ||
39 | |||
40 | /* sched_domains SD_NODE_INIT for PPC64 machines */ | ||
41 | #define SD_NODE_INIT (struct sched_domain) { \ | ||
42 | .span = CPU_MASK_NONE, \ | ||
43 | .parent = NULL, \ | ||
44 | .groups = NULL, \ | ||
45 | .min_interval = 8, \ | ||
46 | .max_interval = 32, \ | ||
47 | .busy_factor = 32, \ | ||
48 | .imbalance_pct = 125, \ | ||
49 | .cache_hot_time = (10*1000000), \ | ||
50 | .cache_nice_tries = 1, \ | ||
51 | .per_cpu_gain = 100, \ | ||
52 | .flags = SD_LOAD_BALANCE \ | ||
53 | | SD_BALANCE_EXEC \ | ||
54 | | SD_BALANCE_NEWIDLE \ | ||
55 | | SD_WAKE_IDLE \ | ||
56 | | SD_WAKE_BALANCE, \ | ||
57 | .last_balance = jiffies, \ | ||
58 | .balance_interval = 1, \ | ||
59 | .nr_balance_failed = 0, \ | ||
60 | } | ||
61 | |||
62 | #else /* !CONFIG_NUMA */ | ||
63 | |||
64 | #include <asm-generic/topology.h> | ||
65 | |||
66 | #endif /* CONFIG_NUMA */ | ||
67 | |||
68 | #endif /* _ASM_PPC64_TOPOLOGY_H */ | ||