DMI/APIC updates 4 of 4: dmi-apic-fixups
PATCH 1/1 DMI/APIC updates 4 of 4: dmi-apic-fixups
Linus,
This is part 4 of 4 of a patch set for 2.5.2-pre6 to move the x86 DMI scan to an earlier point in the boot sequence. This is motivated by the UP APIC code, which must be disabled on some machines with broken BIOSen, but there are also other cases that would benefit from it. Tested. Please apply.
This last patch (patch-dmi-apic-fixups) adds DMI matching rules and APIC workarounds to detect and handle machines known to have UP APIC problems, currently Dell laptops and Intel's old AL440LX. The UP APIC initialisation is moved from setup_arch() to trap_init(); this minor adjustment allows the UP APIC initialisation to respond to DMI matches and explicit kernel command line options. To be effective, this needs the early-dmi-scan patch I posted previously.
/Mikael
arch/i386/kernel/apic.c +11 -0
@@ -578,12 +578,17 @@* Detect and enable local APICs on non-SMP boards. * Original code written by Keir Fraser. */ +int dont_enable_local_apic__initdata =0 ;static int __init detect_init_APIC (void ) {u32 h, l, features;extern void get_cpu_vendor (struct cpuinfo_x86 *); +/* Disabled by DMI scan or kernel option? */ +if (dont_enable_local_apic) +return -1 ; +/* Workaround for us being called before identify_cpu(). */ get_cpu_vendor (&boot_cpu_data);
@@ -901,8 +906,14 @@static unsigned int calibration_result; +int dont_use_local_apic_timer__initdata =0 ; +void __init setup_APIC_clocks (void ) { +/* Disabled by DMI scan or kernel option? */ +if (dont_use_local_apic_timer) +return ; +printk ("Using local APIC timer interrupts.\n" ); using_apic_timer =1 ;
arch/i386/kernel/dmi_scan.c +56 -0
68 lines not on this page · raw message
arch/i386/kernel/setup.c +0 -1
@@ -870,7 +870,6 @@*/ if (smp_found_config)get_smp_config (); -init_apic_mappings ();#endif
arch/i386/kernel/traps.c +4 -0
@@ -920,6 +920,10 @@ EISA_bus =1 ;#endif +#ifdef CONFIG_X86_LOCAL_APIC +init_apic_mappings (); +#endif +set_trap_gate (0 ,÷_error);set_trap_gate (1 ,&debug);set_intr_gate (2 ,&nmi);