diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2012-04-27 06:31:34 -0400 |
---|---|---|
committer | Borislav Petkov <borislav.petkov@amd.com> | 2012-06-07 06:43:45 -0400 |
commit | 18c20f373b76a64270a991396b06542abaf9f530 (patch) | |
tree | ae7236e72724920a99e682e39c2b4978f8773aca /arch | |
parent | 019f34fccfd5cf5ff1e722dafd9fe2bd54434e66 (diff) |
x86, MCE, AMD: Print decimal thresholding values
If one sets the threshold limit, say to 25:
$ echo 25 > machinecheck0/threshold_bank4/misc0/threshold_limit
and then reads it back again, it gives
$ cat machinecheck0/threshold_bank4/misc0/threshold_limit
19
which is actually 0x19 but we don't know that.
Make all output decimal.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_amd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index d67c9e56d609..0b1bb0e15881 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c | |||
@@ -308,7 +308,7 @@ struct threshold_attr { | |||
308 | #define SHOW_FIELDS(name) \ | 308 | #define SHOW_FIELDS(name) \ |
309 | static ssize_t show_ ## name(struct threshold_block *b, char *buf) \ | 309 | static ssize_t show_ ## name(struct threshold_block *b, char *buf) \ |
310 | { \ | 310 | { \ |
311 | return sprintf(buf, "%lx\n", (unsigned long) b->name); \ | 311 | return sprintf(buf, "%lu\n", (unsigned long) b->name); \ |
312 | } | 312 | } |
313 | SHOW_FIELDS(interrupt_enable) | 313 | SHOW_FIELDS(interrupt_enable) |
314 | SHOW_FIELDS(threshold_limit) | 314 | SHOW_FIELDS(threshold_limit) |
@@ -379,7 +379,7 @@ static ssize_t show_error_count(struct threshold_block *b, char *buf) | |||
379 | struct threshold_block_cross_cpu tbcc = { .tb = b, }; | 379 | struct threshold_block_cross_cpu tbcc = { .tb = b, }; |
380 | 380 | ||
381 | smp_call_function_single(b->cpu, local_error_count_handler, &tbcc, 1); | 381 | smp_call_function_single(b->cpu, local_error_count_handler, &tbcc, 1); |
382 | return sprintf(buf, "%lx\n", tbcc.retval); | 382 | return sprintf(buf, "%lu\n", tbcc.retval); |
383 | } | 383 | } |
384 | 384 | ||
385 | static ssize_t store_error_count(struct threshold_block *b, | 385 | static ssize_t store_error_count(struct threshold_block *b, |