diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-03 15:04:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-03 15:04:39 -0500 |
commit | 7d3b56ba37a95f1f370f50258ed3954c304c524b (patch) | |
tree | 86102527b92f02450aa245f084ffb491c18d2e0a /arch/powerpc | |
parent | 269b012321f2f1f8e4648c43a93bf432b42c6668 (diff) | |
parent | ab14398abd195af91a744c320a52a1bce814dd1e (diff) |
Merge branch 'cpus4096-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'cpus4096-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (77 commits)
x86: setup_per_cpu_areas() cleanup
cpumask: fix compile error when CONFIG_NR_CPUS is not defined
cpumask: use alloc_cpumask_var_node where appropriate
cpumask: convert shared_cpu_map in acpi_processor* structs to cpumask_var_t
x86: use cpumask_var_t in acpi/boot.c
x86: cleanup some remaining usages of NR_CPUS where s/b nr_cpu_ids
sched: put back some stack hog changes that were undone in kernel/sched.c
x86: enable cpus display of kernel_max and offlined cpus
ia64: cpumask fix for is_affinity_mask_valid()
cpumask: convert RCU implementations, fix
xtensa: define __fls
mn10300: define __fls
m32r: define __fls
h8300: define __fls
frv: define __fls
cris: define __fls
cpumask: CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
cpumask: zero extra bits in alloc_cpumask_var_node
cpumask: replace for_each_cpu_mask_nr with for_each_cpu in kernel/time/
cpumask: convert mm/
...
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/include/asm/topology.h | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spu_priv1_mmio.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/sched.c | 4 |
3 files changed, 14 insertions, 8 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 |
diff --git a/arch/powerpc/platforms/cell/spu_priv1_mmio.c b/arch/powerpc/platforms/cell/spu_priv1_mmio.c index 906a0a2a9fe1..1410443731eb 100644 --- a/arch/powerpc/platforms/cell/spu_priv1_mmio.c +++ b/arch/powerpc/platforms/cell/spu_priv1_mmio.c | |||
@@ -80,10 +80,10 @@ static void cpu_affinity_set(struct spu *spu, int cpu) | |||
80 | u64 route; | 80 | u64 route; |
81 | 81 | ||
82 | if (nr_cpus_node(spu->node)) { | 82 | if (nr_cpus_node(spu->node)) { |
83 | cpumask_t spumask = node_to_cpumask(spu->node); | 83 | const struct cpumask *spumask = cpumask_of_node(spu->node), |
84 | cpumask_t cpumask = node_to_cpumask(cpu_to_node(cpu)); | 84 | *cpumask = cpumask_of_node(cpu_to_node(cpu)); |
85 | 85 | ||
86 | if (!cpus_intersects(spumask, cpumask)) | 86 | if (!cpumask_intersects(spumask, cpumask)) |
87 | return; | 87 | return; |
88 | } | 88 | } |
89 | 89 | ||
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 2ad914c47493..6a0ad196aeb3 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c | |||
@@ -166,9 +166,9 @@ void spu_update_sched_info(struct spu_context *ctx) | |||
166 | static int __node_allowed(struct spu_context *ctx, int node) | 166 | static int __node_allowed(struct spu_context *ctx, int node) |
167 | { | 167 | { |
168 | if (nr_cpus_node(node)) { | 168 | if (nr_cpus_node(node)) { |
169 | cpumask_t mask = node_to_cpumask(node); | 169 | const struct cpumask *mask = cpumask_of_node(node); |
170 | 170 | ||
171 | if (cpus_intersects(mask, ctx->cpus_allowed)) | 171 | if (cpumask_intersects(mask, &ctx->cpus_allowed)) |
172 | return 1; | 172 | return 1; |
173 | } | 173 | } |
174 | 174 | ||