diff options
author | jdl@freescale.com <jdl@freescale.com> | 2005-09-07 16:59:48 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-09-09 08:11:35 -0400 |
commit | dd56fdf23dfa0127d512b73d4238dbd2b5a7c1eb (patch) | |
tree | 59f952b87d4bec5f11c578a384c3aaa2ddf5860d /include/asm-powerpc/topology.h | |
parent | 64807081e38703617cf9a5d71db14ea2b3e1cb04 (diff) |
[PATCH] powerpc: Merge a few more include files
Merge a few asm-ppc and asm-ppc64 header files.
Note: the merge of setup.h intentionally does not carry
forward the m68k cruft. That means this patch continues
to break the already broken amiga on the ppc32.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/topology.h')
-rw-r--r-- | include/asm-powerpc/topology.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/include/asm-powerpc/topology.h b/include/asm-powerpc/topology.h new file mode 100644 index 000000000000..2512e3836bf4 --- /dev/null +++ b/include/asm-powerpc/topology.h | |||
@@ -0,0 +1,70 @@ | |||
1 | #ifndef _ASM_POWERPC_TOPOLOGY_H | ||
2 | #define _ASM_POWERPC_TOPOLOGY_H | ||
3 | |||
4 | #include <linux/config.h> | ||
5 | |||
6 | #ifdef CONFIG_NUMA | ||
7 | |||
8 | #include <asm/mmzone.h> | ||
9 | |||
10 | static inline int cpu_to_node(int cpu) | ||
11 | { | ||
12 | int node; | ||
13 | |||
14 | node = numa_cpu_lookup_table[cpu]; | ||
15 | |||
16 | #ifdef DEBUG_NUMA | ||
17 | BUG_ON(node == -1); | ||
18 | #endif | ||
19 | |||
20 | return node; | ||
21 | } | ||
22 | |||
23 | #define parent_node(node) (node) | ||
24 | |||
25 | static inline cpumask_t node_to_cpumask(int node) | ||
26 | { | ||
27 | return numa_cpumask_lookup_table[node]; | ||
28 | } | ||
29 | |||
30 | static inline int node_to_first_cpu(int node) | ||
31 | { | ||
32 | cpumask_t tmp; | ||
33 | tmp = node_to_cpumask(node); | ||
34 | return first_cpu(tmp); | ||
35 | } | ||
36 | |||
37 | #define pcibus_to_node(node) (-1) | ||
38 | #define pcibus_to_cpumask(bus) (cpu_online_map) | ||
39 | |||
40 | #define nr_cpus_node(node) (nr_cpus_in_node[node]) | ||
41 | |||
42 | /* sched_domains SD_NODE_INIT for PPC64 machines */ | ||
43 | #define SD_NODE_INIT (struct sched_domain) { \ | ||
44 | .span = CPU_MASK_NONE, \ | ||
45 | .parent = NULL, \ | ||
46 | .groups = NULL, \ | ||
47 | .min_interval = 8, \ | ||
48 | .max_interval = 32, \ | ||
49 | .busy_factor = 32, \ | ||
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 \ | ||
55 | | SD_BALANCE_EXEC \ | ||
56 | | SD_BALANCE_NEWIDLE \ | ||
57 | | SD_WAKE_IDLE \ | ||
58 | | SD_WAKE_BALANCE, \ | ||
59 | .last_balance = jiffies, \ | ||
60 | .balance_interval = 1, \ | ||
61 | .nr_balance_failed = 0, \ | ||
62 | } | ||
63 | |||
64 | #else | ||
65 | |||
66 | #include <asm-generic/topology.h> | ||
67 | |||
68 | #endif /* CONFIG_NUMA */ | ||
69 | |||
70 | #endif /* _ASM_POWERPC_TOPOLOGY_H */ | ||