x86: apic: Move probe_nr_irqs_gsi() into ioapic_init_mappings()

probe_br_irqs_gsi() is called right after ioapic_init_mappings() and
there are no other users. Move it into ioapic_init_mappings() so the
declaration can disappear and the function can become static.

Rename ioapic_init_mappings() to ioapic_and_gsi_init() to reflect that
change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
LKML-Reference: <1287510389-8388-2-git-send-email-dirk.brandewie@gmail.com>
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>

+6 -10
+1 -4
arch/x86/include/asm/io_apic.h
··· 159 159 extern int io_apic_set_pci_routing(struct device *dev, int irq, 160 160 struct io_apic_irq_attr *irq_attr); 161 161 void setup_IO_APIC_irq_extra(u32 gsi); 162 - extern void ioapic_init_mappings(void); 162 + extern void ioapic_and_gsi_init(void); 163 163 extern void ioapic_insert_resources(void); 164 164 165 165 extern struct IO_APIC_route_entry **alloc_ioapic_entries(void); ··· 167 167 extern int save_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); 168 168 extern void mask_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); 169 169 extern int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); 170 - 171 - extern void probe_nr_irqs_gsi(void); 172 170 173 171 extern void setup_ioapic_ids_from_mpc(void); 174 172 ··· 188 190 static const int timer_through_8259 = 0; 189 191 static inline void ioapic_init_mappings(void) { } 190 192 static inline void ioapic_insert_resources(void) { } 191 - static inline void probe_nr_irqs_gsi(void) { } 192 193 #define gsi_top (NR_IRQS_LEGACY) 193 194 static inline int mp_find_ioapic(u32 gsi) { return 0; } 194 195
+4 -2
arch/x86/kernel/apic/io_apic.c
··· 3639 3639 return reg_01.bits.entries + 1; 3640 3640 } 3641 3641 3642 - void __init probe_nr_irqs_gsi(void) 3642 + static void __init probe_nr_irqs_gsi(void) 3643 3643 { 3644 3644 int nr; 3645 3645 ··· 3951 3951 return res; 3952 3952 } 3953 3953 3954 - void __init ioapic_init_mappings(void) 3954 + void __init ioapic_and_gsi_init(void) 3955 3955 { 3956 3956 unsigned long ioapic_phys, idx = FIX_IO_APIC_BASE_0; 3957 3957 struct resource *ioapic_res; ··· 3989 3989 ioapic_res->end = ioapic_phys + IO_APIC_SLOT_SIZE - 1; 3990 3990 ioapic_res++; 3991 3991 } 3992 + 3993 + probe_nr_irqs_gsi(); 3992 3994 } 3993 3995 3994 3996 void __init ioapic_insert_resources(void)
+1 -4
arch/x86/kernel/setup.c
··· 1017 1017 #endif 1018 1018 1019 1019 init_apic_mappings(); 1020 - ioapic_init_mappings(); 1021 - 1022 - /* need to wait for io_apic is mapped */ 1023 - probe_nr_irqs_gsi(); 1020 + ioapic_and_gsi_init(); 1024 1021 1025 1022 kvm_guest_init(); 1026 1023