Re: Linux 2.5.23 cpu_online_map undeclared

From: Linus Torvalds (torvalds@transmeta.com)
Date: Wed Jun 19 2002 - 00:36:08 EST


In article <3D0FF715.7040601@linuxhq.com>,
John Weber <john.weber@linuxhq.com> wrote:
>I am running on a UP system, so I don't believe that cpu_online_map
>should be declared. Any suggestions?

Actually, it _should_ be declared, it's just that on UP it should be
defined to the constant 1.

Somehow that #define got dropped by the hotplug-CPU stuff.

To fix, just add a

        #define cpu_online_map 1

to the non-SMP parts of include/linus/smp.h. The patch looks something
like the appended (totally untested) thing.

Does that make UP happier?

                Linus

--- 1.8/include/linux/smp.h Mon Jun 17 23:25:22 2002
+++ edited/include/linux/smp.h Tue Jun 18 22:30:47 2002
@@ -86,6 +86,7 @@
 #define smp_call_function(func,info,retry,wait) ({ 0; })
 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) 1
 #define num_online_cpus() 1
 #define __per_cpu_data
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jun 23 2002 - 22:00:18 EST