@@ -86,14 +86,6 @@ struct mce_vendor_flags mce_flags __read_mostly;
8686
8787struct mca_config mca_cfg __read_mostly = {
8888 .bootlog = -1 ,
89- /*
90- * Tolerant levels:
91- * 0: always panic on uncorrected errors, log corrected errors
92- * 1: panic or SIGBUS on uncorrected errors, log corrected errors
93- * 2: SIGBUS or log uncorrected errors (if possible), log corr. errors
94- * 3: never panic or SIGBUS, log all errors (for testing only)
95- */
96- .tolerant = 1 ,
9789 .monarch_timeout = -1
9890};
9991
@@ -753,7 +745,7 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
753745 goto clear_it ;
754746
755747 mce_read_aux (& m , i );
756- m .severity = mce_severity (& m , NULL , mca_cfg . tolerant , NULL , false);
748+ m .severity = mce_severity (& m , NULL , NULL , false);
757749 /*
758750 * Don't get the IP here because it's unlikely to
759751 * have anything to do with the actual error location.
@@ -887,7 +879,7 @@ static __always_inline int mce_no_way_out(struct mce *m, char **msg, unsigned lo
887879 quirk_sandybridge_ifu (i , m , regs );
888880
889881 m -> bank = i ;
890- if (mce_severity (m , regs , mca_cfg . tolerant , & tmp , true) >= MCE_PANIC_SEVERITY ) {
882+ if (mce_severity (m , regs , & tmp , true) >= MCE_PANIC_SEVERITY ) {
891883 mce_read_aux (m , i );
892884 * msg = tmp ;
893885 return 1 ;
@@ -935,12 +927,11 @@ static noinstr int mce_timed_out(u64 *t, const char *msg)
935927 if (!mca_cfg .monarch_timeout )
936928 goto out ;
937929 if ((s64 )* t < SPINUNIT ) {
938- if (mca_cfg .tolerant <= 1 ) {
939- if (cpumask_and (& mce_missing_cpus , cpu_online_mask , & mce_missing_cpus ))
940- pr_emerg ("CPUs not responding to MCE broadcast (may include false positives): %*pbl\n" ,
941- cpumask_pr_args (& mce_missing_cpus ));
942- mce_panic (msg , NULL , NULL );
943- }
930+ if (cpumask_and (& mce_missing_cpus , cpu_online_mask , & mce_missing_cpus ))
931+ pr_emerg ("CPUs not responding to MCE broadcast (may include false positives): %*pbl\n" ,
932+ cpumask_pr_args (& mce_missing_cpus ));
933+ mce_panic (msg , NULL , NULL );
934+
944935 ret = 1 ;
945936 goto out ;
946937 }
@@ -1004,9 +995,9 @@ static void mce_reign(void)
1004995 * This dumps all the mces in the log buffer and stops the
1005996 * other CPUs.
1006997 */
1007- if (m && global_worst >= MCE_PANIC_SEVERITY && mca_cfg . tolerant < 3 ) {
998+ if (m && global_worst >= MCE_PANIC_SEVERITY ) {
1008999 /* call mce_severity() to get "msg" for panic */
1009- mce_severity (m , NULL , mca_cfg . tolerant , & msg , true);
1000+ mce_severity (m , NULL , & msg , true);
10101001 mce_panic ("Fatal machine check" , m , msg );
10111002 }
10121003
@@ -1020,7 +1011,7 @@ static void mce_reign(void)
10201011 * No machine check event found. Must be some external
10211012 * source or one CPU is hung. Panic.
10221013 */
1023- if (global_worst <= MCE_KEEP_SEVERITY && mca_cfg . tolerant < 3 )
1014+ if (global_worst <= MCE_KEEP_SEVERITY )
10241015 mce_panic ("Fatal machine check from unknown source" , NULL , NULL );
10251016
10261017 /*
@@ -1267,7 +1258,7 @@ __mc_scan_banks(struct mce *m, struct pt_regs *regs, struct mce *final,
12671258 /* Set taint even when machine check was not enabled. */
12681259 taint ++ ;
12691260
1270- severity = mce_severity (m , regs , cfg -> tolerant , NULL , true);
1261+ severity = mce_severity (m , regs , NULL , true);
12711262
12721263 /*
12731264 * When machine check was for corrected/deferred handler don't
@@ -1425,7 +1416,6 @@ noinstr void do_machine_check(struct pt_regs *regs)
14251416 int worst = 0 , order , no_way_out , kill_current_task , lmce , taint = 0 ;
14261417 DECLARE_BITMAP (valid_banks , MAX_NR_BANKS ) = { 0 };
14271418 DECLARE_BITMAP (toclear , MAX_NR_BANKS ) = { 0 };
1428- struct mca_config * cfg = & mca_cfg ;
14291419 struct mce m , * final ;
14301420 char * msg = NULL ;
14311421
@@ -1447,7 +1437,7 @@ noinstr void do_machine_check(struct pt_regs *regs)
14471437
14481438 /*
14491439 * If no_way_out gets set, there is no safe way to recover from this
1450- * MCE. If mca_cfg.tolerant is cranked up, we'll try anyway.
1440+ * MCE.
14511441 */
14521442 no_way_out = 0 ;
14531443
@@ -1481,7 +1471,7 @@ noinstr void do_machine_check(struct pt_regs *regs)
14811471 * severity is MCE_AR_SEVERITY we have other options.
14821472 */
14831473 if (!(m .mcgstatus & MCG_STATUS_RIPV ))
1484- kill_current_task = ( cfg -> tolerant == 3 ) ? 0 : 1 ;
1474+ kill_current_task = 1 ;
14851475 /*
14861476 * Check if this MCE is signaled to only this logical processor,
14871477 * on Intel, Zhaoxin only.
@@ -1498,7 +1488,7 @@ noinstr void do_machine_check(struct pt_regs *regs)
14981488 * to see it will clear it.
14991489 */
15001490 if (lmce ) {
1501- if (no_way_out && cfg -> tolerant < 3 )
1491+ if (no_way_out )
15021492 mce_panic ("Fatal local machine check" , & m , msg );
15031493 } else {
15041494 order = mce_start (& no_way_out );
@@ -1518,7 +1508,7 @@ noinstr void do_machine_check(struct pt_regs *regs)
15181508 if (!no_way_out )
15191509 no_way_out = worst >= MCE_PANIC_SEVERITY ;
15201510
1521- if (no_way_out && cfg -> tolerant < 3 )
1511+ if (no_way_out )
15221512 mce_panic ("Fatal machine check on current CPU" , & m , msg );
15231513 }
15241514 } else {
@@ -1530,8 +1520,8 @@ noinstr void do_machine_check(struct pt_regs *regs)
15301520 * fatal error. We call "mce_severity()" again to
15311521 * make sure we have the right "msg".
15321522 */
1533- if (worst >= MCE_PANIC_SEVERITY && mca_cfg . tolerant < 3 ) {
1534- mce_severity (& m , regs , cfg -> tolerant , & msg , true);
1523+ if (worst >= MCE_PANIC_SEVERITY ) {
1524+ mce_severity (& m , regs , & msg , true);
15351525 mce_panic ("Local fatal machine check!" , & m , msg );
15361526 }
15371527 }
@@ -2267,10 +2257,9 @@ static int __init mcheck_enable(char *str)
22672257 cfg -> bios_cmci_threshold = 1 ;
22682258 else if (!strcmp (str , "recovery" ))
22692259 cfg -> recovery = 1 ;
2270- else if (isdigit (str [0 ])) {
2271- if (get_option (& str , & cfg -> tolerant ) == 2 )
2272- get_option (& str , & (cfg -> monarch_timeout ));
2273- } else {
2260+ else if (isdigit (str [0 ]))
2261+ get_option (& str , & (cfg -> monarch_timeout ));
2262+ else {
22742263 pr_info ("mce argument %s ignored. Please use /sys\n" , str );
22752264 return 0 ;
22762265 }
@@ -2520,7 +2509,6 @@ static ssize_t store_int_with_restart(struct device *s,
25202509 return ret ;
25212510}
25222511
2523- static DEVICE_INT_ATTR (tolerant , 0644 , mca_cfg .tolerant ) ;
25242512static DEVICE_INT_ATTR (monarch_timeout , 0644 , mca_cfg .monarch_timeout ) ;
25252513static DEVICE_BOOL_ATTR (dont_log_ce , 0644 , mca_cfg .dont_log_ce ) ;
25262514static DEVICE_BOOL_ATTR (print_all , 0644 , mca_cfg .print_all ) ;
@@ -2541,7 +2529,6 @@ static struct dev_ext_attribute dev_attr_cmci_disabled = {
25412529};
25422530
25432531static struct device_attribute * mce_device_attrs [] = {
2544- & dev_attr_tolerant .attr ,
25452532 & dev_attr_check_interval .attr ,
25462533#ifdef CONFIG_X86_MCELOG_LEGACY
25472534 & dev_attr_trigger ,
0 commit comments