WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux: Fix current_vcpu_info for UP case
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Fri, 23 Feb 2007 09:05:58 +0000
Delivery-date: Fri, 23 Feb 2007 01:04:27 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] linux: Fix current_vcpu_info for UP case, Jan Beulich <=