Commit 8b8c90a3 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] cpu_online() has odd semantics

Make sure the cpu argument to cpu_online() is evaluated for
side effects on UP too.
parent ad625ee4
...@@ -87,7 +87,7 @@ extern volatile int smp_msg_id; ...@@ -87,7 +87,7 @@ extern volatile int smp_msg_id;
static inline void smp_send_reschedule(int cpu) { } static inline void smp_send_reschedule(int cpu) { }
static inline void smp_send_reschedule_all(void) { } static inline void smp_send_reschedule_all(void) { }
#define cpu_online_map 1 #define cpu_online_map 1
#define cpu_online(cpu) 1 #define cpu_online(cpu) ({ cpu; 1; })
#define num_online_cpus() 1 #define num_online_cpus() 1
#define __per_cpu_data #define __per_cpu_data
#define per_cpu(var, cpu) var #define per_cpu(var, cpu) var
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment