Re: [PATCH] irqdomain: print a warning if domains contain IRQ 0

From: Linus Walleij
Date: Wed Apr 18 2012 - 18:32:47 EST

On Thu, Apr 19, 2012 at 12:23 AM, Benjamin Herrenschmidt
<benh@xxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, 2012-04-18 at 15:40 +0200, Linus Walleij wrote:
>> From: Linus Walleij <linus.walleij@xxxxxxxxxx>
>> Some of the clients using IRQ domains from the ARM VIC
>> (arch/arm/common/vic.c) don't know that their (hardware) IRQ 0
>> is silently ignored by the IRQ core, they will just notice
>> that they're not getting this IRQ anymore. So print a warning
>> if a domain contains IRQ 0 (NO_IRQ) so we get some noise about
>> it atleast.
> I don't understand. HW IRQ 0 is not ignored and works perfectly
> fine on "normal" remapped domains. Or is this specific to "legacy
> domains" ? In this case pls make it clear in the subject :-)

I'm trying ... but maybe not succeeding.

The ARM platforms using the VIC and its domain translation
have been converted to use domains without also renumbering
their Linux IRQ numbers. So they still have, in their low IRQ range,
still a 1-1 mapping between HW and Linux IRQ. Including IRQ 0.

E.g (as recently posted a patch for):

#define IRQ_U300_INTCON0_START 0
#define IRQ_U300_INTCON1_START 32
/* These are on INTCON0 - 30 lines */
#define IRQ_U300_IRQ0_EXT 0
#define IRQ_U300_IRQ1_EXT 1
#define IRQ_U300_DMA 2

The kernel is using IRQ_U300_IRQ0_EXT which of course
stopped working now.

Another example, mach-nomadik/include/mach/irqs.h:

#define IRQ_VIC_START 0 /* first VIC interrupt is 0 */
* Interrupt numbers generic for all Nomadik Chip cuts
#define IRQ_WATCHDOG 0
#define IRQ_SOFTINT 1
#define IRQ_CRYPTO 2
#define IRQ_OWM 3
#define IRQ_MTU0 4

I hope nobody tries to use the watchdog now...

Another example:

#define IRQ_VIC_START 0

This INT_WDOGINT is incidentally also 0.

So all of these are effectively broken now, and needs to have
their IRQ offsets changed. I just sent a patch to U300 fixing
this for that platform, but if I had this warning I would have
noticed that something was wrong much earlier.

Linus Walleij
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at