From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: [PATCH] unmodified driver build fixes Date: Fri, 21 Nov 2008 13:52:00 +0000 Message-ID: <4926CB10.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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 Cc: Charles Arnold List-Id: xen-devel@lists.xenproject.org Make the drivers build properly in a 2.6.27 environment as well as against a kernel with pv-ops Xen configured on (in the latter case more work would be needed to also make the drivers work, as there's a large number of duplicate exports). Portions from Charles Arnold . Signed-off-by: Jan Beulich Index: 2008-11-20/unmodified_drivers/linux-2.6/balloon/Kbuild =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2008-11-20.orig/unmodified_drivers/linux-2.6/balloon/Kbuild 2007-04-05 = 17:35:34.000000000 +0200 +++ 2008-11-20/unmodified_drivers/linux-2.6/balloon/Kbuild 2008-11-21 = 10:14:15.000000000 +0100 @@ -4,6 +4,5 @@ obj-m =3D xen-balloon.o =20 EXTRA_CFLAGS +=3D -I$(M)/platform-pci =20 -xen-balloon-objs =3D -xen-balloon-objs +=3D balloon.o -xen-balloon-objs +=3D sysfs.o +xen-balloon-y :=3D balloon.o sysfs.o +xen-balloon-$(CONFIG_XEN_SCRUB_PAGES) +=3D scrub.o Index: 2008-11-20/unmodified_drivers/linux-2.6/mkbuildtree =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2008-11-20.orig/unmodified_drivers/linux-2.6/mkbuildtree 2008-02-22 = 10:04:45.000000000 +0100 +++ 2008-11-20/unmodified_drivers/linux-2.6/mkbuildtree 2008-11-21 = 10:16:40.000000000 +0100 @@ -53,6 +53,7 @@ i[34567]86|x86_64) ln -sf ${XL}/include/asm-x86/mach-xen/asm/synch_bitops*.h = include/asm ln -sf ${XL}/include/asm-x86/mach-xen/asm/maddr*.h include/asm ln -sf ${XL}/include/asm-x86/mach-xen/asm/gnttab_dma.h include/asm= + ln -sf ${XL}/arch/x86/lib/scrub.c balloon else if [ $uname =3D x86_64 ]; then mkdir -p include/asm-i386 Index: 2008-11-20/unmodified_drivers/linux-2.6/platform-pci/platform-compat= .c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2008-11-20.orig/unmodified_drivers/linux-2.6/platform-pci/platform-comp= at.c 2007-04-16 09:26:34.000000000 +0200 +++ 2008-11-20/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c = 2008-11-21 09:52:00.000000000 +0100 @@ -14,7 +14,11 @@ EXPORT_SYMBOL(system_state); =20 void ctrl_alt_del(void) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) kill_proc(1, SIGINT, 1); /* interrupt init */ +#else + kill_cad_pid(SIGINT, 1); +#endif } =20 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8) Index: 2008-11-20/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.= c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2008-11-20.orig/unmodified_drivers/linux-2.6/platform-pci/machine_reboo= t.c 2008-10-24 11:21:38.000000000 +0200 +++ 2008-11-20/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c = 2008-11-21 09:41:52.000000000 +0100 @@ -34,7 +34,11 @@ static void ap_suspend(void *_info) atomic_dec(&info->nr_spinning); } =20 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) #define initiate_ap_suspend(i) smp_call_function(ap_suspend, i, 0, 0) +#else +#define initiate_ap_suspend(i) smp_call_function(ap_suspend, i, 0) +#endif =20 #else /* !defined(CONFIG_SMP) */ =20