aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic/io_apic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/apic/io_apic.c')
-rw-r--r--arch/x86/kernel/apic/io_apic.c37
1 files changed, 22 insertions, 15 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 16c2db8750a2..f6cd5b410770 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1933,8 +1933,7 @@ void disable_IO_APIC(void)
1933 * 1933 *
1934 * by Matt Domsch <Matt_Domsch@dell.com> Tue Dec 21 12:25:05 CST 1999 1934 * by Matt Domsch <Matt_Domsch@dell.com> Tue Dec 21 12:25:05 CST 1999
1935 */ 1935 */
1936 1936void __init setup_ioapic_ids_from_mpc_nocheck(void)
1937void __init setup_ioapic_ids_from_mpc(void)
1938{ 1937{
1939 union IO_APIC_reg_00 reg_00; 1938 union IO_APIC_reg_00 reg_00;
1940 physid_mask_t phys_id_present_map; 1939 physid_mask_t phys_id_present_map;
@@ -1943,15 +1942,6 @@ void __init setup_ioapic_ids_from_mpc(void)
1943 unsigned char old_id; 1942 unsigned char old_id;
1944 unsigned long flags; 1943 unsigned long flags;
1945 1944
1946 if (acpi_ioapic)
1947 return;
1948 /*
1949 * Don't check I/O APIC IDs for xAPIC systems. They have
1950 * no meaning without the serial APIC bus.
1951 */
1952 if (!(boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)
1953 || APIC_XAPIC(apic_version[boot_cpu_physical_apicid]))
1954 return;
1955 /* 1945 /*
1956 * This is broken; anything with a real cpu count has to 1946 * This is broken; anything with a real cpu count has to
1957 * circumvent this idiocy regardless. 1947 * circumvent this idiocy regardless.
@@ -2005,7 +1995,6 @@ void __init setup_ioapic_ids_from_mpc(void)
2005 physids_or(phys_id_present_map, phys_id_present_map, tmp); 1995 physids_or(phys_id_present_map, phys_id_present_map, tmp);
2006 } 1996 }
2007 1997
2008
2009 /* 1998 /*
2010 * We need to adjust the IRQ routing table 1999 * We need to adjust the IRQ routing table
2011 * if the ID changed. 2000 * if the ID changed.
@@ -2041,6 +2030,21 @@ void __init setup_ioapic_ids_from_mpc(void)
2041 apic_printk(APIC_VERBOSE, " ok.\n"); 2030 apic_printk(APIC_VERBOSE, " ok.\n");
2042 } 2031 }
2043} 2032}
2033
2034void __init setup_ioapic_ids_from_mpc(void)
2035{
2036
2037 if (acpi_ioapic)
2038 return;
2039 /*
2040 * Don't check I/O APIC IDs for xAPIC systems. They have
2041 * no meaning without the serial APIC bus.
2042 */
2043 if (!(boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)
2044 || APIC_XAPIC(apic_version[boot_cpu_physical_apicid]))
2045 return;
2046 setup_ioapic_ids_from_mpc_nocheck();
2047}
2044#endif 2048#endif
2045 2049
2046int no_timer_check __initdata; 2050int no_timer_check __initdata;
@@ -3593,7 +3597,7 @@ int __init io_apic_get_redir_entries (int ioapic)
3593 return reg_01.bits.entries + 1; 3597 return reg_01.bits.entries + 1;
3594} 3598}
3595 3599
3596void __init probe_nr_irqs_gsi(void) 3600static void __init probe_nr_irqs_gsi(void)
3597{ 3601{
3598 int nr; 3602 int nr;
3599 3603
@@ -3910,7 +3914,7 @@ static struct resource * __init ioapic_setup_resources(int nr_ioapics)
3910 return res; 3914 return res;
3911} 3915}
3912 3916
3913void __init ioapic_init_mappings(void) 3917void __init ioapic_and_gsi_init(void)
3914{ 3918{
3915 unsigned long ioapic_phys, idx = FIX_IO_APIC_BASE_0; 3919 unsigned long ioapic_phys, idx = FIX_IO_APIC_BASE_0;
3916 struct resource *ioapic_res; 3920 struct resource *ioapic_res;
@@ -3948,6 +3952,8 @@ fake_ioapic_page:
3948 ioapic_res->end = ioapic_phys + IO_APIC_SLOT_SIZE - 1; 3952 ioapic_res->end = ioapic_phys + IO_APIC_SLOT_SIZE - 1;
3949 ioapic_res++; 3953 ioapic_res++;
3950 } 3954 }
3955
3956 probe_nr_irqs_gsi();
3951} 3957}
3952 3958
3953void __init ioapic_insert_resources(void) 3959void __init ioapic_insert_resources(void)
@@ -4057,7 +4063,8 @@ void __init pre_init_apic_IRQ0(void)
4057 4063
4058 printk(KERN_INFO "Early APIC setup for system timer0\n"); 4064 printk(KERN_INFO "Early APIC setup for system timer0\n");
4059#ifndef CONFIG_SMP 4065#ifndef CONFIG_SMP
4060 phys_cpu_present_map = physid_mask_of_physid(boot_cpu_physical_apicid); 4066 physid_set_mask_of_physid(boot_cpu_physical_apicid,
4067 &phys_cpu_present_map);
4061#endif 4068#endif
4062 /* Make sure the irq descriptor is set up */ 4069 /* Make sure the irq descriptor is set up */
4063 cfg = alloc_irq_and_cfg_at(0, 0); 4070 cfg = alloc_irq_and_cfg_at(0, 0);