1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/types.h>
3 #include <linux/tick.h>
6 #include <xen/interface/xen.h>
7 #include <xen/grant_table.h>
8 #include <xen/events.h>
10 #include <asm/xen/hypercall.h>
11 #include <asm/xen/page.h>
12 #include <asm/fixmap.h>
18 void xen_arch_pre_suspend(void)
24 void xen_arch_post_suspend(int cancelled)
27 xen_pv_post_suspend(cancelled);
29 xen_hvm_post_suspend(cancelled);
32 static void xen_vcpu_notify_restore(void *data)
34 /* Boot processor notified via generic timekeeping_resume() */
35 if (smp_processor_id() == 0)
41 static void xen_vcpu_notify_suspend(void *data)
46 void xen_arch_resume(void)
50 on_each_cpu(xen_vcpu_notify_restore, NULL, 1);
52 for_each_online_cpu(cpu)
56 void xen_arch_suspend(void)
60 for_each_online_cpu(cpu)
63 on_each_cpu(xen_vcpu_notify_suspend, NULL, 1);