diff options
author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2014-05-08 11:54:02 -0400 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2014-05-12 12:20:24 -0400 |
commit | 79390289cfeb6d0f4295ca32a54630c93154428e (patch) | |
tree | ab2833e8f2126067c40cebed76a84ecb82143f86 /arch | |
parent | aa8532c32216ae07c3813b9aeb774517878a7573 (diff) |
arm,arm64/xen: introduce HYPERVISOR_suspend()
Introduce HYPERVISOR_suspend() and a few additional empty stubs for
Xen arch specific functions called by drivers/xen/manage.c.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/include/asm/xen/hypercall.h | 10 | ||||
-rw-r--r-- | arch/arm/xen/enlighten.c | 8 |
2 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/include/asm/xen/hypercall.h b/arch/arm/include/asm/xen/hypercall.h index 7658150488d6..712b50e0a6dc 100644 --- a/arch/arm/include/asm/xen/hypercall.h +++ b/arch/arm/include/asm/xen/hypercall.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #define _ASM_ARM_XEN_HYPERCALL_H | 34 | #define _ASM_ARM_XEN_HYPERCALL_H |
35 | 35 | ||
36 | #include <xen/interface/xen.h> | 36 | #include <xen/interface/xen.h> |
37 | #include <xen/interface/sched.h> | ||
37 | 38 | ||
38 | long privcmd_call(unsigned call, unsigned long a1, | 39 | long privcmd_call(unsigned call, unsigned long a1, |
39 | unsigned long a2, unsigned long a3, | 40 | unsigned long a2, unsigned long a3, |
@@ -50,6 +51,15 @@ int HYPERVISOR_vcpu_op(int cmd, int vcpuid, void *extra_args); | |||
50 | int HYPERVISOR_tmem_op(void *arg); | 51 | int HYPERVISOR_tmem_op(void *arg); |
51 | int HYPERVISOR_multicall(struct multicall_entry *calls, uint32_t nr); | 52 | int HYPERVISOR_multicall(struct multicall_entry *calls, uint32_t nr); |
52 | 53 | ||
54 | static inline int | ||
55 | HYPERVISOR_suspend(unsigned long start_info_mfn) | ||
56 | { | ||
57 | struct sched_shutdown r = { .reason = SHUTDOWN_suspend }; | ||
58 | |||
59 | /* start_info_mfn is unused on ARM */ | ||
60 | return HYPERVISOR_sched_op(SCHEDOP_shutdown, &r); | ||
61 | } | ||
62 | |||
53 | static inline void | 63 | static inline void |
54 | MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va, | 64 | MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va, |
55 | unsigned int new_val, unsigned long flags) | 65 | unsigned int new_val, unsigned long flags) |
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index 488ecdb5550d..1e632430570b 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c | |||
@@ -339,6 +339,14 @@ static int __init xen_pm_init(void) | |||
339 | } | 339 | } |
340 | late_initcall(xen_pm_init); | 340 | late_initcall(xen_pm_init); |
341 | 341 | ||
342 | |||
343 | /* empty stubs */ | ||
344 | void xen_arch_pre_suspend(void) { } | ||
345 | void xen_arch_post_suspend(int suspend_cancelled) { } | ||
346 | void xen_timer_resume(void) { } | ||
347 | void xen_arch_resume(void) { } | ||
348 | |||
349 | |||
342 | /* In the hypervisor.S file. */ | 350 | /* In the hypervisor.S file. */ |
343 | EXPORT_SYMBOL_GPL(HYPERVISOR_event_channel_op); | 351 | EXPORT_SYMBOL_GPL(HYPERVISOR_event_channel_op); |
344 | EXPORT_SYMBOL_GPL(HYPERVISOR_grant_table_op); | 352 | EXPORT_SYMBOL_GPL(HYPERVISOR_grant_table_op); |