diff mbox

kzm9g boot fail (was Re: irqdomain breaks ap4 boot)

Message ID 87mx1qrx1x.wl%kuninori.morimoto.gx@renesas.com (mailing list archive)
State Superseded
Headers show

Commit Message

Kuninori Morimoto Aug. 20, 2012, 4:45 a.m. UTC
Hi Paul
Cc Magnus, Kobayashi-san

> > irq: irq_domain_associate_many(<no-node>, irqbase=545, hwbase=545, count=1)     
> > irq: irq_domain_associate_many(<no-node>, irqbase=546, hwbase=546, count=1)     
> > irq: irq_domain_associate_many(<no-node>, irqbase=547, hwbase=547, count=1)     
> > irq: irq_domain_associate_many(<no-node>, irqbase=548, hwbase=548, count=1)     
> > irq: irq_domain_associate_many(<no-node>, irqbase=549, hwbase=549, count=1)     
> > irq: irq_domain_associate_many(<no-node>, irqbase=550, hwbase=550, count=1)     
> > irq: irq_domain_associate_many(<no-node>, irqbase=551, hwbase=551, count=1)     
> > irq: irq_domain_associate_many(<no-node>, irqbase=552, hwbase=552, count=1)     
> > ------------[ cut here ]------------                                            
> > WARNING: at /opt/usr/src/WORK/morimoto/gitlinux/linux-2.6/kernel/irq/irqdomain.)
> > error: irq_desc already associated; irq=552 hwirq=0x228                         
> 
> Well, that's certainly a valid bug. hwirq 552 is already bound to the
> previous controller, and the vector in question is being registered a
> second time under another controller. This looks to be RTDMAC_2_DEI6 (0x1300),
> but the rest descends in to macro hell, so it's not obvious why the same
> vector is being registered in multiple places.


I'm not sure why, but this patch solved problem ?

-------------------------------------------



Best regards
---
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Paul Mundt Aug. 20, 2012, 5:24 a.m. UTC | #1
On Sun, Aug 19, 2012 at 09:45:33PM -0700, Kuninori Morimoto wrote:
> 
> Hi Paul
> Cc Magnus, Kobayashi-san
> 
> > > irq: irq_domain_associate_many(<no-node>, irqbase=545, hwbase=545, count=1)     
> > > irq: irq_domain_associate_many(<no-node>, irqbase=546, hwbase=546, count=1)     
> > > irq: irq_domain_associate_many(<no-node>, irqbase=547, hwbase=547, count=1)     
> > > irq: irq_domain_associate_many(<no-node>, irqbase=548, hwbase=548, count=1)     
> > > irq: irq_domain_associate_many(<no-node>, irqbase=549, hwbase=549, count=1)     
> > > irq: irq_domain_associate_many(<no-node>, irqbase=550, hwbase=550, count=1)     
> > > irq: irq_domain_associate_many(<no-node>, irqbase=551, hwbase=551, count=1)     
> > > irq: irq_domain_associate_many(<no-node>, irqbase=552, hwbase=552, count=1)     
> > > ------------[ cut here ]------------                                            
> > > WARNING: at /opt/usr/src/WORK/morimoto/gitlinux/linux-2.6/kernel/irq/irqdomain.)
> > > error: irq_desc already associated; irq=552 hwirq=0x228                         
> > 
> > Well, that's certainly a valid bug. hwirq 552 is already bound to the
> > previous controller, and the vector in question is being registered a
> > second time under another controller. This looks to be RTDMAC_2_DEI6 (0x1300),
> > but the rest descends in to macro hell, so it's not obvious why the same
> > vector is being registered in multiple places.
> 
> 
> I'm not sure why, but this patch solved problem ?
> 
I'll let Magnus figure this one out, as it was his hack in the first
place. At least we know the irqdomain code isn't at fault anymore.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tetsuyuki Kobayashi Aug. 20, 2012, 5:33 a.m. UTC | #2
Hello

