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

[Xen-devel] [PATCH 1 of 4] unmodified_drivers: hide xen_cpuid_base() in version 2.6.38+


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Olaf Hering <olaf@xxxxxxxxx>
  • Date: Fri, 16 Mar 2012 08:48:05 +0100
  • Delivery-date: Fri, 16 Mar 2012 07:48:47 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1331883705 -3600
# Node ID 5504366919926f8a2d6fc7fdc392e6218ae6c702
# Parent  1b68427875f7ffe3025ea13c7f6e8cf71ce54769
unmodified_drivers: hide xen_cpuid_base() in version 2.6.38+

Allow compilation of PVonHVM drivers with forward-ported xenlinux
sources in openSuSE 12.1.  xen_cpuid_base() is now in mainline, the copy
in the xen tree leads to a compilation error.  The current state leads
to a compile error:

/usr/src/packages/BUILD/xen-4.2.24547/non-dbg/obj/default/platform-pci/platform-pci.c:121:
 error: redefinition of 'xen_cpuid_base'
/usr/src/linux-3.0.13-0.11/arch/x86/include/asm/xen/hypervisor.h:43: error: 
previous definition of 'xen_cpuid_base' was here

The reason is that the kernel sources are searched before the xen
sources for asm/hypervisor.h:

/usr/src/linux-3.0.13-0.11/arch/x86/include/asm/hypervisor.h
/usr/src/packages/BUILD/xen-4.2.24547/non-dbg/obj/default/include/asm/hypervisor.h

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

diff -r 1b68427875f7 -r 550436691992 
unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
--- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
@@ -118,6 +118,7 @@ unsigned long alloc_xen_mmio(unsigned lo
 
 #ifndef __ia64__
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 static uint32_t xen_cpuid_base(void)
 {
        uint32_t base, eax, ebx, ecx, edx;
@@ -136,6 +137,7 @@ static uint32_t xen_cpuid_base(void)
 
        return 0;
 }
+#endif
 
 static int init_hypercall_stubs(void)
 {

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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