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

Re: [PATCH 16/19] xen/arm: Suspend/resume console on Xen suspend/resume



Hi,

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

This is done using generic console_suspend/resume functions that cause
uart driver specific suspend/resume handlers to be called for each
initialized port (if the port has suspend/resume driver handlers
implemented).

Looking at the UART driver for Arm, most of them (if not all) implement suspend/resume with BUG(). So don't you need to properly implement them?


Signed-off-by: Mirela Simonovic <mirela.simonovic@xxxxxxxxxx>
Signed-off-by: Saeed Nowshadi <saeed.nowshadi@xxxxxxxxxx>

Your signed-off-by is missing.

---
  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 4a690eac3b..cf3aab0099 100644
--- a/xen/arch/arm/suspend.c
+++ b/xen/arch/arm/suspend.c
@@ -14,6 +14,7 @@
#include <xen/sched.h>
  #include <xen/cpu.h>
+#include <xen/console.h>
  #include <asm/cpufeature.h>
  #include <asm/event.h>
  #include <asm/psci.h>
@@ -166,6 +167,15 @@ static long system_suspend(void *data)
          goto resume_irqs;
      }
+ dprintk(XENLOG_DEBUG, "Suspend\n");
+    status = console_suspend();
+    if ( status )
+    {
+        dprintk(XENLOG_ERR, "Failed to suspend the console, err=%d\n", status);
+        system_state = SYS_STATE_resume;
+        goto resume_console;
+    }
+
      if ( hyp_suspend(&cpu_context) )
      {
          status = call_psci_system_suspend();
@@ -192,6 +202,10 @@ static long system_suspend(void *data)
       */
      mmu_init_secondary_cpu();
+resume_console:
+    console_resume();
+    dprintk(XENLOG_DEBUG, "Resume\n");
+
      gic_resume();
resume_irqs:

Cheers,

--
Julien Grall



 


Rackspace

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