(2012/08/20 13:45), Kuninori Morimoto wrote:
> 
> Hi Paul
> Cc Magnus, Kobayashi-san
> 
>>> irq: irq_domain_associate_many(<no-node>, irqbase=545, hwbase=545, count=1)
>>> irq: irq_domain_associate_many(<no-node>, irqbase=546, hwbase=546, count=1)
>>> irq: irq_domain_associate_many(<no-node>, irqbase=547, hwbase=547, count=1)
>>> irq: irq_domain_associate_many(<no-node>, irqbase=548, hwbase=548, count=1)
>>> irq: irq_domain_associate_many(<no-node>, irqbase=549, hwbase=549, count=1)
>>> irq: irq_domain_associate_many(<no-node>, irqbase=550, hwbase=550, count=1)
>>> irq: irq_domain_associate_many(<no-node>, irqbase=551, hwbase=551, count=1)
>>> irq: irq_domain_associate_many(<no-node>, irqbase=552, hwbase=552, count=1)
>>> ------------[ cut here ]------------
>>> WARNING: at /opt/usr/src/WORK/morimoto/gitlinux/linux-2.6/kernel/irq/irqdomain.)
>>> error: irq_desc already associated; irq=552 hwirq=0x228
>>
>> Well, that's certainly a valid bug. hwirq 552 is already bound to the
>> previous controller, and the vector in question is being registered a
>> second time under another controller. This looks to be RTDMAC_2_DEI6 (0x1300),
>> but the rest descends in to macro hell, so it's not obvious why the same
>> vector is being registered in multiple places.
> 
> 
> I'm not sure why, but this patch solved problem ?
> 
> -------------------------------------------
> diff --git a/arch/arm/mach-shmobile/intc-sh73a0.c b/arch/arm/mach-shmobile/intc-
> index ee44740..a6eae4f 100644
> --- a/arch/arm/mach-shmobile/intc-sh73a0.c
> +++ b/arch/arm/mach-shmobile/intc-sh73a0.c
> @@ -259,7 +259,7 @@ static int sh73a0_set_wake(struct irq_data *data, unsigned i
>          return 0; /* always allow wakeup */
>   }
>   
> -#define RELOC_BASE 0x1000
> +#define RELOC_BASE 0x1200
>   
>   /* INTCA IRQ pins at INTCS + 0x1000 to make space for GIC+INTC handling */
>   #define INTCS_VECT_RELOC(n, vect) INTCS_VECT((n), (vect) + RELOC_BASE)
> 
> 

FYI, 
I tried this patch, too. I got the following log. It seems no conflicts.


