ia64/xen-unstable
changeset 18824:0b8c6c91c5a4
pv-on-hvm drivers: build fixes for Linux 2.6.27+
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 <carnold@novell.com>.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
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 <carnold@novell.com>.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Mon Nov 24 11:11:20 2008 +0000 (2008-11-24) |
parents | cd45b5c95612 |
children | 285f8635f573 |
files | unmodified_drivers/linux-2.6/balloon/Kbuild unmodified_drivers/linux-2.6/mkbuildtree unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c unmodified_drivers/linux-2.6/platform-pci/platform-compat.c |
line diff
1.1 --- a/unmodified_drivers/linux-2.6/balloon/Kbuild Mon Nov 24 11:06:16 2008 +0000 1.2 +++ b/unmodified_drivers/linux-2.6/balloon/Kbuild Mon Nov 24 11:11:20 2008 +0000 1.3 @@ -4,6 +4,5 @@ obj-m = xen-balloon.o 1.4 1.5 EXTRA_CFLAGS += -I$(M)/platform-pci 1.6 1.7 -xen-balloon-objs = 1.8 -xen-balloon-objs += balloon.o 1.9 -xen-balloon-objs += sysfs.o 1.10 +xen-balloon-y := balloon.o sysfs.o 1.11 +xen-balloon-$(CONFIG_XEN_SCRUB_PAGES) += scrub.o
2.1 --- a/unmodified_drivers/linux-2.6/mkbuildtree Mon Nov 24 11:06:16 2008 +0000 2.2 +++ b/unmodified_drivers/linux-2.6/mkbuildtree Mon Nov 24 11:11:20 2008 +0000 2.3 @@ -53,6 +53,7 @@ i[34567]86|x86_64) 2.4 ln -sf ${XL}/include/asm-x86/mach-xen/asm/synch_bitops*.h include/asm 2.5 ln -sf ${XL}/include/asm-x86/mach-xen/asm/maddr*.h include/asm 2.6 ln -sf ${XL}/include/asm-x86/mach-xen/asm/gnttab_dma.h include/asm 2.7 + ln -sf ${XL}/arch/x86/lib/scrub.c balloon 2.8 else 2.9 if [ $uname = x86_64 ]; then 2.10 mkdir -p include/asm-i386
3.1 --- a/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c Mon Nov 24 11:06:16 2008 +0000 3.2 +++ b/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c Mon Nov 24 11:11:20 2008 +0000 3.3 @@ -34,7 +34,11 @@ static void ap_suspend(void *_info) 3.4 atomic_dec(&info->nr_spinning); 3.5 } 3.6 3.7 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) 3.8 #define initiate_ap_suspend(i) smp_call_function(ap_suspend, i, 0, 0) 3.9 +#else 3.10 +#define initiate_ap_suspend(i) smp_call_function(ap_suspend, i, 0) 3.11 +#endif 3.12 3.13 #else /* !defined(CONFIG_SMP) */ 3.14
4.1 --- a/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c Mon Nov 24 11:06:16 2008 +0000 4.2 +++ b/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c Mon Nov 24 11:11:20 2008 +0000 4.3 @@ -14,7 +14,11 @@ EXPORT_SYMBOL(system_state); 4.4 4.5 void ctrl_alt_del(void) 4.6 { 4.7 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) 4.8 kill_proc(1, SIGINT, 1); /* interrupt init */ 4.9 +#else 4.10 + kill_cad_pid(SIGINT, 1); 4.11 +#endif 4.12 } 4.13 4.14 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8)