diff options
author | Mike Travis <travis@sgi.com> | 2008-12-31 20:34:16 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-03 12:53:31 -0500 |
commit | 7eb19553369c46cc1fa64caf120cbcab1b597f7c (patch) | |
tree | ef1a3beae706b9497c845d0a2557ceb4d2754998 /arch/powerpc/include/asm/topology.h | |
parent | 6092848a2a23b660150a38bc06f59d75838d70c8 (diff) | |
parent | 8c384cdee3e04d6194a2c2b192b624754f990835 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask into merge-rr-cpumask
Conflicts:
arch/x86/kernel/io_apic.c
kernel/rcuclassic.c
kernel/sched.c
kernel/time/tick-sched.c
Signed-off-by: Mike Travis <travis@sgi.com>
[ mingo@elte.hu: backmerged typo fix for io_apic.c ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/powerpc/include/asm/topology.h')
-rw-r--r-- | arch/powerpc/include/asm/topology.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h index 373fca394a54..375258559ae6 100644 --- a/arch/powerpc/include/asm/topology.h +++ b/arch/powerpc/include/asm/topology.h | |||
@@ -22,11 +22,11 @@ static inline cpumask_t node_to_cpumask(int node) | |||
22 | return numa_cpumask_lookup_table[node]; | 22 | return numa_cpumask_lookup_table[node]; |
23 | } | 23 | } |
24 | 24 | ||
25 | #define cpumask_of_node(node) (&numa_cpumask_lookup_table[node]) | ||
26 | |||
25 | static inline int node_to_first_cpu(int node) | 27 | static inline int node_to_first_cpu(int node) |
26 | { | 28 | { |
27 | cpumask_t tmp; | 29 | return cpumask_first(cpumask_of_node(node)); |
28 | tmp = node_to_cpumask(node); | ||
29 | return first_cpu(tmp); | ||
30 | } | 30 | } |
31 | 31 | ||
32 | int of_node_to_nid(struct device_node *device); | 32 | int of_node_to_nid(struct device_node *device); |
@@ -46,6 +46,10 @@ static inline int pcibus_to_node(struct pci_bus *bus) | |||
46 | node_to_cpumask(pcibus_to_node(bus)) \ | 46 | node_to_cpumask(pcibus_to_node(bus)) \ |
47 | ) | 47 | ) |
48 | 48 | ||
49 | #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ | ||
50 | cpu_all_mask : \ | ||
51 | cpumask_of_node(pcibus_to_node(bus))) | ||
52 | |||
49 | /* sched_domains SD_NODE_INIT for PPC64 machines */ | 53 | /* sched_domains SD_NODE_INIT for PPC64 machines */ |
50 | #define SD_NODE_INIT (struct sched_domain) { \ | 54 | #define SD_NODE_INIT (struct sched_domain) { \ |
51 | .parent = NULL, \ | 55 | .parent = NULL, \ |
@@ -108,6 +112,8 @@ static inline void sysfs_remove_device_from_node(struct sys_device *dev, | |||
108 | 112 | ||
109 | #define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) | 113 | #define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) |
110 | #define topology_core_siblings(cpu) (per_cpu(cpu_core_map, cpu)) | 114 | #define topology_core_siblings(cpu) (per_cpu(cpu_core_map, cpu)) |
115 | #define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu)) | ||
116 | #define topology_core_cpumask(cpu) (&per_cpu(cpu_core_map, cpu)) | ||
111 | #define topology_core_id(cpu) (cpu_to_core_id(cpu)) | 117 | #define topology_core_id(cpu) (cpu_to_core_id(cpu)) |
112 | #endif | 118 | #endif |
113 | #endif | 119 | #endif |