[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 10/19] xen/arm: Suspend/resume GIC on system suspend/resume



Hi,

On 07/10/2022 11:32, Mykyta Poturai wrote:
From: Mirela Simonovic <mirela.simonovic@xxxxxxxxxx>

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/gic.c     |  4 +---
  xen/arch/arm/suspend.c | 14 ++++++++++++++
  2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index e9feb1fd3b..ef90664929 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -476,9 +476,7 @@ int gic_suspend(void)
      if ( !gic_hw_ops->suspend || !gic_hw_ops->resume )
          return -ENOSYS;
- gic_hw_ops->suspend();
-
-    return 0;
+    return gic_hw_ops->suspend();

This should be part of the previous patch.

Cheers,

--
Julien Grall



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.