NR_IRQS:16 nr_irqs:16 16
irq: Allocated domain of type 0 @0xce802800
intc: Registered controller 'sh73a0-intcs' with 77 IRQs
irq: Allocated domain of type 3 @0xce802940
irq: irq_domain_associate_many(<no-node>, irqbase=448, hwbase=448, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=449, hwbase=449, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=464, hwbase=464, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=465, hwbase=465, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=466, hwbase=466, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=467, hwbase=467, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=468, hwbase=468, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=472, hwbase=472, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=475, hwbase=475, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=476, hwbase=476, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=477, hwbase=477, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=479, hwbase=479, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=480, hwbase=480, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=492, hwbase=492, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=493, hwbase=493, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=494, hwbase=494, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=495, hwbase=495, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=500, hwbase=500, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=505, hwbase=505, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=516, hwbase=516, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=517, hwbase=517, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=518, hwbase=518, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=520, hwbase=520, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=521, hwbase=521, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=522, hwbase=522, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=523, hwbase=523, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=524, hwbase=524, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=525, hwbase=525, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=526, hwbase=526, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=432, hwbase=432, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=434, hwbase=434, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=436, hwbase=436, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=437, hwbase=437, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=438, hwbase=438, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=443, hwbase=443, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=444, hwbase=444, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=445, hwbase=445, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=552, hwbase=552, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=553, hwbase=553, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=554, hwbase=554, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=555, hwbase=555, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=556, hwbase=556, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=557, hwbase=557, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=584, hwbase=584, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=587, hwbase=587, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=588, hwbase=588, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=589, hwbase=589, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=590, hwbase=590, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=591, hwbase=591, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=592, hwbase=592, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=593, hwbase=593, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=594, hwbase=594, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=600, hwbase=600, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=601, hwbase=601, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=602, hwbase=602, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=603, hwbase=603, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=604, hwbase=604, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=608, hwbase=608, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=609, hwbase=609, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=615, hwbase=615, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=616, hwbase=616, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=618, hwbase=618, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=619, hwbase=619, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=620, hwbase=620, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=621, hwbase=621, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=623, hwbase=623, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=624, hwbase=624, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=625, hwbase=625, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=626, hwbase=626, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=627, hwbase=627, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=628, hwbase=628, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=629, hwbase=629, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=630, hwbase=630, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=631, hwbase=631, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=632, hwbase=632, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=633, hwbase=633, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=680, hwbase=680, count=1)
intc: Registered controller 'sh73a0-intca-irq-pins' with 32 IRQs
irq: Allocated domain of type 3 @0xce8029c0
irq: irq_domain_associate_many(<no-node>, irqbase=560, hwbase=560, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=561, hwbase=561, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=562, hwbase=562, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=563, hwbase=563, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=564, hwbase=564, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=565, hwbase=565, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=566, hwbase=566, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=567, hwbase=567, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=568, hwbase=568, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=569, hwbase=569, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=570, hwbase=570, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=571, hwbase=571, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=572, hwbase=572, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=573, hwbase=573, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=574, hwbase=574, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=575, hwbase=575, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=944, hwbase=944, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=945, hwbase=945, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=946, hwbase=946, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=947, hwbase=947, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=948, hwbase=948, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=949, hwbase=949, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=950, hwbase=950, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=951, hwbase=951, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=952, hwbase=952, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=953, hwbase=953, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=954, hwbase=954, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=955, hwbase=955, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=956, hwbase=956, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=957, hwbase=957, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=958, hwbase=958, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=959, hwbase=959, count=1)
intc: Registered controller 'sh73a0-pint0' with 32 IRQs
irq: Allocated domain of type 3 @0xce802a00
irq: irq_domain_associate_many(<no-node>, irqbase=700, hwbase=700, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=701, hwbase=701, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=702, hwbase=702, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=703, hwbase=703, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=704, hwbase=704, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=705, hwbase=705, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=706, hwbase=706, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=707, hwbase=707, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=708, hwbase=708, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=709, hwbase=709, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=710, hwbase=710, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=711, hwbase=711, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=712, hwbase=712, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=713, hwbase=713, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=714, hwbase=714, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=715, hwbase=715, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=716, hwbase=716, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=717, hwbase=717, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=718, hwbase=718, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=719, hwbase=719, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=720, hwbase=720, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=721, hwbase=721, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=722, hwbase=722, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=723, hwbase=723, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=724, hwbase=724, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=725, hwbase=725, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=726, hwbase=726, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=727, hwbase=727, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=728, hwbase=728, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=729, hwbase=729, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=730, hwbase=730, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=731, hwbase=731, count=1)
intc: Registered controller 'sh73a0-pint1' with 8 IRQs
irq: Allocated domain of type 3 @0xce802ac0
irq: irq_domain_associate_many(<no-node>, irqbase=732, hwbase=732, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=733, hwbase=733, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=734, hwbase=734, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=735, hwbase=735, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=736, hwbase=736, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=737, hwbase=737, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=738, hwbase=738, count=1)
irq: irq_domain_associate_many(<no-node>, irqbase=739, hwbase=739, count=1)
sched_clock: 32 bits at 128 Hz, resolution 7812500ns, wraps every 3489660920ms
Console: colour dummy device 80x30
console [tty0] enabled

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kuninori Morimoto Aug. 20, 2012, 6:13 a.m. UTC | #3
Hi Kobayashi-san

> > -------------------------------------------
> > diff --git a/arch/arm/mach-shmobile/intc-sh73a0.c b/arch/arm/mach-shmobile/intc-
> > index ee44740..a6eae4f 100644
> > --- a/arch/arm/mach-shmobile/intc-sh73a0.c
> > +++ b/arch/arm/mach-shmobile/intc-sh73a0.c
> > @@ -259,7 +259,7 @@ static int sh73a0_set_wake(struct irq_data *data, unsigned i
> >          return 0; /* always allow wakeup */
> >   }
> >   
> > -#define RELOC_BASE 0x1000
> > +#define RELOC_BASE 0x1200
> >   
> >   /* INTCA IRQ pins at INTCS + 0x1000 to make space for GIC+INTC handling */
> >   #define INTCS_VECT_RELOC(n, vect) INTCS_VECT((n), (vect) + RELOC_BASE)
> > 
> > 
> 
> FYI, 
> I tried this patch, too. I got the following log. It seems no conflicts.

Thank you for your checking/testing

Best regards
---
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kuninori Morimoto Aug. 20, 2012, 6:24 a.m. UTC | #4
Hi Paul

> > I'm not sure why, but this patch solved problem ?
> > 
> I'll let Magnus figure this one out, as it was his hack in the first

Thank you !

> place. At least we know the irqdomain code isn't at fault anymore.

