This patch introduces the missing suspend-related stubs for ARM. It also
introduces the new arch_suspend() function in order to keep the logic in
kernel_suspend() arch independent.
Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
{
}
+void arch_pre_suspend(void)
+{
+}
+
+int arch_suspend(void)
+{
+ printk("Suspend not supported on ARM. Aborting.");
+ do_exit();
+ return 1;
+}
+
+void arch_post_suspend(int canceled)
+{
+}
+
void
arch_do_exit(void)
{
arch_mm_pre_suspend();
}
+int arch_suspend(void)
+{
+ /*
+ * This hypercall returns 1 if the suspend
+ * was cancelled and 0 if resuming in a new domain
+ */
+ return HYPERVISOR_suspend(virt_to_mfn(start_info_ptr));
+}
+
void arch_post_suspend(int canceled)
{
#if CONFIG_PARAVIRT
#endif
void arch_pre_suspend(void);
+int arch_suspend(void);
void arch_post_suspend(int canceled);
void arch_fini(void);
#include <mini-os/xmalloc.h>
-extern start_info_t *start_info_ptr;
-
#ifdef CONFIG_XENBUS
static const char *path = "control/shutdown";
static const char *token = "control/shutdown";
pre_suspend();
arch_pre_suspend();
- /*
- * This hypercall returns 1 if the suspend
- * was cancelled and 0 if resuming in a new domain
- *
- * TODO Fix this for ARM
- */
- rc = HYPERVISOR_suspend(virt_to_mfn(start_info_ptr));
+ rc = arch_suspend();
arch_post_suspend(rc);
post_suspend(rc);