From c65b3f8832a25e0730a6790553037120580cfa72 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 24 Nov 2008 11:11:20 +0000 Subject: 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 . Signed-off-by: Jan Beulich --- unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c | 4 ++++ unmodified_drivers/linux-2.6/platform-pci/platform-compat.c | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'unmodified_drivers/linux-2.6/platform-pci') diff --git a/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c b/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c index 08bf645ef7..ad667128a2 100644 --- a/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c +++ b/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c @@ -34,7 +34,11 @@ static void ap_suspend(void *_info) atomic_dec(&info->nr_spinning); } +#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 #else /* !defined(CONFIG_SMP) */ diff --git a/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c b/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c index 2b35c5c757..e4a766a909 100644 --- a/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c +++ b/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c @@ -14,7 +14,11 @@ EXPORT_SYMBOL(system_state); 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 } #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8) -- cgit v1.2.3