On Tue, 2020-03-31 at 11:38 +0900, Hajime Tazaki wrote: > Thanks for the comments, Johannes. > > On Tue, 31 Mar 2020 06:31:15 +0900, > Johannes Berg wrote: > > > > > +++ b/arch/um/lkl/include/asm/irq.h > > > @@ -2,6 +2,9 @@ > > > #ifndef _ASM_LKL_IRQ_H > > > #define _ASM_LKL_IRQ_H > > > > > > +/* pull UML's definitions */ > > > +#include "../../../include/asm/irq.h" > > > > This is _really_ ugly. > > Hmm, in previous patchset (until v3), I was using the worse approach > (I thought) to avoid this include. > > +KBUILD_CFLAGS += -DTIMER_IRQ=0 -DUBD_IRQ=4 -DUM_ETH_IRQ=5 -DLAST_IRQ=15 > > And I thought the current way is better than before. Yeah, ok, that's worse :) But why is it even needed? It kinda seems to me that this means we're not splitting the code well. IMHO, if we even want to treat LKL/UML as sub-arches, then we should still split the driver code off in a cleaner way, rather than linking half here half there? And maybe reorg the code... but I'll reply over in your other email more. > > > @@ -181,6 +196,11 @@ void init_IRQ(void) > > > for (i = 0; i < NR_IRQS; i++) > > > irq_set_chip_and_handler(i, &dummy_irq_chip, handle_simple_irq); > > > > > > +#if defined(__linux) && (defined(__i386) || defined(__x86_64)) > > > > What's with all those ifdefs with this condition? > > Same as above. > but I agree that the ifdefs are cryptic; I'll try to make it more > understandable if I use ifdefs. I'm also generally not convinced that it's a good idea to sprinkle these kinds of ifdefs over the place. johannes