public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] mfd: tc3589x: use simple irqdomain
@ 2013-01-02 13:40 Linus Walleij
  2013-01-14 22:28 ` Linus Walleij
  2013-01-22  3:25 ` Samuel Ortiz
  0 siblings, 2 replies; 4+ messages in thread
From: Linus Walleij @ 2013-01-02 13:40 UTC (permalink / raw)
  To: Samuel Ortiz, linux-kernel; +Cc: Anmar Oueja, Linus Walleij, stable

This fixes a regression in the TC3589x driver introduced in
commit 15e27b1088245a2de3b7d09d39cd209212eb16af
"mfd: Provide the tc3589x with its own IRQ domain"

If a system with a TC3589x expander is booted and a base
IRQ is passed from platform data, a legacy domain will
be used. However, since the Ux500 is now switched to use
SPARSE_IRQ, no descriptors get allocated on-the-fly,
and we get a crash.

Fix this by switching to using the simple irqdomain that
will handle this uniformly and also allocates descriptors
explicitly.

Also fix two small whitespace errors in the vicinity while
we're at it.

Cc: stable@kernel.org
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
---
ChangeLog v1->v2:
- Update commit message after comments from Lee, add ACK, no
  changes to the patche per se.

Hi Sam, this should go into the fixes for stable unless issues
are found, it fixes a regression for us.
---
 drivers/mfd/tc3589x.c | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c
