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).
Signed-off-by: Mirela Simonovic <[email protected]> Signed-off-by: Saeed Nowshadi <[email protected]> --- 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 a05aea9c25..6d7d69539b 100644 --- a/xen/arch/arm/suspend.c +++ b/xen/arch/arm/suspend.c @@ -1,5 +1,6 @@ #include <xen/sched.h> #include <xen/cpu.h> +#include <xen/console.h> #include <asm/cpufeature.h> #include <asm/event.h> #include <asm/psci.h> @@ -149,6 +150,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(); @@ -175,6 +185,10 @@ static long system_suspend(void *data) */ mmu_init_secondary_cpu(); +resume_console: + console_resume(); + dprintk(XENLOG_DEBUG, "Resume\n"); + gic_resume(); resume_irqs: -- 2.13.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
