From: kgene.kim@samsung.com (Kukjin Kim)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: SAMSUNG: Gracefully exit on suspend failure
Date: Wed, 09 Jan 2013 16:32:42 -0800 [thread overview]
Message-ID: <00ab01cdeeca$02a75e60$07f61b20$@samsung.com> (raw)
In-Reply-To: <1357729952-14881-1-git-send-email-a.kesavan@samsung.com>
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@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
next prev parent reply other threads:[~2013-01-10 0:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-09 11:12 [PATCH] ARM: SAMSUNG: Gracefully exit on suspend failure Abhilash Kesavan
2013-01-09 19:46 ` Kyungmin Park
2013-01-09 19:52 ` Russell King - ARM Linux
2013-01-18 13:10 ` Abhilash Kesavan
2013-01-10 0:32 ` Kukjin Kim [this message]
2013-01-18 13:10 ` Abhilash Kesavan
2013-01-18 13:18 ` [PATCH v2] " Abhilash Kesavan
2013-01-25 18:40 ` Kukjin Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='00ab01cdeeca$02a75e60$07f61b20$@samsung.com' \
--to=kgene.kim@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).