Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390: use SPARSE_IRQ

Use dynamically allocated irq descriptors on s390 which allows
us to get rid of the s390 specific config option PCI_NR_MSI and
exploit more MSI interrupts. Also the size of the kernel image
is reduced by 131K (using performance_defconfig).

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Sebastian Ott and committed by
Martin Schwidefsky
bb98f396 1b8b9c81

+7 -18
+1 -10
arch/s390/Kconfig
··· 163 163 select NO_BOOTMEM 164 164 select OLD_SIGACTION 165 165 select OLD_SIGSUSPEND3 166 + select SPARSE_IRQ 166 167 select SYSCTL_EXCEPTION_TRACE 167 168 select TTY 168 169 select VIRT_CPU_ACCOUNTING ··· 605 604 help 606 605 This allows you to specify the maximum number of PCI functions which 607 606 this kernel will support. 608 - 609 - config PCI_NR_MSI 610 - int "Maximum number of MSI interrupts (64-32768)" 611 - range 64 32768 612 - default "256" 613 - help 614 - This defines the number of virtual interrupts the kernel will 615 - provide for MSI interrupts. If you configure your system to have 616 - too few drivers will fail to allocate MSI interrupts for all 617 - PCI devices. 618 607 619 608 source "drivers/pci/Kconfig" 620 609
+2 -5
arch/s390/include/asm/irq.h
··· 7 7 8 8 #define NR_IRQS_BASE 3 9 9 10 - #ifdef CONFIG_PCI_NR_MSI 11 - # define NR_IRQS (NR_IRQS_BASE + CONFIG_PCI_NR_MSI) 12 - #else 13 - # define NR_IRQS NR_IRQS_BASE 14 - #endif 10 + #define NR_IRQS NR_IRQS_BASE 11 + #define NR_IRQS_LEGACY NR_IRQS_BASE 15 12 16 13 /* External interruption codes */ 17 14 #define EXT_IRQ_INTERRUPT_KEY 0x0040
+4 -3
arch/s390/kernel/irq.c
··· 127 127 seq_printf(p, "CPU%d ", cpu); 128 128 seq_putc(p, '\n'); 129 129 } 130 - if (index < NR_IRQS) { 131 - if (index >= NR_IRQS_BASE) 132 - goto out; 130 + if (index < NR_IRQS_BASE) { 133 131 seq_printf(p, "%s: ", irqclass_main_desc[index].name); 134 132 irq = irqclass_main_desc[index].irq; 135 133 for_each_online_cpu(cpu) ··· 135 137 seq_putc(p, '\n'); 136 138 goto out; 137 139 } 140 + if (index > NR_IRQS_BASE) 141 + goto out; 142 + 138 143 for (index = 0; index < NR_ARCH_IRQS; index++) { 139 144 seq_printf(p, "%s: ", irqclass_sub_desc[index].name); 140 145 irq = irqclass_sub_desc[index].irq;