index a06d66b..ecc092c 100644
--- a/drivers/mfd/tc3589x.c
+++ b/drivers/mfd/tc3589x.c
@@ -219,25 +219,18 @@ static void tc3589x_irq_unmap(struct irq_domain *d, unsigned int virq)
 }
 
 static struct irq_domain_ops tc3589x_irq_ops = {
-        .map    = tc3589x_irq_map,
+	.map    = tc3589x_irq_map,
 	.unmap  = tc3589x_irq_unmap,
-        .xlate  = irq_domain_xlate_twocell,
+	.xlate  = irq_domain_xlate_twocell,
 };
 
 static int tc3589x_irq_init(struct tc3589x *tc3589x, struct device_node *np)
 {
 	int base = tc3589x->irq_base;
 
-	if (base) {
-		tc3589x->domain = irq_domain_add_legacy(
-			NULL, TC3589x_NR_INTERNAL_IRQS, base,
-			0, &tc3589x_irq_ops, tc3589x);
-	}
-	else {
-		tc3589x->domain = irq_domain_add_linear(
-			np, TC3589x_NR_INTERNAL_IRQS,
-			&tc3589x_irq_ops, tc3589x);
-	}
+	tc3589x->domain = irq_domain_add_simple(
+		np, TC3589x_NR_INTERNAL_IRQS, base,
+		&tc3589x_irq_ops, tc3589x);
 
 	if (!tc3589x->domain) {
 		dev_err(tc3589x->dev, "Failed to create irqdomain\n");
-- 
1.7.11.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] mfd: tc3589x: use simple irqdomain
  2013-01-02 13:40 [PATCH v2] mfd: tc3589x: use simple irqdomain Linus Walleij
@ 2013-01-14 22:28 ` Linus Walleij
  2013-01-21 21:44   ` Linus Walleij
  2013-01-22  3:25 ` Samuel Ortiz
  1 sibling, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2013-01-14 22:28 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: linux-kernel, Anmar Oueja, stable, Fabio Baltieri

On Wed, Jan 2, 2013 at 2:40 PM, Linus Walleij
<linus.walleij@stericsson.com> wrote:

> This fixes a regression in the TC3589x driver introduced in
> commit 15e27b1088245a2de3b7d09d39cd209212eb16af
> "mfd: Provide the tc3589x with its own IRQ domain"
>
> If a system with a TC3589x expander is booted and a base
> IRQ is passed from platform data, a legacy domain will
> be used. However, since the Ux500 is now switched to use
> SPARSE_IRQ, no descriptors get allocated on-the-fly,
> and we get a crash.
>
> Fix this by switching to using the simple irqdomain that
> will handle this uniformly and also allocates descriptors
> explicitly.
>
> Also fix two small whitespace errors in the vicinity while
> we're at it.
>
> Cc: stable@kernel.org
> Acked-by: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
> ---
> ChangeLog v1->v2:
> - Update commit message after comments from Lee, add ACK, no
>   changes to the patche per se.

Ping on this regression fix patch as well...

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] mfd: tc3589x: use simple irqdomain
  2013-01-14 22:28 ` Linus Walleij
@ 2013-01-21 21:44   ` Linus Walleij
  0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2013-01-21 21:44 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: linux-kernel, Anmar Oueja, stable, Fabio Baltieri

On Mon, Jan 14, 2013 at 11:28 PM, Linus Walleij
<linus.walleij@linaro.org> wrote:
> On Wed, Jan 2, 2013 at 2:40 PM, Linus Walleij
> <linus.walleij@stericsson.com> wrote:
>
>> This fixes a regression in the TC3589x driver introduced in
>> commit 15e27b1088245a2de3b7d09d39cd209212eb16af
>> "mfd: Provide the tc3589x with its own IRQ domain"
>>
>> If a system with a TC3589x expander is booted and a base
>> IRQ is passed from platform data, a legacy domain will
>> be used. However, since the Ux500 is now switched to use
>> SPARSE_IRQ, no descriptors get allocated on-the-fly,
>> and we get a crash.
>>
>> Fix this by switching to using the simple irqdomain that
>> will handle this uniformly and also allocates descriptors
>> explicitly.
>>
>> Also fix two small whitespace errors in the vicinity while
>> we're at it.
>>
>> Cc: stable@kernel.org
>> Acked-by: Lee Jones <lee.jones@linaro.org>
>> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
>> ---
>> ChangeLog v1->v2:
>> - Update commit message after comments from Lee, add ACK, no
>>   changes to the patche per se.
>
> Ping on this regression fix patch as well...

Ping on this!

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] mfd: tc3589x: use simple irqdomain
  2013-01-02 13:40 [PATCH v2] mfd: tc3589x: use simple irqdomain Linus Walleij
  2013-01-14 22:28 ` Linus Walleij
@ 2013-01-22  3:25 ` Samuel Ortiz
  1 sibling, 0 replies; 4+ messages in thread
From: Samuel Ortiz @ 2013-01-22  3:25 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-kernel, Anmar Oueja, stable

Hi Linus,

On Wed, Jan 02, 2013 at 02:40:14PM +0100, Linus Walleij wrote:
> This fixes a regression in the TC3589x driver introduced in
> commit 15e27b1088245a2de3b7d09d39cd209212eb16af
> "mfd: Provide the tc3589x with its own IRQ domain"
> 
> If a system with a TC3589x expander is booted and a base
> IRQ is passed from platform data, a legacy domain will
> be used. However, since the Ux500 is now switched to use
> SPARSE_IRQ, no descriptors get allocated on-the-fly,
> and we get a crash.
> 
> Fix this by switching to using the simple irqdomain that
> will handle this uniformly and also allocates descriptors
> explicitly.
> 
> Also fix two small whitespace errors in the vicinity while
> we're at it.
> 
> Cc: stable@kernel.org
> Acked-by: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
> ---
> ChangeLog v1->v2:
> - Update commit message after comments from Lee, add ACK, no
>   changes to the patche per se.
> 
> Hi Sam, this should go into the fixes for stable unless issues
> are found, it fixes a regression for us.
Applied to my for-linus branch. On its way to 3.8.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-22  3:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-02 13:40 [PATCH v2] mfd: tc3589x: use simple irqdomain Linus Walleij
2013-01-14 22:28 ` Linus Walleij
2013-01-21 21:44   ` Linus Walleij
2013-01-22  3:25 ` Samuel Ortiz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox