x86: io_apic: Split setup_ioapic_ids_from_mpc()

Sodaville needs to setup the IO_APIC ids as the boot loader leaves
them uninitialized. Split out the setter function so it can be called
unconditionally from the sodaville board code.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <20101126165020.GA26361@www.tglx.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

authored by Sebastian Andrzej Siewior and committed by Thomas Gleixner a38c5380 7fb2b870

+17 -12
+1
arch/x86/include/asm/io_apic.h
··· 169 extern int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); 170 171 extern void setup_ioapic_ids_from_mpc(void); 172 173 struct mp_ioapic_gsi{ 174 u32 gsi_base;
··· 169 extern int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); 170 171 extern void setup_ioapic_ids_from_mpc(void); 172 + extern void setup_ioapic_ids_from_mpc_nocheck(void); 173 174 struct mp_ioapic_gsi{ 175 u32 gsi_base;
+16 -12
arch/x86/kernel/apic/io_apic.c
··· 1934 * 1935 * by Matt Domsch <Matt_Domsch@dell.com> Tue Dec 21 12:25:05 CST 1999 1936 */ 1937 - 1938 - void __init setup_ioapic_ids_from_mpc(void) 1939 { 1940 union IO_APIC_reg_00 reg_00; 1941 physid_mask_t phys_id_present_map; ··· 1943 unsigned char old_id; 1944 unsigned long flags; 1945 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 /* 1956 * This is broken; anything with a real cpu count has to 1957 * circumvent this idiocy regardless. ··· 1996 physids_or(phys_id_present_map, phys_id_present_map, tmp); 1997 } 1998 1999 - 2000 /* 2001 * We need to adjust the IRQ routing table 2002 * if the ID changed. ··· 2030 else 2031 apic_printk(APIC_VERBOSE, " ok.\n"); 2032 } 2033 } 2034 #endif 2035
··· 1934 * 1935 * by Matt Domsch <Matt_Domsch@dell.com> Tue Dec 21 12:25:05 CST 1999 1936 */ 1937 + void __init setup_ioapic_ids_from_mpc_nocheck(void) 1938 { 1939 union IO_APIC_reg_00 reg_00; 1940 physid_mask_t phys_id_present_map; ··· 1944 unsigned char old_id; 1945 unsigned long flags; 1946 1947 /* 1948 * This is broken; anything with a real cpu count has to 1949 * circumvent this idiocy regardless. ··· 2006 physids_or(phys_id_present_map, phys_id_present_map, tmp); 2007 } 2008 2009 /* 2010 * We need to adjust the IRQ routing table 2011 * if the ID changed. ··· 2041 else 2042 apic_printk(APIC_VERBOSE, " ok.\n"); 2043 } 2044 + } 2045 + 2046 + void __init setup_ioapic_ids_from_mpc(void) 2047 + { 2048 + 2049 + if (acpi_ioapic) 2050 + return; 2051 + /* 2052 + * Don't check I/O APIC IDs for xAPIC systems. They have 2053 + * no meaning without the serial APIC bus. 2054 + */ 2055 + if (!(boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) 2056 + || APIC_XAPIC(apic_version[boot_cpu_physical_apicid])) 2057 + return; 2058 + setup_ioapic_ids_from_mpc_nocheck(); 2059 } 2060 #endif 2061