@@ -160,8 +160,6 @@ extern int save_ioapic_entries(void);
extern void mask_ioapic_entries(void);
extern int restore_ioapic_entries(void);
-extern int get_nr_irqs_gsi(void);
-
extern void setup_ioapic_ids_from_mpc(void);
extern void setup_ioapic_ids_from_mpc_nocheck(void);
@@ -3417,11 +3417,6 @@ static void __init probe_nr_irqs_gsi(void)
printk(KERN_DEBUG "nr_irqs_gsi: %d\n", nr_irqs_gsi);
}
-int get_nr_irqs_gsi(void)
-{
- return nr_irqs_gsi;
-}
-
unsigned int arch_dynirq_lower_bound(unsigned int from)
{
return from < nr_irqs_gsi ? nr_irqs_gsi : from;
@@ -62,7 +62,7 @@ static int do_setup_msi_irqs(struct pci_dev *dev, int nvec)
WARN_ON(msidesc->nvec_used);
node = dev_to_node(&dev->dev);
- irq = __create_irqs(get_nr_irqs_gsi(), nvec, node);
+ irq = __create_irqs(arch_dynirq_lower_bound(0), nvec, node);
if (irq == 0)
return -ENOSPC;
@@ -109,7 +109,7 @@ static int do_setup_msix_irqs(struct pci_dev *dev, int nvec)
unsigned int irq;
node = dev_to_node(&dev->dev);
- irq = get_nr_irqs_gsi();
+ irq = arch_dynirq_lower_bound(0);
sub_handle = 0;
list_for_each_entry(msidesc, &dev->msi_list, list) {
@@ -402,7 +402,7 @@ static int __must_check xen_allocate_irqs_dynamic(int nvec)
* collisions.
*/
if (xen_initial_domain() || xen_hvm_domain())
- first = get_nr_irqs_gsi();
+ first = arch_dynirq_lower_bound(0);
#endif
irq = irq_alloc_descs_from(first, nvec, -1);
Currently all callers use get_nr_irqs_gsi() to get the lowest dynamic allocatable IRQ number, and arch_dynirq_lower_bound(0) achieves the same goal with a better name. So replace get_nr_irqs_gsi() with arch_dynirq_lower_bound(0). It will also help to support dynamic IRQ allocation for IOAPIC by using arch_dynirq_lower_bound(). Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> --- arch/x86/include/asm/io_apic.h | 2 -- arch/x86/kernel/apic/io_apic.c | 5 ----- drivers/iommu/irq_remapping.c | 4 ++-- drivers/xen/events/events_base.c | 2 +- 4 files changed, 3 insertions(+), 10 deletions(-)