@@ -591,7 +591,7 @@ static int mce_default_notifier(struct notifier_block *nb, unsigned long val,
591
591
if (!m )
592
592
return NOTIFY_DONE ;
593
593
594
- if (!m -> kflags )
594
+ if (mca_cfg . print_all || !m -> kflags )
595
595
__print_mce (m );
596
596
597
597
return NOTIFY_DONE ;
@@ -1962,6 +1962,7 @@ void mce_disable_bank(int bank)
1962
1962
* mce=no_cmci Disables CMCI
1963
1963
* mce=no_lmce Disables LMCE
1964
1964
* mce=dont_log_ce Clears corrected events silently, no log created for CEs.
1965
+ * mce=print_all Print all machine check logs to console
1965
1966
* mce=ignore_ce Disables polling and CMCI, corrected events are not cleared.
1966
1967
* mce=TOLERANCELEVEL[,monarchtimeout] (number, see above)
1967
1968
* monarchtimeout is how long to wait for other CPUs on machine
@@ -1990,6 +1991,8 @@ static int __init mcheck_enable(char *str)
1990
1991
cfg -> lmce_disabled = 1 ;
1991
1992
else if (!strcmp (str , "dont_log_ce" ))
1992
1993
cfg -> dont_log_ce = true;
1994
+ else if (!strcmp (str , "print_all" ))
1995
+ cfg -> print_all = true;
1993
1996
else if (!strcmp (str , "ignore_ce" ))
1994
1997
cfg -> ignore_ce = true;
1995
1998
else if (!strcmp (str , "bootlog" ) || !strcmp (str , "nobootlog" ))
@@ -2256,6 +2259,7 @@ static ssize_t store_int_with_restart(struct device *s,
2256
2259
static DEVICE_INT_ATTR (tolerant , 0644 , mca_cfg .tolerant ) ;
2257
2260
static DEVICE_INT_ATTR (monarch_timeout , 0644 , mca_cfg .monarch_timeout ) ;
2258
2261
static DEVICE_BOOL_ATTR (dont_log_ce , 0644 , mca_cfg .dont_log_ce ) ;
2262
+ static DEVICE_BOOL_ATTR (print_all , 0644 , mca_cfg .print_all ) ;
2259
2263
2260
2264
static struct dev_ext_attribute dev_attr_check_interval = {
2261
2265
__ATTR (check_interval , 0644 , device_show_int , store_int_with_restart ),
@@ -2280,6 +2284,7 @@ static struct device_attribute *mce_device_attrs[] = {
2280
2284
#endif
2281
2285
& dev_attr_monarch_timeout .attr ,
2282
2286
& dev_attr_dont_log_ce .attr ,
2287
+ & dev_attr_print_all .attr ,
2283
2288
& dev_attr_ignore_ce .attr ,
2284
2289
& dev_attr_cmci_disabled .attr ,
2285
2290
NULL
0 commit comments