mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-11 02:45:40 +07:00
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>
This commit is contained in:
parent
019f34fccf
commit
18c20f373b
@ -308,7 +308,7 @@ struct threshold_attr {
|
|||||||
#define SHOW_FIELDS(name) \
|
#define SHOW_FIELDS(name) \
|
||||||
static ssize_t show_ ## name(struct threshold_block *b, char *buf) \
|
static ssize_t show_ ## name(struct threshold_block *b, char *buf) \
|
||||||
{ \
|
{ \
|
||||||
return sprintf(buf, "%lx\n", (unsigned long) b->name); \
|
return sprintf(buf, "%lu\n", (unsigned long) b->name); \
|
||||||
}
|
}
|
||||||
SHOW_FIELDS(interrupt_enable)
|
SHOW_FIELDS(interrupt_enable)
|
||||||
SHOW_FIELDS(threshold_limit)
|
SHOW_FIELDS(threshold_limit)
|
||||||
@ -379,7 +379,7 @@ static ssize_t show_error_count(struct threshold_block *b, char *buf)
|
|||||||
struct threshold_block_cross_cpu tbcc = { .tb = b, };
|
struct threshold_block_cross_cpu tbcc = { .tb = b, };
|
||||||
|
|
||||||
smp_call_function_single(b->cpu, local_error_count_handler, &tbcc, 1);
|
smp_call_function_single(b->cpu, local_error_count_handler, &tbcc, 1);
|
||||||
return sprintf(buf, "%lx\n", tbcc.retval);
|
return sprintf(buf, "%lu\n", tbcc.retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t store_error_count(struct threshold_block *b,
|
static ssize_t store_error_count(struct threshold_block *b,
|
||||||
|
Loading…
Reference in New Issue
Block a user