All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch, -rc6] x86_64: UP build fixes
@ 2006-11-16  8:48 Ingo Molnar
  2006-11-16  8:58 ` Andrew Morton
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Ingo Molnar @ 2006-11-16  8:48 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Andi Kleen, Linus Torvalds, linux-kernel

Subject: x86_64: UP build fixes
From: Ingo Molnar <mingo@elte.hu>

x86_64 does not build cleanly on UP:

arch/x86_64/kernel/vsyscall.c: In function 'cpu_vsyscall_notifier':
arch/x86_64/kernel/vsyscall.c:282: warning: implicit declaration of function 'smp_call_function_single'
arch/x86_64/kernel/vsyscall.c: At top level:
arch/x86_64/kernel/vsyscall.c:279: warning: 'cpu_vsyscall_notifier' defined but not used

this patch fixes it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 include/asm-x86_64/smp.h |   11 ++---------
 include/linux/cpu.h      |    2 +-
 include/linux/smp.h      |    9 +++++++++
 3 files changed, 12 insertions(+), 10 deletions(-)

Index: linux/include/asm-x86_64/smp.h
===================================================================
--- linux.orig/include/asm-x86_64/smp.h
+++ linux/include/asm-x86_64/smp.h
@@ -115,16 +115,9 @@ static __inline int logical_smp_processo
 }
 
 #ifdef CONFIG_SMP
-#define cpu_physical_id(cpu)		x86_cpu_to_apicid[cpu]
+# define cpu_physical_id(cpu)		x86_cpu_to_apicid[cpu]
 #else
-#define cpu_physical_id(cpu)		boot_cpu_id
-static inline int smp_call_function_single(int cpuid, void (*func) (void *info),
-				void *info, int retry, int wait)
-{
-	/* Disable interrupts here? */
-	func(info);
-	return 0;
-}
+# define cpu_physical_id(cpu)		boot_cpu_id
 #endif /* !CONFIG_SMP */
 #endif
 
Index: linux/include/linux/cpu.h
===================================================================
--- linux.orig/include/linux/cpu.h
+++ linux/include/linux/cpu.h
@@ -81,7 +81,7 @@ int cpu_down(unsigned int cpu);
 #define lock_cpu_hotplug()	do { } while (0)
 #define unlock_cpu_hotplug()	do { } while (0)
 #define lock_cpu_hotplug_interruptible() 0
-#define hotcpu_notifier(fn, pri)	do { } while (0)
+#define hotcpu_notifier(fn, pri)	do { (void)(fn); } while (0)
 #define register_hotcpu_notifier(nb)	do { } while (0)
 #define unregister_hotcpu_notifier(nb)	do { } while (0)
 
Index: linux/include/linux/smp.h
===================================================================
--- linux.orig/include/linux/smp.h
+++ linux/include/linux/smp.h
@@ -100,6 +100,15 @@ static inline void smp_send_reschedule(i
 #define num_booting_cpus()			1
 #define smp_prepare_boot_cpu()			do {} while (0)
 
+static inline int
+smp_call_function_single(int cpuid, void (*func) (void *info), void *info,
+			 int retry, int wait)
+{
+	func(info);
+
+	return 0;
+}
+
 #endif /* !SMP */
 
 /*

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2006-11-17  7:40 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-16  8:48 [patch, -rc6] x86_64: UP build fixes Ingo Molnar
2006-11-16  8:58 ` Andrew Morton
2006-11-16  9:28   ` Ingo Molnar
2006-11-16  9:45     ` Ingo Molnar
2006-11-16  9:01 ` Andi Kleen
2006-11-16  9:17   ` Andrew Morton
2006-11-16  9:22     ` Andi Kleen
2006-11-16  9:48       ` Ingo Molnar
2006-11-16 10:09         ` Andi Kleen
2006-11-16 12:29           ` Ingo Molnar
2006-11-16  9:03 ` Ingo Molnar
2006-11-16  9:32   ` [patch] hotplug CPU: clean up hotcpu_notifier() use Ingo Molnar
2006-11-16 21:59     ` Linus Torvalds
2006-11-17  3:52       ` Ingo Molnar
2006-11-17  6:02         ` Linus Torvalds
2006-11-17  7:28           ` Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.