CPU_MASK_ALL and CPU_MASK_NONE may only be used for initialisers.  It
doesn't compile if NR_CPUS>4*BITS_PER_LONG.  Fixes to the cpumask
infrastructure remain welcome.



---

 kernel/kmod.c    |    5 +++--
 kernel/kthread.c |    5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff -puN kernel/kmod.c~set_cpus_allowed-fix kernel/kmod.c
--- 25/kernel/kmod.c~set_cpus_allowed-fix	2004-02-11 21:18:22.000000000 -0800
+++ 25-akpm/kernel/kmod.c	2004-02-11 21:18:22.000000000 -0800
@@ -149,6 +149,7 @@ struct subprocess_info {
 static int ____call_usermodehelper(void *data)
 {
 	struct subprocess_info *sub_info = data;
+	static cpumask_t all_cpus = CPU_MASK_ALL;
 	int retval;
 
 	/* Unblock all signals. */
@@ -160,12 +161,12 @@ static int ____call_usermodehelper(void 
 	spin_unlock_irq(&current->sighand->siglock);
 
 	/* We can run anywhere, unlike our parent keventd(). */
-	set_cpus_allowed(current, CPU_MASK_ALL);
+	set_cpus_allowed(current, all_cpus);
 	/* As a kernel thread which was bound to a specific cpu,
 	   migrate_all_tasks wouldn't touch us.  Avoid running child
 	   on dying CPU. */
 	if (cpu_is_offline(smp_processor_id()))
-		migrate_to_cpu(any_online_cpu(CPU_MASK_ALL));
+		migrate_to_cpu(any_online_cpu(all_cpus));
 
 	retval = -EPERM;
 	if (current->fs->root)
diff -puN kernel/kthread.c~set_cpus_allowed-fix kernel/kthread.c
--- 25/kernel/kthread.c~set_cpus_allowed-fix	2004-02-11 21:18:22.000000000 -0800
+++ 25-akpm/kernel/kthread.c	2004-02-11 21:18:22.000000000 -0800
@@ -35,6 +35,7 @@ static int kthread(void *_create)
 	void *data;
 	sigset_t blocked;
 	int ret = -EINTR;
+	static cpumask_t all_cpus = CPU_MASK_ALL;
 
 	/* Copy data: it's on keventd's stack */
 	threadfn = create->threadfn;
@@ -46,13 +47,13 @@ static int kthread(void *_create)
 	flush_signals(current);
 
 	/* By default we can run anywhere, unlike keventd. */
-	set_cpus_allowed(current, CPU_MASK_ALL);
+	set_cpus_allowed(current, all_cpus);
 
 	/* As a kernel thread which was bound to a specific cpu,
 	   migrate_all_tasks wouldn't touch us.  Avoid running on
 	   dying CPU. */
 	if (cpu_is_offline(smp_processor_id()))
-		migrate_to_cpu(any_online_cpu(CPU_MASK_ALL));
+		migrate_to_cpu(any_online_cpu(all_cpus));
 
 	/* OK, tell user we're spawned, wait for stop or wakeup */
 	__set_current_state(TASK_INTERRUPTIBLE);

_