* [PATCH v2] mfd: db8500-prcmu: fix irqdomain usage
@ 2012-12-20 9:20 Linus Walleij
2013-01-14 22:26 ` Linus Walleij
0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2012-12-20 9:20 UTC (permalink / raw)
To: Samuel Ortiz, linux-kernel; +Cc: Anmar Oueja, Linus Walleij, stable, Lee Jones
From: Linus Walleij <linus.walleij@linaro.org>
This fixes two issues with the DB8500 PRCMU irqdomain:
- You have to state the irq base 0 to get a linear domain
for the DT case from irq_domain_add_simple()
- The irqdomain was not used to translate the initial irq
request using irq_create_mapping() making the linear
case fail as it was lacking a proper descriptor.
I took this opportunity to fix two lines of whitespace
errors in related code as I was anyway messing around with
it.
Cc: stable@kernel.org
Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v1->v2:
- Fix smallish whitespace error
- Make sure not to call irq_create_mapping() in the fastpath,
instead, right after creating the irqdomain call that
for each wakeup source, and use irq_find_mapping() in
fastpath.
Hi Sam, this is a regression and as such should go into the
-rc series. As you can see I also added the Cc: stable tag.
Yours,
Linus Walleij
---
drivers/mfd/db8500-prcmu.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index dc8826d..268f45d 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -2524,7 +2524,7 @@ static bool read_mailbox_0(void)
for (n = 0; n < NUM_PRCMU_WAKEUPS; n++) {
if (ev & prcmu_irq_bit[n])
- generic_handle_irq(IRQ_PRCMU_BASE + n);
+ generic_handle_irq(irq_find_mapping(db8500_irq_domain, n));
}
r = true;
break;
@@ -2737,13 +2737,14 @@ static int db8500_irq_map(struct irq_domain *d, unsigned int virq,
}
static struct irq_domain_ops db8500_irq_ops = {
- .map = db8500_irq_map,
- .xlate = irq_domain_xlate_twocell,
+ .map = db8500_irq_map,
+ .xlate = irq_domain_xlate_twocell,
};
static int db8500_irq_init(struct device_node *np)
{
- int irq_base = -1;
+ int irq_base = 0;
+ int i;
/* In the device tree case, just take some IRQs */
if (!np)
@@ -2758,6 +2759,10 @@ static int db8500_irq_init(struct device_node *np)
return -ENOSYS;
}
+ /* All wakeups will be used, so create mappings for all */
+ for (i = 0; i < NUM_PRCMU_WAKEUPS; i++)
+ irq_create_mapping(db8500_irq_domain, i);
+
return 0;
}
--
1.7.11.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] mfd: db8500-prcmu: fix irqdomain usage
2012-12-20 9:20 [PATCH v2] mfd: db8500-prcmu: fix irqdomain usage Linus Walleij
@ 2013-01-14 22:26 ` Linus Walleij
2013-01-16 11:07 ` Lee Jones
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Linus Walleij @ 2013-01-14 22:26 UTC (permalink / raw)
To: Samuel Ortiz; +Cc: linux-kernel, Anmar Oueja, stable, Lee Jones, Fabio Baltieri
On Thu, Dec 20, 2012 at 10:20 AM, Linus Walleij
<linus.walleij@stericsson.com> wrote:
> From: Linus Walleij <linus.walleij@linaro.org>
>
> This fixes two issues with the DB8500 PRCMU irqdomain:
> - You have to state the irq base 0 to get a linear domain
> for the DT case from irq_domain_add_simple()
> - The irqdomain was not used to translate the initial irq
> request using irq_create_mapping() making the linear
> case fail as it was lacking a proper descriptor.
>
> I took this opportunity to fix two lines of whitespace
> errors in related code as I was anyway messing around with
> it.
>
> Cc: stable@kernel.org
> Cc: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Sam, this regression fix has been around for a month soon,
could you please apply it if there are no problems with it?
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] mfd: db8500-prcmu: fix irqdomain usage
2013-01-14 22:26 ` Linus Walleij
@ 2013-01-16 11:07 ` Lee Jones
2013-01-21 21:43 ` Linus Walleij
2013-01-22 0:27 ` Samuel Ortiz
2 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2013-01-16 11:07 UTC (permalink / raw)
To: Linus Walleij
Cc: Samuel Ortiz, linux-kernel, Anmar Oueja, stable, Fabio Baltieri
On Mon, 14 Jan 2013, Linus Walleij wrote:
> On Thu, Dec 20, 2012 at 10:20 AM, Linus Walleij
> <linus.walleij@stericsson.com> wrote:
>
> > From: Linus Walleij <linus.walleij@linaro.org>
> >
> > This fixes two issues with the DB8500 PRCMU irqdomain:
> > - You have to state the irq base 0 to get a linear domain
> > for the DT case from irq_domain_add_simple()
> > - The irqdomain was not used to translate the initial irq
> > request using irq_create_mapping() making the linear
> > case fail as it was lacking a proper descriptor.
> >
> > I took this opportunity to fix two lines of whitespace
> > errors in related code as I was anyway messing around with
> > it.
> >
> > Cc: stable@kernel.org
> > Cc: Lee Jones <lee.jones@linaro.org>
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
I thought you said I Acked this already?
Just in case: Acked-by Lee Jones <lee.jones@linaro.org>
> Sam, this regression fix has been around for a month soon,
> could you please apply it if there are no problems with it?
Definitely need this soon Sam.
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] mfd: db8500-prcmu: fix irqdomain usage
2013-01-14 22:26 ` Linus Walleij
2013-01-16 11:07 ` Lee Jones
@ 2013-01-21 21:43 ` Linus Walleij
2013-01-22 0:27 ` Samuel Ortiz
2 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2013-01-21 21:43 UTC (permalink / raw)
To: Samuel Ortiz; +Cc: linux-kernel, Anmar Oueja, stable, Lee Jones, Fabio Baltieri
On Mon, Jan 14, 2013 at 11:26 PM, Linus Walleij
<linus.walleij@linaro.org> wrote:
> On Thu, Dec 20, 2012 at 10:20 AM, Linus Walleij
> <linus.walleij@stericsson.com> wrote:
>
>> From: Linus Walleij <linus.walleij@linaro.org>
>>
>> This fixes two issues with the DB8500 PRCMU irqdomain:
>> - You have to state the irq base 0 to get a linear domain
>> for the DT case from irq_domain_add_simple()
>> - The irqdomain was not used to translate the initial irq
>> request using irq_create_mapping() making the linear
>> case fail as it was lacking a proper descriptor.
>>
>> I took this opportunity to fix two lines of whitespace
>> errors in related code as I was anyway messing around with
>> it.
>>
>> Cc: stable@kernel.org
>> Cc: Lee Jones <lee.jones@linaro.org>
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>
> Sam, this regression fix has been around for a month soon,
> could you please apply it if there are no problems with it?
Ping on this!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] mfd: db8500-prcmu: fix irqdomain usage
2013-01-14 22:26 ` Linus Walleij
2013-01-16 11:07 ` Lee Jones
2013-01-21 21:43 ` Linus Walleij
@ 2013-01-22 0:27 ` Samuel Ortiz
2 siblings, 0 replies; 5+ messages in thread
From: Samuel Ortiz @ 2013-01-22 0:27 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-kernel, Anmar Oueja, stable, Lee Jones, Fabio Baltieri
Hi Linus,
On Mon, Jan 14, 2013 at 11:26:09PM +0100, Linus Walleij wrote:
> On Thu, Dec 20, 2012 at 10:20 AM, Linus Walleij
> <linus.walleij@stericsson.com> wrote:
>
> > From: Linus Walleij <linus.walleij@linaro.org>
> >
> > This fixes two issues with the DB8500 PRCMU irqdomain:
> > - You have to state the irq base 0 to get a linear domain
> > for the DT case from irq_domain_add_simple()
> > - The irqdomain was not used to translate the initial irq
> > request using irq_create_mapping() making the linear
> > case fail as it was lacking a proper descriptor.
> >
> > I took this opportunity to fix two lines of whitespace
> > errors in related code as I was anyway messing around with
> > it.
> >
> > Cc: stable@kernel.org
> > Cc: Lee Jones <lee.jones@linaro.org>
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>
> Sam, this regression fix has been around for a month soon,
> could you please apply it if there are no problems with it?
Applied to my for-linus branch. I'll send a 3.8 fixes pull request soon.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-01-22 0:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-20 9:20 [PATCH v2] mfd: db8500-prcmu: fix irqdomain usage Linus Walleij
2013-01-14 22:26 ` Linus Walleij
2013-01-16 11:07 ` Lee Jones
2013-01-21 21:43 ` Linus Walleij
2013-01-22 0:27 ` Samuel Ortiz
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).