Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip:
x86: Disable large pages on CPUs with Atom erratum AAE44
x86-64: Clear a 64-bit FS/GS base on fork if selector is nonzero
x86, mrst: Conditionally register cpu hotplug notifier for apbt

+24 -3
+1 -1
arch/x86/kernel/apb_timer.c
··· 429 430 static __init int apbt_late_init(void) 431 { 432 - if (disable_apbt_percpu) 433 return 0; 434 /* This notifier should be called after workqueue is ready */ 435 hotcpu_notifier(apbt_cpuhp_notify, -20);
··· 429 430 static __init int apbt_late_init(void) 431 { 432 + if (disable_apbt_percpu || !apb_timer_block_enabled) 433 return 0; 434 /* This notifier should be called after workqueue is ready */ 435 hotcpu_notifier(apbt_cpuhp_notify, -20);
+21
arch/x86/kernel/cpu/intel.c
··· 47 (c->x86 == 0x6 && c->x86_model >= 0x0e)) 48 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); 49 50 #ifdef CONFIG_X86_64 51 set_cpu_cap(c, X86_FEATURE_SYSENTER32); 52 #else
··· 47 (c->x86 == 0x6 && c->x86_model >= 0x0e)) 48 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); 49 50 + /* 51 + * Atom erratum AAE44/AAF40/AAG38/AAH41: 52 + * 53 + * A race condition between speculative fetches and invalidating 54 + * a large page. This is worked around in microcode, but we 55 + * need the microcode to have already been loaded... so if it is 56 + * not, recommend a BIOS update and disable large pages. 57 + */ 58 + if (c->x86 == 6 && c->x86_model == 0x1c && c->x86_mask <= 2) { 59 + u32 ucode, junk; 60 + 61 + wrmsr(MSR_IA32_UCODE_REV, 0, 0); 62 + sync_core(); 63 + rdmsr(MSR_IA32_UCODE_REV, junk, ucode); 64 + 65 + if (ucode < 0x20e) { 66 + printk(KERN_WARNING "Atom PSE erratum detected, BIOS microcode update recommended\n"); 67 + clear_cpu_cap(c, X86_FEATURE_PSE); 68 + } 69 + } 70 + 71 #ifdef CONFIG_X86_64 72 set_cpu_cap(c, X86_FEATURE_SYSENTER32); 73 #else
+2 -2
arch/x86/kernel/process_64.c
··· 276 277 set_tsk_thread_flag(p, TIF_FORK); 278 279 - p->thread.fs = me->thread.fs; 280 - p->thread.gs = me->thread.gs; 281 p->thread.io_bitmap_ptr = NULL; 282 283 savesegment(gs, p->thread.gsindex); 284 savesegment(fs, p->thread.fsindex); 285 savesegment(es, p->thread.es); 286 savesegment(ds, p->thread.ds); 287
··· 276 277 set_tsk_thread_flag(p, TIF_FORK); 278 279 p->thread.io_bitmap_ptr = NULL; 280 281 savesegment(gs, p->thread.gsindex); 282 + p->thread.gs = p->thread.gsindex ? 0 : me->thread.gs; 283 savesegment(fs, p->thread.fsindex); 284 + p->thread.fs = p->thread.fsindex ? 0 : me->thread.fs; 285 savesegment(es, p->thread.es); 286 savesegment(ds, p->thread.ds); 287