We have irq2 fix patch for multi-evt from you ?
        ~~~~

Best regards
---
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Paul Mundt Aug. 20, 2012, 6:30 a.m. UTC | #5
On Sun, Aug 19, 2012 at 11:24:51PM -0700, Kuninori Morimoto wrote:
> 
> Hi Paul
> 
> > > I'm not sure why, but this patch solved problem ?
> > > 
> > I'll let Magnus figure this one out, as it was his hack in the first
> 
> Thank you !
> 
> > place. At least we know the irqdomain code isn't at fault anymore.
> 
> We have irq2 fix patch for multi-evt from you ?
>         ~~~~
> 
Yes, I'll be sending that to Linus for -rc3.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Magnus Damm Aug. 20, 2012, 7:18 a.m. UTC | #6
Hi Paul,

On Mon, Aug 20, 2012 at 2:24 PM, Paul Mundt <lethal@linux-sh.org> wrote:
> On Sun, Aug 19, 2012 at 09:45:33PM -0700, Kuninori Morimoto wrote:
>>
>> Hi Paul
>> Cc Magnus, Kobayashi-san
>>
>> > > irq: irq_domain_associate_many(<no-node>, irqbase=545, hwbase=545, count=1)
>> > > irq: irq_domain_associate_many(<no-node>, irqbase=546, hwbase=546, count=1)
>> > > irq: irq_domain_associate_many(<no-node>, irqbase=547, hwbase=547, count=1)
>> > > irq: irq_domain_associate_many(<no-node>, irqbase=548, hwbase=548, count=1)
>> > > irq: irq_domain_associate_many(<no-node>, irqbase=549, hwbase=549, count=1)
>> > > irq: irq_domain_associate_many(<no-node>, irqbase=550, hwbase=550, count=1)
>> > > irq: irq_domain_associate_many(<no-node>, irqbase=551, hwbase=551, count=1)
>> > > irq: irq_domain_associate_many(<no-node>, irqbase=552, hwbase=552, count=1)
>> > > ------------[ cut here ]------------
>> > > WARNING: at /opt/usr/src/WORK/morimoto/gitlinux/linux-2.6/kernel/irq/irqdomain.)
>> > > error: irq_desc already associated; irq=552 hwirq=0x228
>> >
>> > Well, that's certainly a valid bug. hwirq 552 is already bound to the
>> > previous controller, and the vector in question is being registered a
>> > second time under another controller. This looks to be RTDMAC_2_DEI6 (0x1300),
>> > but the rest descends in to macro hell, so it's not obvious why the same
>> > vector is being registered in multiple places.
>>
>>
>> I'm not sure why, but this patch solved problem ?
>>
> I'll let Magnus figure this one out, as it was his hack in the first
> place. At least we know the irqdomain code isn't at fault anymore.

Well, I'm quite certain it didn't trigger before the INTC code got
this recent upgrade. Or did it fail silently? I wonder why we have to
bump up the relocation base all of a sudden? Last time I checked I had
to revert two of your most recent commits to get the sh73a0 based
board to even boot with upstream. I believe this is the same issue
that Kobayashi-san and Morimoto-san have been talking about.

Anyway, as I'm sure you've noticed, I put a sh7273 based board next to
the H1 board a few weeks ago. I can also provide you with a sh73a0
board if that would help. Please let me know if there is anything else
you need.

Thanks,

