Hi,

On 07/10/2022 11:32, Mykyta Poturai wrote:
From: Mirela Simonovic <[email protected]>

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 <[email protected]>
Signed-off-by: Saeed Nowshadi <[email protected]>
---
  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

Reply via email to