aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-10-15 18:38:50 -0400
committerThomas Gleixner <tglx@linutronix.de>2010-10-23 11:27:50 -0400
commit23f9b267159b4c7ff59d2e6c8ed31693eff841e3 (patch)
tree95373beca8cc9294e0202edfced58e66c97f8012 /arch/x86
parent5a7ae78fd478624df3059cb6f55056b85d074acc (diff)
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>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/include/asm/io_apic.h5
-rw-r--r--arch/x86/kernel/apic/io_apic.c6
-rw-r--r--arch/x86/kernel/setup.c5
3 files changed, 6 insertions, 10 deletions
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
index c8be4566c3d2..7e620baebf86 100644
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -159,7 +159,7 @@ struct io_apic_irq_attr;
159extern int io_apic_set_pci_routing(struct device *dev, int irq, 159extern int io_apic_set_pci_routing(struct device *dev, int irq,
160 struct io_apic_irq_attr *irq_attr); 160 struct io_apic_irq_attr *irq_attr);
161void setup_IO_APIC_irq_extra(u32 gsi); 161void setup_IO_APIC_irq_extra(u32 gsi);
162extern void ioapic_init_mappings(void); 162extern void ioapic_and_gsi_init(void);
163extern void ioapic_insert_resources(void); 163extern void ioapic_insert_resources(void);
164 164
165extern struct IO_APIC_route_entry **alloc_ioapic_entries(void); 165extern struct IO_APIC_route_entry **alloc_ioapic_entries(void);
@@ -168,8 +168,6 @@ extern int save_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries);
168extern void mask_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); 168extern void mask_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries);
169extern int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); 169extern int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries);
170 170
171extern void probe_nr_irqs_gsi(void);
172
173extern void setup_ioapic_ids_from_mpc(void); 171extern void setup_ioapic_ids_from_mpc(void);
174 172
175struct mp_ioapic_gsi{ 173struct mp_ioapic_gsi{
@@ -190,7 +188,6 @@ extern void __init pre_init_apic_IRQ0(void);
190static const int timer_through_8259 = 0; 188static const int timer_through_8259 = 0;
191static inline void ioapic_init_mappings(void) { } 189static inline void ioapic_init_mappings(void) { }
192static inline void ioapic_insert_resources(void) { } 190static inline void ioapic_insert_resources(void) { }
193static inline void probe_nr_irqs_gsi(void) { }
194#define gsi_top (NR_IRQS_LEGACY) 191#define gsi_top (NR_IRQS_LEGACY)
195static inline int mp_find_ioapic(u32 gsi) { return 0; } 192static inline int mp_find_ioapic(u32 gsi) { return 0; }
196 193
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 8ae808d110f4..ce3c6fb4f357 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -3639,7 +3639,7 @@ int __init io_apic_get_redir_entries (int ioapic)
3639 return reg_01.bits.entries + 1; 3639 return reg_01.bits.entries + 1;
3640} 3640}
3641 3641
3642void __init probe_nr_irqs_gsi(void) 3642static void __init probe_nr_irqs_gsi(void)
3643{ 3643{
3644 int nr; 3644 int nr;
3645 3645
@@ -3951,7 +3951,7 @@ static struct resource * __init ioapic_setup_resources(int nr_ioapics)
3951 return res; 3951 return res;
3952} 3952}
3953 3953
3954void __init ioapic_init_mappings(void) 3954void __init ioapic_and_gsi_init(void)
3955{ 3955{
3956 unsigned long ioapic_phys, idx = FIX_IO_APIC_BASE_0; 3956 unsigned long ioapic_phys, idx = FIX_IO_APIC_BASE_0;
3957 struct resource *ioapic_res; 3957 struct resource *ioapic_res;
@@ -3989,6 +3989,8 @@ fake_ioapic_page:
3989 ioapic_res->end = ioapic_phys + IO_APIC_SLOT_SIZE - 1; 3989 ioapic_res->end = ioapic_phys + IO_APIC_SLOT_SIZE - 1;
3990 ioapic_res++; 3990 ioapic_res++;
3991 } 3991 }
3992
3993 probe_nr_irqs_gsi();
3992} 3994}
3993 3995
3994void __init ioapic_insert_resources(void) 3996void __init ioapic_insert_resources(void)
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 420e64197850..b8982e0fc0c2 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -1017,10 +1017,7 @@ void __init setup_arch(char **cmdline_p)
1017#endif 1017#endif
1018 1018
1019 init_apic_mappings(); 1019 init_apic_mappings();
1020 ioapic_init_mappings(); 1020 ioapic_and_gsi_init();
1021
1022 /* need to wait for io_apic is mapped */
1023 probe_nr_irqs_gsi();
1024 1021
1025 kvm_guest_init(); 1022 kvm_guest_init();
1026 1023