summaryrefslogtreecommitdiffstats
path: root/mm/mlock.c
diff options
context:
space:
mode:
authorSuresh Siddha <suresh.b.siddha@intel.com>2009-12-16 16:25:42 -0800
committerH. Peter Anvin <hpa@zytor.com>2009-12-16 16:30:57 -0800
commit45a94d7cd45ed991914011919e7d40eb6d2546d1 (patch)
treee56674f1da20a6df352ea17f3242d03b2648e229 /mm/mlock.c
parent6ede31e03084ee084bcee073ef3d1136f68d0906 (diff)
downloadlinux-45a94d7cd45ed991914011919e7d40eb6d2546d1.tar.gz
linux-45a94d7cd45ed991914011919e7d40eb6d2546d1.tar.bz2
linux-45a94d7cd45ed991914011919e7d40eb6d2546d1.zip
x86, cpuid: Add "volatile" to asm in native_cpuid()
xsave_cntxt_init() does something like: cpuid(0xd, ..); // find out what features FP/SSE/.. etc are supported xsetbv(); // enable the features known to OS cpuid(0xd, ..); // find out the size of the context for features enabled Depending on what features get enabled in xsetbv(), value of the cpuid.eax=0xd.ecx=0.ebx changes correspondingly (representing the size of the context that is enabled). As we don't have volatile keyword for native_cpuid(), gcc 4.1.2 optimizes away the second cpuid and the kernel continues to use the cpuid information obtained before xsetbv(), ultimately leading to kernel crash on processors supporting more state than the legacy FP/SSE. Add "volatile" for native_cpuid(). Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> LKML-Reference: <1261009542.2745.55.camel@sbs-t61.sc.intel.com> Cc: stable@kernel.org Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'mm/mlock.c')
0 files changed, 0 insertions, 0 deletions