From: "Jan Beulich" Subject: [PATCH] linux: Fix current_vcpu_info for UP case Date: Fri, 23 Feb 2007 09:05:58 +0000 Message-ID: <45DEBC86.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Under !CONFIG_SMP, smp.h is not always included and hence smp_processor_id() not always visible. Signed-off-by: Jan Beulich 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;