|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 11/18] xen/arm: Suspend/resume GIC on system suspend/resume
GIC state is saved on system suspend by calling gic_suspend
(this function does not change current state of the GIC but only
saves the values of configuration registers).
The state of GIC has to be restored by calling gic_resume, but only
if the gic_suspend has succeeded. If gic_suspend fails, we'll just
restore interrupts configuration and abort suspend.
Signed-off-by: Mirela Simonovic <mirela.simonovic@xxxxxxxxxx>
Signed-off-by: Saeed Nowshadi <saeed.nowshadi@xxxxxxxxxx>
---
xen/arch/arm/suspend.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/xen/arch/arm/suspend.c b/xen/arch/arm/suspend.c
index 8e8e531d61..b7940fe03f 100644
--- a/xen/arch/arm/suspend.c
+++ b/xen/arch/arm/suspend.c
@@ -117,6 +117,7 @@ static void vcpu_suspend(register_t epoint, register_t cid)
static long system_suspend(void *data)
{
int status;
+ unsigned long flags;
BUG_ON(system_state != SYS_STATE_active);
@@ -130,8 +131,21 @@ static long system_suspend(void *data)
goto resume_nonboot_cpus;
}
+ local_irq_save(flags);
+ status = gic_suspend();
+ if ( status )
+ {
+ system_state = SYS_STATE_resume;
+ goto resume_irqs;
+ }
+
system_state = SYS_STATE_resume;
+ gic_resume();
+
+resume_irqs:
+ local_irq_restore(flags);
+
resume_nonboot_cpus:
rcu_barrier();
enable_nonboot_cpus();
--
2.13.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |