diff mbox

[3.5.y.z,extended,stable] Patch "ARM: S3C24XX: Correct NR_IRQS definition for s3c2440" has been added to staging queue

Message ID 1366796211-7783-1-git-send-email-luis.henriques@canonical.com
State New
Headers show

Commit Message

Luis Henriques April 24, 2013, 9:36 a.m. UTC
This is a note to let you know that I have just added a patch titled

    ARM: S3C24XX: Correct NR_IRQS definition for s3c2440

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

From 1e1c91c79bc59948ebee6a31e9b04f26e927bf30 Mon Sep 17 00:00:00 2001
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
Date: Mon, 8 Apr 2013 21:39:45 +0900
Subject: [PATCH] ARM: S3C24XX: Correct NR_IRQS definition for s3c2440

commit b530f742ac27460d41d35b638ad6aad92044a982 upstream.

Due to NR_IRQS being incorrectly defined not all IRQ domains can
be registered for S3C2440. It causes following errors on a s3c2440
SoC based board:

NR_IRQS:89
S3C2440: IRQ Support
irq: clearing pending status 00000002
------------[ cut here ]------------
WARNING: at kernel/irq/irqdomain.c:234 0xc0056ed0()
...
irq: could not create irq-domain
...
s3c2410-wdt s3c2410-wdt: failed to install irq (-22)
s3c2410-wdt: probe of s3c2410-wdt failed with error -22
...
samsung-uart s3c2440-uart.0: cannot get irq 74

Fix this by increasing NR_IRQS to at least (IRQ_S3C2443_AC97 + 1)
if CPU_S3C2440 is selected, so the subintc IRQ domain gets properly
registered.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 arch/arm/mach-s3c24xx/include/mach/irqs.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--
1.8.1.2

Comments

Sylwester Nawrocki April 26, 2013, 10:06 a.m. UTC | #1
On 04/24/2013 11:36 AM, Luis Henriques wrote:
> This is a note to let you know that I have just added a patch titled
> 
>     ARM: S3C24XX: Correct NR_IRQS definition for s3c2440
> 
> to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
> which can be found at:
> 
>  http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue
> 
> If you, or anyone else, feels it should not be added to this tree, please 
> reply to this email.

I think this patch is not even needed in 3.9, only 3.10-rc1+.

Heiko, can you confirm ?

I've tested 3.9-rc1 on s3c2440 SoC based board and all interrupts are
registered properly without this patch.

I believe this patch is needed only for trees containing patch series
from Heiko [1], starting with commit:

6f8d7ea275eb2a27fd62211e93921a82f367f939
ARM: S3C24XX: move s3c244x irq init to common irq code

[1]
https://git.kernel.org/cgit/linux/kernel/git/arm/arm-soc.git/log/arch/arm/mach-s3c24xx?h=for-next

Regards,
Sylwester
Heiko Stuebner April 26, 2013, 10:33 a.m. UTC | #2
Am Freitag, 26. April 2013, 12:06:29 schrieb Sylwester Nawrocki:
> On 04/24/2013 11:36 AM, Luis Henriques wrote:
> > This is a note to let you know that I have just added a patch titled
> > 
> >     ARM: S3C24XX: Correct NR_IRQS definition for s3c2440
> > 
> > to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree
> > 
> > which can be found at:
> >  http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/
> >  linux-3.5.y-queue
> > 
> > If you, or anyone else, feels it should not be added to this tree, please
> > reply to this email.
> 
> I think this patch is not even needed in 3.9, only 3.10-rc1+.
> 
> Heiko, can you confirm ?

Correct, including the patch in 3.5 should not be necessary, as the interrupt 
handling was still untouched then.


> I've tested 3.9-rc1 on s3c2440 SoC based board and all interrupts are
> registered properly without this patch.

Very strange ...

While the real rework of the s3c244x into the new irq structure will only 
enter mainline during the next merge window, the irq code in 3.9 already uses 
full irq domains. 

s3c24xx_init_irq which is still called at this state from the s3c244x boards, 
is creating the base irq-domains with default values (and the full 29 irqs in 
the subint domain) and as before the s3c244x irq initcall does then replace 
the demuxed interrupts

