* [PATCH] OMAP3: PM: PRCM interrupt: Fix warning "MPU wakeup but no wakeup sources"
@ 2010-11-19 11:26 Madhusudhan Gowda
2010-11-19 11:47 ` Felipe Balbi
0 siblings, 1 reply; 4+ messages in thread
From: Madhusudhan Gowda @ 2010-11-19 11:26 UTC (permalink / raw)
To: linux-omap; +Cc: paul, Madhusudhan Gowda
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.
Signed-off-by: Madhusudhan Gowda <ext-madhusudhan.1.gowda@nokia.com>
---
arch/arm/mach-omap2/pm34xx.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 75c0cd1..d9a35d7 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,16 @@ 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");
+ if (ct == 1)
+ WARN(c == 0, "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 "
--
1.6.3.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] OMAP3: PM: PRCM interrupt: Fix warning "MPU wakeup but no wakeup sources"
2010-11-19 11:26 [PATCH] OMAP3: PM: PRCM interrupt: Fix warning "MPU wakeup but no wakeup sources" Madhusudhan Gowda
@ 2010-11-19 11:47 ` Felipe Balbi
2010-11-19 13:53 ` ext-madhusudhan.1.gowda
0 siblings, 1 reply; 4+ messages in thread
From: Felipe Balbi @ 2010-11-19 11:47 UTC (permalink / raw)
To: Madhusudhan Gowda; +Cc: linux-omap, paul
Hi,
On Fri, Nov 19, 2010 at 01:26:33PM +0200, Madhusudhan Gowda wrote:
>@@ -277,13 +278,16 @@ 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");
>+ if (ct == 1)
>+ 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");
would do it? Then you don't need the extra if ().
--
balbi
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] OMAP3: PM: PRCM interrupt: Fix warning "MPU wakeup but no wakeup sources"
2010-11-19 11:47 ` Felipe Balbi
@ 2010-11-19 13:53 ` ext-madhusudhan.1.gowda
2010-11-19 14:27 ` Felipe Balbi
0 siblings, 1 reply; 4+ messages in thread
From: ext-madhusudhan.1.gowda @ 2010-11-19 13:53 UTC (permalink / raw)
To: balbi; +Cc: linux-omap, paul
Yes Balbi. I will incorporate your comments.
Regards
Gowda
________________________________________
From: linux-omap-owner@vger.kernel.org [linux-omap-owner@vger.kernel.org] On Behalf Of ext Felipe Balbi [balbi@ti.com]
Sent: Friday, November 19, 2010 1:47 PM
To: Gowda Madhusudhan.1 (EXT-Elektrobit/Helsinki)
Cc: linux-omap@vger.kernel.org; paul@pwsan.com
Subject: Re: [PATCH] OMAP3: PM: PRCM interrupt: Fix warning "MPU wakeup but no wakeup sources"
Hi,
On Fri, Nov 19, 2010 at 01:26:33PM +0200, Madhusudhan Gowda wrote:
>@@ -277,13 +278,16 @@ 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");
>+ if (ct == 1)
>+ 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");
would do it? Then you don't need the extra if ().
--
balbi
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] OMAP3: PM: PRCM interrupt: Fix warning "MPU wakeup but no wakeup sources"
2010-11-19 13:53 ` ext-madhusudhan.1.gowda
@ 2010-11-19 14:27 ` Felipe Balbi
0 siblings, 0 replies; 4+ messages in thread
From: Felipe Balbi @ 2010-11-19 14:27 UTC (permalink / raw)
To: ext-madhusudhan.1.gowda; +Cc: balbi, linux-omap, paul
Hi,
(please read elinux.org/Netiquette :-)
On Fri, 2010-11-19 at 14:53 +0100, ext-madhusudhan.1.gowda@nokia.com
wrote:
> Yes Balbi. I will incorporate your comments.
> WARN(!c && (ct == 1), "prcm: WARNING: PRCM indicated "
> "MPU wakeup but no wakeup sources "
> "are marked\n");
>
> would do it? Then you don't need the extra if ().
btw, the message is a bit redundant. PRCM appears twice.
--
balbi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-11-19 14:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-19 11:26 [PATCH] OMAP3: PM: PRCM interrupt: Fix warning "MPU wakeup but no wakeup sources" Madhusudhan Gowda
2010-11-19 11:47 ` Felipe Balbi
2010-11-19 13:53 ` ext-madhusudhan.1.gowda
2010-11-19 14:27 ` Felipe Balbi
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).