]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
x86/ioapic: add prototype for io_apic_gsi_base to io_apic.h
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 4 Apr 2017 09:34:26 +0000 (11:34 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 4 Apr 2017 09:34:26 +0000 (11:34 +0200)
So that the function can be called from other files without adding prototypes
to each of them.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/io_apic.c
xen/arch/x86/mpparse.c
xen/include/asm-x86/io_apic.h

index 24ee431b00a5f7faa3442964afa59ea448fda678..d18046067cca5fd19ceaa5f40bef82804bc520ce 100644 (file)
@@ -2274,8 +2274,6 @@ static int ioapic_physbase_to_id(unsigned long physbase)
     return -EINVAL;
 }
 
-unsigned apic_gsi_base(int apic);
-
 static int apic_pin_2_gsi_irq(int apic, int pin)
 {
     int idx;
@@ -2286,7 +2284,7 @@ static int apic_pin_2_gsi_irq(int apic, int pin)
     idx = find_irq_entry(apic, pin, mp_INT);
 
     return idx >= 0 ? pin_2_irq(idx, apic, pin)
-                    : apic_gsi_base(apic) + pin;
+                    : io_apic_gsi_base(apic) + pin;
 }
 
 int ioapic_guest_read(unsigned long physbase, unsigned int reg, u32 *pval)
index 1eb7c99ea718e472febdf656db1214714313fce4..efcbc6115d2f08d3b9fcb74e1412aa3ec5e2fa93 100644 (file)
@@ -913,7 +913,7 @@ unsigned __init highest_gsi(void)
        return res;
 }
 
-unsigned apic_gsi_base(int apic)
+unsigned int io_apic_gsi_base(unsigned int apic)
 {
        return mp_ioapic_routing[apic].gsi_base;
 }
index 225edd63b26961be2a94c56849dfe2e74e4d3fed..8029c8f400763372446ec8435910950673c10320 100644 (file)
@@ -127,6 +127,9 @@ struct __packed IO_APIC_route_entry {
 /* I/O APIC entries */
 extern struct mpc_config_ioapic mp_ioapics[MAX_IO_APICS];
 
+/* Base GSI for this IO APIC */
+unsigned int io_apic_gsi_base(unsigned int apic);
+
 /* Only need to remap ioapic RTE (reg: 10~3Fh) */
 #define ioapic_reg_remapped(reg) (iommu_intremap && ((reg) >= 0x10))