[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] linux: Fix current_vcpu_info for UP case



Under !CONFIG_SMP, smp.h is not always included and hence smp_processor_id()
not always visible.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: head-2007-02-08/include/asm-i386/mach-xen/asm/hypervisor.h
===================================================================
--- head-2007-02-08.orig/include/asm-i386/mach-xen/asm/hypervisor.h     
2007-02-22 16:36:47.000000000 +0100
+++ head-2007-02-08/include/asm-i386/mach-xen/asm/hypervisor.h  2007-02-23 
09:05:22.000000000 +0100
@@ -57,7 +57,11 @@
 extern shared_info_t *HYPERVISOR_shared_info;
 
 #define vcpu_info(cpu) (HYPERVISOR_shared_info->vcpu_info + (cpu))
+#ifdef CONFIG_SMP
 #define current_vcpu_info() vcpu_info(smp_processor_id())
+#else
+#define current_vcpu_info() vcpu_info(0)
+#endif
 
 #ifdef CONFIG_X86_32
 extern unsigned long hypervisor_virt_start;



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.