diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-08-20 03:27:29 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-08-27 11:12:52 -0400 |
commit | de93410310952fb7b705f784ef22493c8362dbe8 (patch) | |
tree | ebf9925e8f78343ddb24049cc9146ead4df34661 /arch/x86/kernel/apic | |
parent | f4848472cd99487e182b64fb2a5d0e4fedbe86ad (diff) |
x86: Move ioapic_ids_setup to x86_init_ops
32bit and also the numaq code have special requirements on the
ioapic_id setup. Convert it to a x86_init_ops function and get rid
of the quirks and #ifdefs
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/apic')
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 11 | ||||
-rw-r--r-- | arch/x86/kernel/apic/numaq_32.c | 8 |
2 files changed, 5 insertions, 14 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index d2ed6c5ddc80..5f4687187ceb 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -2014,7 +2014,7 @@ void disable_IO_APIC(void) | |||
2014 | * by Matt Domsch <Matt_Domsch@dell.com> Tue Dec 21 12:25:05 CST 1999 | 2014 | * by Matt Domsch <Matt_Domsch@dell.com> Tue Dec 21 12:25:05 CST 1999 |
2015 | */ | 2015 | */ |
2016 | 2016 | ||
2017 | static void __init setup_ioapic_ids_from_mpc(void) | 2017 | void __init setup_ioapic_ids_from_mpc(void) |
2018 | { | 2018 | { |
2019 | union IO_APIC_reg_00 reg_00; | 2019 | union IO_APIC_reg_00 reg_00; |
2020 | physid_mask_t phys_id_present_map; | 2020 | physid_mask_t phys_id_present_map; |
@@ -2023,9 +2023,8 @@ static void __init setup_ioapic_ids_from_mpc(void) | |||
2023 | unsigned char old_id; | 2023 | unsigned char old_id; |
2024 | unsigned long flags; | 2024 | unsigned long flags; |
2025 | 2025 | ||
2026 | if (x86_quirks->setup_ioapic_ids && x86_quirks->setup_ioapic_ids()) | 2026 | if (acpi_ioapic) |
2027 | return; | 2027 | return; |
2028 | |||
2029 | /* | 2028 | /* |
2030 | * Don't check I/O APIC IDs for xAPIC systems. They have | 2029 | * Don't check I/O APIC IDs for xAPIC systems. They have |
2031 | * no meaning without the serial APIC bus. | 2030 | * no meaning without the serial APIC bus. |
@@ -3061,10 +3060,8 @@ void __init setup_IO_APIC(void) | |||
3061 | /* | 3060 | /* |
3062 | * Set up IO-APIC IRQ routing. | 3061 | * Set up IO-APIC IRQ routing. |
3063 | */ | 3062 | */ |
3064 | #ifdef CONFIG_X86_32 | 3063 | x86_init.mpparse.setup_ioapic_ids(); |
3065 | if (!acpi_ioapic) | 3064 | |
3066 | setup_ioapic_ids_from_mpc(); | ||
3067 | #endif | ||
3068 | sync_Arb_IDs(); | 3065 | sync_Arb_IDs(); |
3069 | setup_IO_APIC_irqs(); | 3066 | setup_IO_APIC_irqs(); |
3070 | init_IO_APIC_traps(); | 3067 | init_IO_APIC_traps(); |
diff --git a/arch/x86/kernel/apic/numaq_32.c b/arch/x86/kernel/apic/numaq_32.c index b5f0b1dc7dd0..f3717659265d 100644 --- a/arch/x86/kernel/apic/numaq_32.c +++ b/arch/x86/kernel/apic/numaq_32.c | |||
@@ -262,12 +262,6 @@ static void __init | |||
262 | } | 262 | } |
263 | } | 263 | } |
264 | 264 | ||
265 | static int __init numaq_setup_ioapic_ids(void) | ||
266 | { | ||
267 | /* so can skip it */ | ||
268 | return 1; | ||
269 | } | ||
270 | |||
271 | static struct x86_quirks numaq_x86_quirks __initdata = { | 265 | static struct x86_quirks numaq_x86_quirks __initdata = { |
272 | .arch_pre_time_init = numaq_pre_time_init, | 266 | .arch_pre_time_init = numaq_pre_time_init, |
273 | .arch_time_init = NULL, | 267 | .arch_time_init = NULL, |
@@ -280,7 +274,6 @@ static struct x86_quirks numaq_x86_quirks __initdata = { | |||
280 | .mpc_oem_bus_info = mpc_oem_bus_info, | 274 | .mpc_oem_bus_info = mpc_oem_bus_info, |
281 | .mpc_oem_pci_bus = mpc_oem_pci_bus, | 275 | .mpc_oem_pci_bus = mpc_oem_pci_bus, |
282 | .smp_read_mpc_oem = smp_read_mpc_oem, | 276 | .smp_read_mpc_oem = smp_read_mpc_oem, |
283 | .setup_ioapic_ids = numaq_setup_ioapic_ids, | ||
284 | }; | 277 | }; |
285 | 278 | ||
286 | static __init void early_check_numaq(void) | 279 | static __init void early_check_numaq(void) |
@@ -299,6 +292,7 @@ static __init void early_check_numaq(void) | |||
299 | if (found_numaq) { | 292 | if (found_numaq) { |
300 | x86_quirks = &numaq_x86_quirks; | 293 | x86_quirks = &numaq_x86_quirks; |
301 | x86_init.mpparse.mpc_record = numaq_mpc_record; | 294 | x86_init.mpparse.mpc_record = numaq_mpc_record; |
295 | x86_init.mpparse.setup_ioapic_ids = x86_init_noop; | ||
302 | } | 296 | } |
303 | } | 297 | } |
304 | 298 | ||