From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Santosh Shilimkar <santosh.shilimkar@ti.com>,
khilman@linaro.org, tony@atomide.com
Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
Roger Quadros <rogerq@ti.com>
Subject: Re: [PATCH] ARM: OMAP4: Fix the boot regression with CPU_IDLE enabled
Date: Wed, 14 May 2014 21:44:14 +0200 [thread overview]
Message-ID: <5373C78E.7040301@linaro.org> (raw)
In-Reply-To: <1399991966-14582-1-git-send-email-santosh.shilimkar@ti.com>
On 05/13/2014 04:39 PM, Santosh Shilimkar wrote:
> On OMAP4 panda board, there have been several bug reports about boot
> hang and lock-ups with CPU_IDLE enabled. The root cause of the issue
> is missing interrupts while in idle state. Commit cb7094e8 {cpuidle / omap4 :
> use CPUIDLE_FLAG_TIMER_STOP flag} moved the broadcast notifiers to common
> code for right reasons but on OMAP4 which suffers from a nasty ROM code
> bug with GIC, commit ff999b8a {ARM: OMAP4460: Workaround for ROM bug ..},
> we loose interrupts which leads to issues like lock-up, hangs etc.
>
> Patch reverts commit cb7094 {cpuidle / omap4 : use CPUIDLE_FLAG_TIMER_STOP
> flag} to avoid the issue. With this change, OMAP4 panda boards, the mentioned
> issues are getting fixed. We no longer loose interrupts which was the cause
> of the regression.
>
> Cc: Roger Quadros <rogerq@ti.com>
> Cc: Kevin Hilman <khilman@linaro.org>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Reported-tested-by: Roger Quadros <rogerq@ti.com>
> Reported-tested-by: Kevin Hilman <khilman@linaro.org>
> Tested-by: Tony Lindgren <tony@atomide.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> ---
> arch/arm/mach-omap2/cpuidle44xx.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c
> index 01fc710..3e169d9 100644
> --- a/arch/arm/mach-omap2/cpuidle44xx.c
> +++ b/arch/arm/mach-omap2/cpuidle44xx.c
> @@ -14,6 +14,7 @@
> #include <linux/cpuidle.h>
> #include <linux/cpu_pm.h>
> #include <linux/export.h>
> +#include <linux/clockchips.h>
>
> #include <asm/cpuidle.h>
> #include <asm/proc-fns.h>
> @@ -83,6 +84,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
> {
> struct idle_statedata *cx = state_ptr + index;
> u32 mpuss_can_lose_context = 0;
> + int cpu_id = smp_processor_id();
>
> /*
> * CPU0 has to wait and stay ON until CPU1 is OFF state.
> @@ -110,6 +112,8 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
> mpuss_can_lose_context = (cx->mpu_state == PWRDM_POWER_RET) &&
> (cx->mpu_logic_state == PWRDM_POWER_OFF);
>
> + clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu_id);
> +
> /*
> * Call idle CPU PM enter notifier chain so that
> * VFP and per CPU interrupt context is saved.
> @@ -165,6 +169,8 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
> if (dev->cpu == 0 && mpuss_can_lose_context)
> cpu_cluster_pm_exit();
>
> + clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu_id);
> +
> fail:
> cpuidle_coupled_parallel_barrier(dev, &abort_barrier);
> cpu_done[dev->cpu] = false;
> @@ -189,8 +195,7 @@ static struct cpuidle_driver omap4_idle_driver = {
> /* C2 - CPU0 OFF + CPU1 OFF + MPU CSWR */
> .exit_latency = 328 + 440,
> .target_residency = 960,
> - .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_COUPLED |
> - CPUIDLE_FLAG_TIMER_STOP,
> + .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_COUPLED,
> .enter = omap_enter_idle_coupled,
> .name = "C2",
> .desc = "CPUx OFF, MPUSS CSWR",
> @@ -199,8 +204,7 @@ static struct cpuidle_driver omap4_idle_driver = {
> /* C3 - CPU0 OFF + CPU1 OFF + MPU OSWR */
> .exit_latency = 460 + 518,
> .target_residency = 1100,
> - .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_COUPLED |
> - CPUIDLE_FLAG_TIMER_STOP,
> + .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_COUPLED,
> .enter = omap_enter_idle_coupled,
> .name = "C3",
> .desc = "CPUx OFF, MPUSS OSWR",
Shouldn't the broadcast timer to be setup with
CLOCK_EVT_NOTIFY_BROADCAST_ON also ?
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-05-14 19:44 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-13 14:39 [PATCH] ARM: OMAP4: Fix the boot regression with CPU_IDLE enabled Santosh Shilimkar
2014-05-14 15:22 ` Tony Lindgren
2014-05-14 19:44 ` Daniel Lezcano [this message]
2014-05-14 19:50 ` Santosh Shilimkar
2014-05-14 20:02 ` Daniel Lezcano
2014-05-14 20:56 ` Tony Lindgren
2014-05-14 23:31 ` Tony Lindgren
2014-05-16 0:13 ` Tony Lindgren
2014-05-16 0:40 ` Tony Lindgren
2014-05-14 21:18 ` Santosh Shilimkar
2014-05-15 17:03 ` Santosh Shilimkar
2014-05-15 17:50 ` Daniel Lezcano
2014-05-15 17:54 ` Santosh Shilimkar
2014-05-15 18:29 ` Santosh Shilimkar
2014-05-16 0:33 ` Alex Shi
2014-05-16 13:43 ` Santosh Shilimkar
2014-05-16 21:29 ` Tony Lindgren
2014-05-19 16:45 ` Daniel Lezcano
2014-05-19 17:23 ` Tony Lindgren
2014-05-19 17:34 ` Santosh Shilimkar
2014-05-19 17:51 ` Tony Lindgren
2014-05-19 18:06 ` Daniel Lezcano
2014-05-19 19:36 ` Tony Lindgren
2014-05-19 19:45 ` Daniel Lezcano
2014-05-19 21:18 ` Tobias Jakobi
2014-05-19 22:42 ` Tony Lindgren
2014-05-23 14:44 ` Tony Lindgren
2014-05-23 18:32 ` Tony Lindgren
[not found] ` <CAKnoXLxj42veWCbRjX98iT3FNAb92J4yR+UAL716JFSOb=pcrQ@mail.gmail.com>
2014-05-27 20:34 ` Tony Lindgren
2014-05-27 21:03 ` Santosh Shilimkar
2014-05-27 21:06 ` Daniel Lezcano
2014-05-19 20:00 ` Santosh Shilimkar
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=5373C78E.7040301@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=khilman@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=rogerq@ti.com \
--cc=santosh.shilimkar@ti.com \
--cc=tony@atomide.com \
/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).