/ magnus
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Paul Mundt Aug. 20, 2012, 7:40 a.m. UTC | #7
On Mon, Aug 20, 2012 at 04:18:48PM +0900, Magnus Damm wrote:
> On Mon, Aug 20, 2012 at 2:24 PM, Paul Mundt <lethal@linux-sh.org> wrote:
> > On Sun, Aug 19, 2012 at 09:45:33PM -0700, Kuninori Morimoto wrote:
> >> > > irq: irq_domain_associate_many(<no-node>, irqbase=545, hwbase=545, count=1)
> >> > > irq: irq_domain_associate_many(<no-node>, irqbase=546, hwbase=546, count=1)
> >> > > irq: irq_domain_associate_many(<no-node>, irqbase=547, hwbase=547, count=1)
> >> > > irq: irq_domain_associate_many(<no-node>, irqbase=548, hwbase=548, count=1)
> >> > > irq: irq_domain_associate_many(<no-node>, irqbase=549, hwbase=549, count=1)
> >> > > irq: irq_domain_associate_many(<no-node>, irqbase=550, hwbase=550, count=1)
> >> > > irq: irq_domain_associate_many(<no-node>, irqbase=551, hwbase=551, count=1)
> >> > > irq: irq_domain_associate_many(<no-node>, irqbase=552, hwbase=552, count=1)
> >> > > ------------[ cut here ]------------
> >> > > WARNING: at /opt/usr/src/WORK/morimoto/gitlinux/linux-2.6/kernel/irq/irqdomain.)
> >> > > error: irq_desc already associated; irq=552 hwirq=0x228
> >> >
> >> > Well, that's certainly a valid bug. hwirq 552 is already bound to the
> >> > previous controller, and the vector in question is being registered a
> >> > second time under another controller. This looks to be RTDMAC_2_DEI6 (0x1300),
> >> > but the rest descends in to macro hell, so it's not obvious why the same
> >> > vector is being registered in multiple places.
> >>
> >>
> >> I'm not sure why, but this patch solved problem ?
> >>
> > I'll let Magnus figure this one out, as it was his hack in the first
> > place. At least we know the irqdomain code isn't at fault anymore.
> 
> Well, I'm quite certain it didn't trigger before the INTC code got
> this recent upgrade. Or did it fail silently? I wonder why we have to
> bump up the relocation base all of a sudden?

It was broken before, the second controller was simply trampling the
first one by way of the -EEXIST case from irq_alloc_desc_at(). The
irqdomain code has simply tightened down the sanity checks and error
path.

I have no idea what you intend to do with the relocation base, but it's
certainly not valid to have the same IRQ for multiple controllers.

> Last time I checked I had to revert two of your most recent commits to
> get the sh73a0 based board to even boot with upstream. I believe this
> is the same issue that Kobayashi-san and Morimoto-san have been talking
> about.
> 
Which have subsequently all been fixed. This issue is unrelated.

> Anyway, as I'm sure you've noticed, I put a sh7273 based board next to
> the H1 board a few weeks ago. I can also provide you with a sh73a0
> board if that would help. Please let me know if there is anything else
> you need.
> 
I don't intend to wade through the macro hell that you and Rafael
introduced to figure out why a definition is being repeated. I prefer to
avoid macro hell largely because it makes debugging things like this a
complete and utter nightmare.

You're free to ignore the warning until that gets sorted out, as it's not
fatal. As it stands sh73a0 is doing something bogus with its registration
that needs to be identified and corrected, unrelated to irqdomains.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kuninori Morimoto Aug. 20, 2012, 7:41 a.m. UTC | #8
Hi Paul
Cc Magnus

> > > place. At least we know the irqdomain code isn't at fault anymore.

I tried show irq number on "non-irqdomain kernel" and "irqdomain kernel".
And compared these 2 kernel irq table.
("irqdomain kernel" doesn't have my quick hack patch => got WARNING)

It were
	register_intc_controller(&intcs_desc);
	register_intc_controller(&intca_irq_pins_desc);
	register_intc_controller(&intc_pint0_desc);
	register_intc_controller(&intc_pint1_desc);

1st register_intc_controller()'s irq were
	irqdomain	: from 448 to 680
        non-irqdomain	: from 448 to 680
2nd register_intc_controller()'s irq were
	irqdomain	: from 560 to 959 <=
        non-irqdomain	: from 544 to 943 <=
3rd register_intc_controller()'s irq were
	irqdomain	: from 700 to 731
        non-irqdomain	: from 700 to 731
4th register_intc_controller()'s irq were
	irqdomain	: from 732 to 739
        non-irqdomain	: from 732 to 739

2nd register_intc_controller() mapped irq to strange area.

Best regards
---
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/mach-shmobile/intc-sh73a0.c b/arch/arm/mach-shmobile/intc-
index ee44740..a6eae4f 100644
--- a/arch/arm/mach-shmobile/intc-sh73a0.c
+++ b/arch/arm/mach-shmobile/intc-sh73a0.c
@@ -259,7 +259,7 @@  static int sh73a0_set_wake(struct irq_data *data, unsigned i
        return 0; /* always allow wakeup */
 }
 
-#define RELOC_BASE 0x1000
+#define RELOC_BASE 0x1200
 
 /* INTCA IRQ pins at INTCS + 0x1000 to make space for GIC+INTC handling */
 #define INTCS_VECT_RELOC(n, vect) INTCS_VECT((n), (vect) + RELOC_BASE)