@@ -86,14 +86,6 @@ struct mce_vendor_flags mce_flags __read_mostly;
86
86
87
87
struct mca_config mca_cfg __read_mostly = {
88
88
.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 ,
97
89
.monarch_timeout = -1
98
90
};
99
91
@@ -753,7 +745,7 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
753
745
goto clear_it ;
754
746
755
747
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);
757
749
/*
758
750
* Don't get the IP here because it's unlikely to
759
751
* 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
887
879
quirk_sandybridge_ifu (i , m , regs );
888
880
889
881
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 ) {
891
883
mce_read_aux (m , i );
892
884
* msg = tmp ;
893
885
return 1 ;
@@ -935,12 +927,11 @@ static noinstr int mce_timed_out(u64 *t, const char *msg)
935
927
if (!mca_cfg .monarch_timeout )
936
928
goto out ;
937
929
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
+
944
935
ret = 1 ;
945
936
goto out ;
946
937
}
@@ -1004,9 +995,9 @@ static void mce_reign(void)
1004
995
* This dumps all the mces in the log buffer and stops the
1005
996
* other CPUs.
1006
997
*/
1007
- if (m && global_worst >= MCE_PANIC_SEVERITY && mca_cfg . tolerant < 3 ) {
998
+ if (m && global_worst >= MCE_PANIC_SEVERITY ) {
1008
999
/* 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);
1010
1001
mce_panic ("Fatal machine check" , m , msg );
1011
1002
}
1012
1003
@@ -1020,7 +1011,7 @@ static void mce_reign(void)
1020
1011
* No machine check event found. Must be some external
1021
1012
* source or one CPU is hung. Panic.
1022
1013
*/
1023
- if (global_worst <= MCE_KEEP_SEVERITY && mca_cfg . tolerant < 3 )
1014
+ if (global_worst <= MCE_KEEP_SEVERITY )
1024
1015
mce_panic ("Fatal machine check from unknown source" , NULL , NULL );
1025
1016
1026
1017
/*
@@ -1267,7 +1258,7 @@ __mc_scan_banks(struct mce *m, struct pt_regs *regs, struct mce *final,
1267
1258
/* Set taint even when machine check was not enabled. */
1268
1259
taint ++ ;
1269
1260
1270
- severity = mce_severity (m , regs , cfg -> tolerant , NULL , true);
1261
+ severity = mce_severity (m , regs , NULL , true);
1271
1262
1272
1263
/*
1273
1264
* When machine check was for corrected/deferred handler don't
@@ -1425,7 +1416,6 @@ noinstr void do_machine_check(struct pt_regs *regs)
1425
1416
int worst = 0 , order , no_way_out , kill_current_task , lmce , taint = 0 ;
1426
1417
DECLARE_BITMAP (valid_banks , MAX_NR_BANKS ) = { 0 };
1427
1418
DECLARE_BITMAP (toclear , MAX_NR_BANKS ) = { 0 };
1428
- struct mca_config * cfg = & mca_cfg ;
1429
1419
struct mce m , * final ;
1430
1420
char * msg = NULL ;
1431
1421
@@ -1447,7 +1437,7 @@ noinstr void do_machine_check(struct pt_regs *regs)
1447
1437
1448
1438
/*
1449
1439
* 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.
1451
1441
*/
1452
1442
no_way_out = 0 ;
1453
1443
@@ -1481,7 +1471,7 @@ noinstr void do_machine_check(struct pt_regs *regs)
1481
1471
* severity is MCE_AR_SEVERITY we have other options.
1482
1472
*/
1483
1473
if (!(m .mcgstatus & MCG_STATUS_RIPV ))
1484
- kill_current_task = ( cfg -> tolerant == 3 ) ? 0 : 1 ;
1474
+ kill_current_task = 1 ;
1485
1475
/*
1486
1476
* Check if this MCE is signaled to only this logical processor,
1487
1477
* on Intel, Zhaoxin only.
@@ -1498,7 +1488,7 @@ noinstr void do_machine_check(struct pt_regs *regs)
1498
1488
* to see it will clear it.
1499
1489
*/
1500
1490
if (lmce ) {
1501
- if (no_way_out && cfg -> tolerant < 3 )
1491
+ if (no_way_out )
1502
1492
mce_panic ("Fatal local machine check" , & m , msg );
1503
1493
} else {
1504
1494
order = mce_start (& no_way_out );
@@ -1518,7 +1508,7 @@ noinstr void do_machine_check(struct pt_regs *regs)
1518
1508
if (!no_way_out )
1519
1509
no_way_out = worst >= MCE_PANIC_SEVERITY ;
1520
1510
1521
- if (no_way_out && cfg -> tolerant < 3 )
1511
+ if (no_way_out )
1522
1512
mce_panic ("Fatal machine check on current CPU" , & m , msg );
1523
1513
}
1524
1514
} else {
@@ -1530,8 +1520,8 @@ noinstr void do_machine_check(struct pt_regs *regs)
1530
1520
* fatal error. We call "mce_severity()" again to
1531
1521
* make sure we have the right "msg".
1532
1522
*/
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);
1535
1525
mce_panic ("Local fatal machine check!" , & m , msg );
1536
1526
}
1537
1527
}
@@ -2267,10 +2257,9 @@ static int __init mcheck_enable(char *str)
2267
2257
cfg -> bios_cmci_threshold = 1 ;
2268
2258
else if (!strcmp (str , "recovery" ))
2269
2259
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 {
2274
2263
pr_info ("mce argument %s ignored. Please use /sys\n" , str );
2275
2264
return 0 ;
2276
2265
}
@@ -2520,7 +2509,6 @@ static ssize_t store_int_with_restart(struct device *s,
2520
2509
return ret ;
2521
2510
}
2522
2511
2523
- static DEVICE_INT_ATTR (tolerant , 0644 , mca_cfg .tolerant ) ;
2524
2512
static DEVICE_INT_ATTR (monarch_timeout , 0644 , mca_cfg .monarch_timeout ) ;
2525
2513
static DEVICE_BOOL_ATTR (dont_log_ce , 0644 , mca_cfg .dont_log_ce ) ;
2526
2514
static DEVICE_BOOL_ATTR (print_all , 0644 , mca_cfg .print_all ) ;
@@ -2541,7 +2529,6 @@ static struct dev_ext_attribute dev_attr_cmci_disabled = {
2541
2529
};
2542
2530
2543
2531
static struct device_attribute * mce_device_attrs [] = {
2544
- & dev_attr_tolerant .attr ,
2545
2532
& dev_attr_check_interval .attr ,
2546
2533
#ifdef CONFIG_X86_MCELOG_LEGACY
2547
2534
& dev_attr_trigger ,
0 commit comments