[PATCH] ARM: SAMSUNG: Gracefully exit on suspend failure
Kukjin Kim
kgene.kim at samsung.com
Wed Jan 9 19:32:42 EST 2013
Abhilash Kesavan wrote:
>
> As per the Exynos5250 User Manual:
>
> When there are pending interrupt events, WFI/WFE instruction are
> ignored. To cancel the power-down sequence follow these steps:
> 1) Disable system power-down through CENTRAL_SEQ_CONFIGURATION
> and CENTRAL_SEQ_CONFIGURATION_DMC registers
> 2) Clear WAKEUP_STAT register
> 3) Enable interrupt service routine for CPU
>
> Code for early wakeup for exynos already exists; remove the panic
> on suspend failure, clear the wakeup state register and return
> error from cpu_suspend to indicate a failed suspend (to a user
> daemon).
>
> Older Samsung SoCs have similar panics and I have removed them all.
> Haven't touched the S3C2410 sleep code.
>
> Signed-off-by: Abhilash Kesavan <a.kesavan at samsung.com>
> ---
> arch/arm/mach-exynos/pm.c | 6 ++++--
> arch/arm/mach-s3c24xx/pm-s3c2412.c | 3 ++-
> arch/arm/mach-s3c24xx/pm-s3c2416.c | 3 ++-
> arch/arm/mach-s3c64xx/pm.c | 3 ++-
> arch/arm/mach-s5p64x0/pm.c | 4 ++--
> arch/arm/mach-s5pv210/pm.c | 4 ++--
> arch/arm/plat-samsung/pm.c | 5 ++++-
> 7 files changed, 18 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
> index f459afd..55df38cd 100644
> --- a/arch/arm/mach-exynos/pm.c
> +++ b/arch/arm/mach-exynos/pm.c
> @@ -92,8 +92,8 @@ static int exynos_cpu_suspend(unsigned long arg)
> /* issue the standby signal into the pm unit. */
> cpu_do_idle();
>
> - /* we should never get past here */
> - panic("sleep resumed to originator?");
> + pr_err("Failed to suspend the system\n");
> + return -EBUSY;
This can be happened under non-error situation, so this should be:
+ pr_info("sleep resumed to originator?");
+ return 1; /* abort suspend */
[...]
- Kukjin
More information about the linux-arm-kernel
mailing list