From: Kevin Hilman <khilman@deeprootsystems.com>
To: Madhusudhan Gowda <ext-madhusudhan.1.gowda@nokia.com>
Cc: linux-omap@vger.kernel.org, paul@pwsan.com
Subject: Re: [PATCH v2] OMAP3: PM: PRCM interrupt: Fix warning "MPU wakeup but no wakeup sources"
Date: Fri, 19 Nov 2010 08:36:24 -0800 [thread overview]
Message-ID: <8739qxe0dz.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1290175355-32444-1-git-send-email-ext-madhusudhan.1.gowda@nokia.com> (Madhusudhan Gowda's message of "Fri, 19 Nov 2010 16:02:35 +0200")
Madhusudhan Gowda <ext-madhusudhan.1.gowda@nokia.com> writes:
> A corner case where prcm_interrupt handler is handling the WKST_WKUP and
> before acknowledging the wakeup sources if an IO Pad wakeup ST_IO is
> indicated then hits the below warning since the wakeup sources are already
> cleared.
> WARN(c == 0, "prcm: WARNING: PRCM indicated "
> "MPU wakeup but no wakeup sources "
> "are marked\n");
>
> Since the above warning condition is only valid if the prcm_interrupt
> handler is called but no wakeup sources are marked in first iteration.
>
> The patch fixes this corner case.
>
> Updated after Paul Walmsley's "only handle selected PRCM interrupts" patch.
Can you have a look at the recent work by Thomas Petazzoni:
[PATCH] omap: prcm: switch to a chained IRQ handler mechanism
where the PRCM IRQ handler is broken up to see if this problem still
exists? I suspect the problem is gone as each type of interrupt is
separated out, but should be verified.
Kevin
>
> Signed-off-by: Madhusudhan Gowda <ext-madhusudhan.1.gowda@nokia.com>
> ---
> arch/arm/mach-omap2/pm34xx.c | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index 75c0cd1..2ed3662 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -266,6 +266,7 @@ static irqreturn_t prcm_interrupt_handler (int irq, void *dev_id)
> {
> u32 irqenable_mpu, irqstatus_mpu;
> int c = 0;
> + int ct = 0;
>
> irqenable_mpu = prm_read_mod_reg(OCP_MOD,
> OMAP3_PRM_IRQENABLE_MPU_OFFSET);
> @@ -277,13 +278,15 @@ static irqreturn_t prcm_interrupt_handler (int irq, void *dev_id)
> if (irqstatus_mpu & (OMAP3430_WKUP_ST_MASK |
> OMAP3430_IO_ST_MASK)) {
> c = _prcm_int_handle_wakeup();
> + ct++;
>
> /*
> * Is the MPU PRCM interrupt handler racing with the
> * IVA2 PRCM interrupt handler ?
> */
> - WARN(c == 0, "prcm: WARNING: PRCM indicated MPU wakeup "
> - "but no wakeup sources are marked\n");
> + WARN(!c && (ct == 1), "prcm: WARNING: PRCM indicated "
> + "MPU wakeup but no wakeup sources "
> + "are marked\n");
> } else {
> /* XXX we need to expand our PRCM interrupt handler */
> WARN(1, "prcm: WARNING: PRCM interrupt received, but "
next prev parent reply other threads:[~2010-11-19 16:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-19 14:02 [PATCH v2] OMAP3: PM: PRCM interrupt: Fix warning "MPU wakeup but no wakeup sources" Madhusudhan Gowda
2010-11-19 16:36 ` Kevin Hilman [this message]
2010-11-22 10:26 ` ext-madhusudhan.1.gowda
2010-12-16 10:17 ` Thomas Petazzoni
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=8739qxe0dz.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=ext-madhusudhan.1.gowda@nokia.com \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.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