Skip to contentSkip to conversation

2.5.32-mm1

DISCUSSION Rusty Russell 1 participant 1 message Aug 29, 2002 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

In message <[email protected]> you write:

Quoted 2 lines

I just deleted the cpu_possible() test - changed it to loop across NR_CPUS.

Still, it's a good idea to have a UP version, and fix that naked reference to "cpu" in cpu_online() which just makes me damn nervous.

Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

Name: cpu_possible for UP
Author: Rusty Russell
Status: Trivial

D: This patch defines cpu_possible() for non-SMP.

include/linux/smp.h +2 -1
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.32/include/linux/smp.h working-2.5.32-cpu-possible/include/linux/smp.h
@@ -94,9 +94,10 @@ int cpu_up(unsigned int cpu);
 static inline void smp_send_reschedule(int cpu) { }
 static inline void smp_send_reschedule_all(void) { }
 #define cpu_online_map				1
-#define cpu_online(cpu)				({ cpu; 1; })
+#define cpu_online(cpu)				({ BUG_ON((cpu) != 0); 1; })
 #define num_online_cpus()			1
 #define num_booting_cpus()			1
+#define cpu_possible(i)				({ BUG_ON((cpu) != 0); 1; })
 
 struct notifier_block;