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

x86: Get rid of get_nr_irqs_gsi()

No need to expose this outside of the ioapic code. The dynamic
allocations are guaranteed not to happen in the gsi space. See commit
62a08ae2a.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Grant Likely <grant.likely@linaro.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: x86@kernel.org
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xenproject.org
Link: http://lkml.kernel.org/r/20140507154335.959870037@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

+1 -23
-2
arch/x86/include/asm/io_apic.h
··· 168 168 extern void mask_ioapic_entries(void); 169 169 extern int restore_ioapic_entries(void); 170 170 171 - extern int get_nr_irqs_gsi(void); 172 - 173 171 extern void setup_ioapic_ids_from_mpc(void); 174 172 extern void setup_ioapic_ids_from_mpc_nocheck(void); 175 173
-5
arch/x86/kernel/apic/io_apic.c
··· 3450 3450 printk(KERN_DEBUG "nr_irqs_gsi: %d\n", nr_irqs_gsi); 3451 3451 } 3452 3452 3453 - int get_nr_irqs_gsi(void) 3454 - { 3455 - return nr_irqs_gsi; 3456 - } 3457 - 3458 3453 unsigned int arch_dynirq_lower_bound(unsigned int from) 3459 3454 { 3460 3455 return from < nr_irqs_gsi ? nr_irqs_gsi : from;
+1 -16
drivers/xen/events/events_base.c
··· 390 390 391 391 static int __must_check xen_allocate_irqs_dynamic(int nvec) 392 392 { 393 - int first = 0; 394 - int i, irq; 395 - 396 - #ifdef CONFIG_X86_IO_APIC 397 - /* 398 - * For an HVM guest or domain 0 which see "real" (emulated or 399 - * actual respectively) GSIs we allocate dynamic IRQs 400 - * e.g. those corresponding to event channels or MSIs 401 - * etc. from the range above those "real" GSIs to avoid 402 - * collisions. 403 - */ 404 - if (xen_initial_domain() || xen_hvm_domain()) 405 - first = get_nr_irqs_gsi(); 406 - #endif 407 - 408 - irq = irq_alloc_descs_from(first, nvec, -1); 393 + int i, irq = irq_alloc_descs(-1, 0, nvec, -1); 409 394 410 395 if (irq >= 0) { 411 396 for (i = 0; i < nvec; i++)