Patchwork linux-next: rr tree build failure

login
register
mail settings
Submitter Stephen Rothwell
Date Oct. 23, 2008, 4:52 a.m.
Message ID <20081023155228.c8fa9da8.sfr@canb.auug.org.au>
Download mbox | patch
Permalink /patch/5420/
State Superseded
Headers show

Comments

Stephen Rothwell - Oct. 23, 2008, 4:52 a.m.
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'

Caused by commit 20ec1a8465bd6d2e7e68fa5a7b09309c920b4792
("cpumask:add-struct-cpumask") which removed __cpus_setall from
include/linux/cpumask.h.

I applied the hack patch below (which is probably not what we want).
Rusty Russell - Oct. 23, 2008, 1:31 p.m.
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.

Patch

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)