Message ID | 20081023155228.c8fa9da8.sfr@canb.auug.org.au (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
On Thursday 23 October 2008 15:52:28 Stephen Rothwell wrote: > Hi Rusty, > > Today's linux-next build (powerpc ppc64_defconfig) failed like this: > > arch/powerpc/platforms/cell/spu_base.c: In function > 'mm_needs_global_tlbie': arch/powerpc/platforms/cell/spu_base.c:117: error: > implicit declaration of function '__cpus_setall' OK, after discussions with Arnd I applied two fixes. One is similar to yours but neater, and the other then changes NR_CPUS to nr_cpu_ids once it becomes available for UP. Thanks, Rusty.
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index a5bdb89..a876904 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c @@ -111,10 +111,13 @@ void spu_flush_all_slbs(struct mm_struct *mm) */ static inline void mm_needs_global_tlbie(struct mm_struct *mm) { - int nr = (NR_CPUS > 1) ? NR_CPUS : NR_CPUS + 1; - /* Global TLBIE broadcast required with SPEs. */ - __cpus_setall(&mm->cpu_vm_mask, nr); + if (NR_CPUS > 1) + cpumask_setall(&mm->cpu_vm_mask); + else { + cpumask_set_cpu(0, &mm->cpu_vm_mask); + cpumask_set_cpu(1, &mm->cpu_vm_mask); + } } void spu_associate_mm(struct spu *spu, struct mm_struct *mm)