On Mon, 2015-10-12 at 13:50 +0200, Arnd Bergmann wrote: > On Monday 12 October 2015 22:07:45 Michael Ellerman wrote: > > Yeah, this builds and boots at least on pseries KVM. > > > > diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/irq.h > > index e8e3a0a04eb0..35fba282b7f9 100644 > > --- a/arch/powerpc/include/asm/irq.h > > +++ b/arch/powerpc/include/asm/irq.h > > @@ -23,11 +23,8 @@ extern atomic_t ppc_n_lost_interrupts; > > /* This number is used when no interrupt has been assigned */ > > #define NO_IRQ (0) > > > > -/* Total number of virq in the platform */ > > -#define NR_IRQS CONFIG_NR_IRQS > > - > > -/* Same thing, used by the generic IRQ code */ > > #define NR_IRQS_LEGACY NUM_ISA_INTERRUPTS > > +#define NR_IRQS NR_IRQS_LEGACY > > > > extern irq_hw_number_t virq_to_hw(unsigned int virq); > > > > This looks like the way it's intended.
Hmm, though IRQ_BITMAP_BITS is still a hard limit, and by default it's set to NR_IRQS + 8196. So we'd be relying on the + 8196 to get us up to a reasonable number. That looks like it was added as a bit of a hack/bug-fix, so I'm not sure we want to rely on it. (c1ee6264280e ("genirq: Prevent access beyond allocated_irqs bitmap")) All the distros seem to run with NR_IRQS=512, so it seems no one has needed more than that or we would have heard about it presumably. At the same time if we're only spending a single bit for each interrupt number maybe we should just set it to min(512, NR_CPUS) or something like that to make sure it's always reasonably big. > I've also checked that no powerpc platform defines a static IRQ larger than > NUM_ISA_INTERRUPTS, and only two files do it at all > (arch/powerpc/platforms/chrp/pegasos_eth.c and > arch/powerpc/sysdev/rtc_cmos_setup.c). Thanks. You clearly have better grep fu than me :) cheers _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev