diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-09-23 17:49:55 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-23 18:08:26 +0200 |
commit | 11868a2dc4f5e4f2f652bfd259e1360193fcee62 (patch) | |
tree | 54c83a3acde4931a1aa93e7b9231f0ad87668f2d /arch/x86/kernel/efi.c | |
parent | 14c93e8eba70c3c85d8f8acc6cfdc728aef92076 (diff) | |
download | blackbird-op-linux-11868a2dc4f5e4f2f652bfd259e1360193fcee62.tar.gz blackbird-op-linux-11868a2dc4f5e4f2f652bfd259e1360193fcee62.zip |
x86: mce: Use safer ways to access MCE registers
Use rdmsrl_safe() when accessing MCE registers. While in
theory we always 'know' which ones are safe to access from
the capability bits, there's a lot of hardware variations
and reality might differ from theory, as it did in this case:
http://bugzilla.kernel.org/show_bug.cgi?id=14204
[ 0.010016] mce: CPU supports 5 MCE banks
[ 0.011029] general protection fault: 0000 [#1]
[ 0.011998] last sysfs file:
[ 0.011998] Modules linked in:
[ 0.011998]
[ 0.011998] Pid: 0, comm: swapper Not tainted (2.6.31_router #1) HP Vectra
[ 0.011998] EIP: 0060:[<c100d9b9>] EFLAGS: 00010246 CPU: 0
[ 0.011998] EIP is at mce_rdmsrl+0x19/0x60
[ 0.011998] EAX: 00000000 EBX: 00000001 ECX: 00000407 EDX: 08000000
[ 0.011998] ESI: 00000000 EDI: 8c000000 EBP: 00000405 ESP: c17d5eac
So WARN_ONCE() instead of crashing the box.
( also fix a number of stylistic inconsistencies in the code. )
Note, we might still crash in wrmsrl() if we get that far, but
we shouldnt if the registers are truly inaccessible.
Reported-by: GNUtoo <GNUtoo@no-log.org>
Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Huang Ying <ying.huang@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
LKML-Reference: <bug-14204-5438@http.bugzilla.kernel.org/>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/efi.c')
0 files changed, 0 insertions, 0 deletions