So in theory 3.9 should not work with the previous NR_IRQS value (and 
rightfully got you fix applied [2] ... or I'm overlooking something ;-)


> I believe this patch is needed only for trees containing patch series
> from Heiko [1], starting with commit:
> 
> 6f8d7ea275eb2a27fd62211e93921a82f367f939
> ARM: S3C24XX: move s3c244x irq init to common irq code
> 
> [1]
> https://git.kernel.org/cgit/linux/kernel/git/arm/arm-soc.git/log/arch/arm/m
> ach-s3c24xx?h=for-next


Heiko

[2] 
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/arch/arm/mach-
s3c24xx?id=b530f742ac27460d41d35b638ad6aad92044a982
Luis Henriques April 26, 2013, 10:41 a.m. UTC | #3
On Fri, Apr 26, 2013 at 12:33:33PM +0200, Heiko Stübner wrote:
> Am Freitag, 26. April 2013, 12:06:29 schrieb Sylwester Nawrocki:
> > On 04/24/2013 11:36 AM, Luis Henriques wrote:
> > > This is a note to let you know that I have just added a patch titled
> > > 
> > >     ARM: S3C24XX: Correct NR_IRQS definition for s3c2440
> > > 
> > > to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree
> > > 
> > > which can be found at:
> > >  http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/
> > >  linux-3.5.y-queue
> > > 
> > > If you, or anyone else, feels it should not be added to this tree, please
> > > reply to this email.
> > 
> > I think this patch is not even needed in 3.9, only 3.10-rc1+.
> > 
> > Heiko, can you confirm ?
> 
> Correct, including the patch in 3.5 should not be necessary, as the interrupt 
> handling was still untouched then.
> 

Great, thanks for your feedback.

I've picked this patch after a request in the stable mailing list to
include it in a stable kernel (3.8, if I remember correctly).

Anyway, I'll drop it from the 3.5.y queue.

Cheers,
--
Luis

>
> > I've tested 3.9-rc1 on s3c2440 SoC based board and all interrupts are
> > registered properly without this patch.
> 
> Very strange ...
> 
> While the real rework of the s3c244x into the new irq structure will only 
> enter mainline during the next merge window, the irq code in 3.9 already uses 
> full irq domains. 
> 
> s3c24xx_init_irq which is still called at this state from the s3c244x boards, 
> is creating the base irq-domains with default values (and the full 29 irqs in 
> the subint domain) and as before the s3c244x irq initcall does then replace 
> the demuxed interrupts
> 
> So in theory 3.9 should not work with the previous NR_IRQS value (and 
> rightfully got you fix applied [2] ... or I'm overlooking something ;-)
> 
> 
> > I believe this patch is needed only for trees containing patch series
> > from Heiko [1], starting with commit:
> > 
> > 6f8d7ea275eb2a27fd62211e93921a82f367f939
> > ARM: S3C24XX: move s3c244x irq init to common irq code
> > 
> > [1]
> > https://git.kernel.org/cgit/linux/kernel/git/arm/arm-soc.git/log/arch/arm/m
> > ach-s3c24xx?h=for-next
> 
> 
> Heiko
> 
> [2] 
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/arch/arm/mach-
> s3c24xx?id=b530f742ac27460d41d35b638ad6aad92044a982
Sylwester Nawrocki April 26, 2013, 1:24 p.m. UTC | #4
On 04/26/2013 12:33 PM, Heiko Stübner wrote:
> Am Freitag, 26. April 2013, 12:06:29 schrieb Sylwester Nawrocki:
>> On 04/24/2013 11:36 AM, Luis Henriques wrote:
>>> This is a note to let you know that I have just added a patch titled
>>>
>>>     ARM: S3C24XX: Correct NR_IRQS definition for s3c2440
>>>
>>> to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree
>>>
>>> which can be found at:
>>>  http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/
>>>  linux-3.5.y-queue
>>>
>>> If you, or anyone else, feels it should not be added to this tree, please
>>> reply to this email.
>>
>> I think this patch is not even needed in 3.9, only 3.10-rc1+.
>>
>> Heiko, can you confirm ?
> 
> Correct, including the patch in 3.5 should not be necessary, as the interrupt 
> handling was still untouched then.
> 
> 
>> I've tested 3.9-rc1 on s3c2440 SoC based board and all interrupts are
>> registered properly without this patch.
> 
> Very strange ...
> 
> While the real rework of the s3c244x into the new irq structure will only 
> enter mainline during the next merge window, the irq code in 3.9 already uses 
> full irq domains. 
> 
> s3c24xx_init_irq which is still called at this state from the s3c244x boards, 
> is creating the base irq-domains with default values (and the full 29 irqs in 
> the subint domain) and as before the s3c244x irq initcall does then replace 
> the demuxed interrupts
> 
> So in theory 3.9 should not work with the previous NR_IRQS value (and 
> rightfully got you fix applied [2] ... or I'm overlooking something ;-)

Yes, it's already applied. Let me test it again this week. It was late night
when I tried it with 3.9-rc1 and I might have mixed something up.

>> I believe this patch is needed only for trees containing patch series
>> from Heiko [1], starting with commit:
>>
>> 6f8d7ea275eb2a27fd62211e93921a82f367f939
>> ARM: S3C24XX: move s3c244x irq init to common irq code
>>
>> [1]
>> https://git.kernel.org/cgit/linux/kernel/git/arm/arm-soc.git/log/arch/arm/m
>> ach-s3c24xx?h=for-next
> 
> 
> Heiko
> 
> [2] 
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/arch/arm/mach-
> s3c24xx?id=b530f742ac27460d41d35b638ad6aad92044a982

Thanks,
Sylwester
diff mbox

Patch

diff --git a/arch/arm/mach-s3c24xx/include/mach/irqs.h b/arch/arm/mach-s3c24xx/include/mach/irqs.h
index b7a9f4d..1e73f5f 100644
--- a/arch/arm/mach-s3c24xx/include/mach/irqs.h
+++ b/arch/arm/mach-s3c24xx/include/mach/irqs.h
@@ -188,10 +188,8 @@ 

 #if defined(CONFIG_CPU_S3C2416)
 #define NR_IRQS (IRQ_S3C2416_I2S1 + 1)
-#elif defined(CONFIG_CPU_S3C2443)
-#define NR_IRQS (IRQ_S3C2443_AC97+1)
 #else
-#define NR_IRQS (IRQ_S3C2440_AC97+1)
+#define NR_IRQS (IRQ_S3C2443_AC97 + 1)
 #endif

 /* compatibility define. */