Skip to contentSkip to conversation

export i386 smp_call_function_mask() to modules

PATCH In review Laurent Vivier 2 participants 2 messages Aug 24, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 export i386 smp_call_function_mask() to modules

This patch export i386 smp_call_function_mask() with EXPORT_SYMBOL().

This function is needed by KVM to call a function on a set of CPUs.

 arch/i386/kernel/smp.c |    7 +++++++
 include/asm-i386/smp.h |    9 +++------
 2 files changed, 10 insertions(+), 6 deletions(-)
arch/i386/kernel/smp.c +7 -0
Index: kvm/arch/i386/kernel/smp.c
===================================================================
@@ -705,3 +705,10 @@ struct smp_ops smp_ops = {
 	.smp_send_reschedule = native_smp_send_reschedule,
 	.smp_call_function_mask = native_smp_call_function_mask,
 };
+
+int smp_call_function_mask(cpumask_t mask, void (*func) (void *info),
+			   void *info, int wait)
+{
+	return smp_ops.smp_call_function_mask(mask, func, info, wait);
+}
+EXPORT_SYMBOL(smp_call_function_mask);
include/asm-i386/smp.h +3 -6
Index: kvm/include/asm-i386/smp.h
===================================================================
@@ -92,12 +92,9 @@ static inline void smp_send_reschedule(i
 {
 	smp_ops.smp_send_reschedule(cpu);
 }
-static inline int smp_call_function_mask(cpumask_t mask,
-					 void (*func) (void *info), void *info,
-					 int wait)
-{
-	return smp_ops.smp_call_function_mask(mask, func, info, wait);
-}
+extern int smp_call_function_mask(cpumask_t mask,
+				  void (*func) (void *info), void *info,
+				  int wait);
 
 void native_smp_prepare_boot_cpu(void);
 void native_smp_prepare_cpus(unsigned int max_cpus);
#1 lore raw
Quoted 9 lines · On Fri, 24 Aug 2007 17:36:35 +0200 Laurent Vivier <[email protected]>…

This patch export i386 smp_call_function_mask() with EXPORT_SYMBOL().

This function is needed by KVM to call a function on a set of CPUs.

 arch/i386/kernel/smp.c |    7 +++++++
 include/asm-i386/smp.h |    9 +++------
 2 files changed, 10 insertions(+), 6 deletions(-)

hmm isn't it being an inline also making it available for KVM to use? If so... isn't your patch description entirely not matching what the code does?