[patch] kvm: fix !SMP build error

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Avi Kivity <avi@...>
Cc: Jeff Garzik <jeff@...>, Adrian Bunk <bunk@...>, LKML <linux-kernel@...>, <akpm@...>, Linus Torvalds <torvalds@...>
Date: Wednesday, October 24, 2007 - 8:32 am

* Avi Kivity <avi@qumranet.com> wrote:


i have triggered this and fixed it the right way - see the patch below. 
This fixes the 2.6.24-rc1 build error.

	Ingo

------------------->
Subject: kvm: fix !SMP build error
From: Ingo Molnar <mingo@elte.hu>

fix !SMP build error:

drivers/kvm/kvm_main.c: In function 'kvm_flush_remote_tlbs':
drivers/kvm/kvm_main.c:220: error: implicit declaration of function 'smp_call_function_mask'

(and also avoid unused function warning related to up_smp_call_function()
not making use of the 'func' parameter.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 include/linux/smp.h |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Index: linux/include/linux/smp.h
===================================================================
--- linux.orig/include/linux/smp.h
+++ linux/include/linux/smp.h
@@ -84,11 +84,12 @@ void smp_prepare_boot_cpu(void);
  *	These macros fold the SMP functionality into a single CPU system
  */
 #define raw_smp_processor_id()			0
-static inline int up_smp_call_function(void)
+static inline int up_smp_call_function(void (*func)(void *), void *info)
 {
 	return 0;
 }
-#define smp_call_function(func,info,retry,wait)	(up_smp_call_function())
+#define smp_call_function(func,info,retry,wait) \
+			(up_smp_call_function(func, info))
 #define on_each_cpu(func,info,retry,wait)	\
 	({					\
 		local_irq_disable();		\
@@ -107,6 +108,8 @@ static inline void smp_send_reschedule(i
 	local_irq_enable();	\
 	0;			\
 })
+#define smp_call_function_mask(mask,func,info,wait) \
+			(up_smp_call_function(func, info))
 
 #endif /* !SMP */
 
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 6/12] KVM: work around SMP requirement, Jeff Garzik, (Tue Oct 23, 6:36 pm)
Re: [PATCH 6/12] KVM: work around SMP requirement, Adrian Bunk, (Tue Oct 23, 6:44 pm)
Re: [PATCH 6/12] KVM: work around SMP requirement, Jeff Garzik, (Tue Oct 23, 6:46 pm)
Re: [PATCH 6/12] KVM: work around SMP requirement, Avi Kivity, (Wed Oct 24, 4:36 am)
[patch] kvm: fix !SMP build error, Ingo Molnar, (Wed Oct 24, 8:32 am)
Re: [patch] kvm: fix !SMP build error, Ingo Molnar, (Wed Oct 24, 8:36 am)
Re: [patch] kvm: fix !SMP build error, Ingo Molnar, (Wed Oct 24, 2:11 pm)
Re: [patch] kvm: fix !SMP build error, Randy Dunlap, (Wed Oct 31, 11:34 pm)
Re: [patch] kvm: fix !SMP build error, Ingo Molnar, (Thu Nov 1, 4:31 am)
Re: [patch] kvm: fix !SMP build error, Avi Kivity, (Thu Nov 1, 9:10 am)
Re: [patch] kvm: fix !SMP build error, Ingo Molnar, (Thu Nov 1, 10:59 am)
Re: [patch] kvm: fix !SMP build error, Avi Kivity, (Thu Nov 1, 5:16 pm)