Le 12/09/2023 à 19:02, Christophe Leroy a écrit : > > > Le 12/09/2023 à 18:49, Paul E. McKenney a écrit : >> On Tue, Sep 12, 2023 at 11:44:23AM -0400, Liam R. Howlett wrote: >>>> So my question is why is it useful to setup interrupts that early, given >>>> that interrupts cannot possibly happen until the boot CPU enables them? >>> >>> I don't know for sure, but there are 'preallocated IRQs' which end up >>> grouped 0-15, then I see another one added at 55 after the mpic console >>> output. I suspect it's so that they can be added as they are discovered >>> during early boot? >> >> Christophe argues that the interrupt stacks must be allocated early >> on, and that this acquires a mutex. >> > > Well, we can probably allocate them later than it is today. > > In commit 547db12fd8a0 ("powerpc/32: Use vmapped stacks for interrupts") > I already pushed the allocation at a later stage than it initialy was. > > We can probably do it later if it helps, however it definitely needs to > be done before enabling IRQs for obvious reasons, so it is a problem > that alloc_vm_stack() calling __vmalloc_node() enables IRQs. For FWIW, looks like arm32 is doing similar so the problem is likely to happen for them too. For that both CONFIG_IRQSTACKS and CONFIG_VMAP_STACK must be set it seems. Christophe