aboutsummaryrefslogtreecommitdiffstats
path: root/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-04-10 15:31:53 +0100
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-04-10 15:31:53 +0100
commit20f278002607ff5af89581ae6ce1258dcd3f282a (patch)
treed1e461baa2c13863d3d172f0c2047270d386dfea /unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c
parente2492c5e9e72ffc0ddb2765080b579200fd8f1c8 (diff)
downloadxen-20f278002607ff5af89581ae6ce1258dcd3f282a.tar.gz
xen-20f278002607ff5af89581ae6ce1258dcd3f282a.tar.bz2
xen-20f278002607ff5af89581ae6ce1258dcd3f282a.zip
PV-on-HVM: Fixes for save/restore. Also gets rid of separate modules
reboot.ko and xenbus.ko. These are now part of xen-platform-pci.ko. Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c')
-rw-r--r--unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c b/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c
new file mode 100644
index 0000000000..d14bdbf1d9
--- /dev/null
+++ b/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c
@@ -0,0 +1,24 @@
+#include <linux/config.h>
+#include <xen/xenbus.h>
+#include "platform-pci.h"
+#include <asm/hypervisor.h>
+
+int __xen_suspend(int fast_suspend)
+{
+ int suspend_cancelled;
+
+ xenbus_suspend();
+ platform_pci_suspend();
+
+ suspend_cancelled = HYPERVISOR_shutdown(SHUTDOWN_suspend);
+
+ if (suspend_cancelled) {
+ platform_pci_suspend_cancel();
+ xenbus_suspend_cancel();
+ } else {
+ platform_pci_resume();
+ xenbus_resume();
+ }
+
+ return 0;
+}