diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-05 18:30:21 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-05 18:30:21 -0500 |
| commit | c3fa27d1367fac63ac8533d6f20ea851d0d70a10 (patch) | |
| tree | e7731554085e22b6b63411b1ebb401079f3e0bbb /drivers | |
| parent | 96fa2b508d2d3fe040cf4ef2fffb955f0a537ea1 (diff) | |
| parent | d103d01e4b19f185d3c85f77402b605534c32e89 (diff) | |
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (470 commits)
x86: Fix comments of register/stack access functions
perf tools: Replace %m with %a in sscanf
hw-breakpoints: Keep track of user disabled breakpoints
tracing/syscalls: Make syscall events print callbacks static
tracing: Add DEFINE_EVENT(), DEFINE_SINGLE_EVENT() support to docbook
perf: Don't free perf_mmap_data until work has been done
perf_event: Fix compile error
perf tools: Fix _GNU_SOURCE macro related strndup() build error
trace_syscalls: Remove unused syscall_name_to_nr()
trace_syscalls: Simplify syscall profile
trace_syscalls: Remove duplicate init_enter_##sname()
trace_syscalls: Add syscall_nr field to struct syscall_metadata
trace_syscalls: Remove enter_id exit_id
trace_syscalls: Set event_enter_##sname->data to its metadata
trace_syscalls: Remove unused event_syscall_enter and event_syscall_exit
perf_event: Initialize data.period in perf_swevent_hrtimer()
perf probe: Simplify event naming
perf probe: Add --list option for listing current probe events
perf probe: Add argv_split() from lib/argv_split.c
perf probe: Move probe event utility functions to probe-event.c
...
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/edac/edac_mce_amd.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/edac/edac_mce_amd.c b/drivers/edac/edac_mce_amd.c index 713ed7d37247..689cc6a6214d 100644 --- a/drivers/edac/edac_mce_amd.c +++ b/drivers/edac/edac_mce_amd.c | |||
| @@ -3,7 +3,6 @@ | |||
| 3 | 3 | ||
| 4 | static bool report_gart_errors; | 4 | static bool report_gart_errors; |
| 5 | static void (*nb_bus_decoder)(int node_id, struct err_regs *regs); | 5 | static void (*nb_bus_decoder)(int node_id, struct err_regs *regs); |
| 6 | static void (*orig_mce_callback)(struct mce *m); | ||
| 7 | 6 | ||
| 8 | void amd_report_gart_errors(bool v) | 7 | void amd_report_gart_errors(bool v) |
| 9 | { | 8 | { |
| @@ -363,8 +362,10 @@ static inline void amd_decode_err_code(unsigned int ec) | |||
| 363 | pr_warning("Huh? Unknown MCE error 0x%x\n", ec); | 362 | pr_warning("Huh? Unknown MCE error 0x%x\n", ec); |
| 364 | } | 363 | } |
| 365 | 364 | ||
| 366 | static void amd_decode_mce(struct mce *m) | 365 | static int amd_decode_mce(struct notifier_block *nb, unsigned long val, |
| 366 | void *data) | ||
| 367 | { | 367 | { |
| 368 | struct mce *m = (struct mce *)data; | ||
| 368 | struct err_regs regs; | 369 | struct err_regs regs; |
| 369 | int node, ecc; | 370 | int node, ecc; |
| 370 | 371 | ||
| @@ -420,20 +421,22 @@ static void amd_decode_mce(struct mce *m) | |||
| 420 | } | 421 | } |
| 421 | 422 | ||
| 422 | amd_decode_err_code(m->status & 0xffff); | 423 | amd_decode_err_code(m->status & 0xffff); |
| 424 | |||
| 425 | return NOTIFY_STOP; | ||
| 423 | } | 426 | } |
| 424 | 427 | ||
| 428 | static struct notifier_block amd_mce_dec_nb = { | ||
| 429 | .notifier_call = amd_decode_mce, | ||
| 430 | }; | ||
| 431 | |||
| 425 | static int __init mce_amd_init(void) | 432 | static int __init mce_amd_init(void) |
| 426 | { | 433 | { |
| 427 | /* | 434 | /* |
| 428 | * We can decode MCEs for Opteron and later CPUs: | 435 | * We can decode MCEs for Opteron and later CPUs: |
| 429 | */ | 436 | */ |
| 430 | if ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) && | 437 | if ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) && |
| 431 | (boot_cpu_data.x86 >= 0xf)) { | 438 | (boot_cpu_data.x86 >= 0xf)) |
| 432 | /* safe the default decode mce callback */ | 439 | atomic_notifier_chain_register(&x86_mce_decoder_chain, &amd_mce_dec_nb); |
| 433 | orig_mce_callback = x86_mce_decode_callback; | ||
| 434 | |||
| 435 | x86_mce_decode_callback = amd_decode_mce; | ||
| 436 | } | ||
| 437 | 440 | ||
| 438 | return 0; | 441 | return 0; |
| 439 | } | 442 | } |
| @@ -442,7 +445,7 @@ early_initcall(mce_amd_init); | |||
| 442 | #ifdef MODULE | 445 | #ifdef MODULE |
| 443 | static void __exit mce_amd_exit(void) | 446 | static void __exit mce_amd_exit(void) |
| 444 | { | 447 | { |
| 445 | x86_mce_decode_callback = orig_mce_callback; | 448 | atomic_notifier_chain_unregister(&x86_mce_decoder_chain, &amd_mce_dec_nb); |
| 446 | } | 449 | } |
| 447 | 450 | ||
| 448 | MODULE_DESCRIPTION("AMD MCE decoder"); | 451 | MODULE_DESCRIPTION("AMD MCE decoder"); |
