Skip to content

Commit 7fc0b9b

Browse files
aeglsuryasaimadhu
authored andcommitted
EDAC: Drop the EDAC report status checks
When acpi_extlog was added, we were worried that the same error would be reported more than once by different subsystems. But in the ensuing years I've seen complaints that people could not find an error log (because this mechanism suppressed the log they were looking for). Rip it all out. People are smart enough to notice the same address from different reporting mechanisms. Signed-off-by: Tony Luck <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Tested-by: Tony Luck <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 4350564 commit 7fc0b9b

File tree

6 files changed

+0
-93
lines changed

6 files changed

+0
-93
lines changed

drivers/acpi/acpi_extlog.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ struct extlog_l1_head {
4242
u8 rev1[12];
4343
};
4444

45-
static int old_edac_report_status;
46-
4745
static u8 extlog_dsm_uuid[] __initdata = "663E35AF-CC10-41A4-88EA-5470AF055295";
4846

4947
/* L1 table related physical address */
@@ -229,11 +227,6 @@ static int __init extlog_init(void)
229227
if (!(cap & MCG_ELOG_P) || !extlog_get_l1addr())
230228
return -ENODEV;
231229

232-
if (edac_get_report_status() == EDAC_REPORTING_FORCE) {
233-
pr_warn("Not loading eMCA, error reporting force-enabled through EDAC.\n");
234-
return -EPERM;
235-
}
236-
237230
rc = -EINVAL;
238231
/* get L1 header to fetch necessary information */
239232
l1_hdr_size = sizeof(struct extlog_l1_head);
@@ -281,12 +274,6 @@ static int __init extlog_init(void)
281274
if (elog_buf == NULL)
282275
goto err_release_elog;
283276

284-
/*
285-
* eMCA event report method has higher priority than EDAC method,
286-
* unless EDAC event report method is mandatory.
287-
*/
288-
old_edac_report_status = edac_get_report_status();
289-
edac_set_report_status(EDAC_REPORTING_DISABLED);
290277
mce_register_decode_chain(&extlog_mce_dec);
291278
/* enable OS to be involved to take over management from BIOS */
292279
((struct extlog_l1_head *)extlog_l1_addr)->flags |= FLAG_OS_OPTIN;
@@ -308,7 +295,6 @@ static int __init extlog_init(void)
308295

309296
static void __exit extlog_exit(void)
310297
{
311-
edac_set_report_status(old_edac_report_status);
312298
mce_unregister_decode_chain(&extlog_mce_dec);
313299
((struct extlog_l1_head *)extlog_l1_addr)->flags &= ~FLAG_OS_OPTIN;
314300
if (extlog_l1_addr)

drivers/edac/edac_mc.c

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@
4343
int edac_op_state = EDAC_OPSTATE_INVAL;
4444
EXPORT_SYMBOL_GPL(edac_op_state);
4545

46-
static int edac_report = EDAC_REPORTING_ENABLED;
47-
4846
/* lock to memory controller's control array */
4947
static DEFINE_MUTEX(mem_ctls_mutex);
5048
static LIST_HEAD(mc_devices);
@@ -60,65 +58,6 @@ static struct mem_ctl_info *error_desc_to_mci(struct edac_raw_error_desc *e)
6058
return container_of(e, struct mem_ctl_info, error_desc);
6159
}
6260

63-
int edac_get_report_status(void)
64-
{
65-
return edac_report;
66-
}
67-
EXPORT_SYMBOL_GPL(edac_get_report_status);
68-
69-
void edac_set_report_status(int new)
70-
{
71-
if (new == EDAC_REPORTING_ENABLED ||
72-
new == EDAC_REPORTING_DISABLED ||
73-
new == EDAC_REPORTING_FORCE)
74-
edac_report = new;
75-
}
76-
EXPORT_SYMBOL_GPL(edac_set_report_status);
77-
78-
static int edac_report_set(const char *str, const struct kernel_param *kp)
79-
{
80-
if (!str)
81-
return -EINVAL;
82-
83-
if (!strncmp(str, "on", 2))
84-
edac_report = EDAC_REPORTING_ENABLED;
85-
else if (!strncmp(str, "off", 3))
86-
edac_report = EDAC_REPORTING_DISABLED;
87-
else if (!strncmp(str, "force", 5))
88-
edac_report = EDAC_REPORTING_FORCE;
89-
90-
return 0;
91-
}
92-
93-
static int edac_report_get(char *buffer, const struct kernel_param *kp)
94-
{
95-
int ret = 0;
96-
97-
switch (edac_report) {
98-
case EDAC_REPORTING_ENABLED:
99-
ret = sprintf(buffer, "on");
100-
break;
101-
case EDAC_REPORTING_DISABLED:
102-
ret = sprintf(buffer, "off");
103-
break;
104-
case EDAC_REPORTING_FORCE:
105-
ret = sprintf(buffer, "force");
106-
break;
107-
default:
108-
ret = -EINVAL;
109-
break;
110-
}
111-
112-
return ret;
113-
}
114-
115-
static const struct kernel_param_ops edac_report_ops = {
116-
.set = edac_report_set,
117-
.get = edac_report_get,
118-
};
119-
120-
module_param_cb(edac_report, &edac_report_ops, &edac_report, 0644);
121-
12261
unsigned int edac_dimm_info_location(struct dimm_info *dimm, char *buf,
12362
unsigned int len)
12463
{

drivers/edac/pnd2_edac.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,9 +1396,6 @@ static int pnd2_mce_check_error(struct notifier_block *nb, unsigned long val, vo
13961396
struct dram_addr daddr;
13971397
char *type;
13981398

1399-
if (edac_get_report_status() == EDAC_REPORTING_DISABLED)
1400-
return NOTIFY_DONE;
1401-
14021399
mci = pnd2_mci;
14031400
if (!mci || (mce->kflags & MCE_HANDLED_CEC))
14041401
return NOTIFY_DONE;

drivers/edac/sb_edac.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3134,8 +3134,6 @@ static int sbridge_mce_check_error(struct notifier_block *nb, unsigned long val,
31343134
struct mem_ctl_info *mci;
31353135
char *type;
31363136

3137-
if (edac_get_report_status() == EDAC_REPORTING_DISABLED)
3138-
return NOTIFY_DONE;
31393137
if (mce->kflags & MCE_HANDLED_CEC)
31403138
return NOTIFY_DONE;
31413139

@@ -3526,8 +3524,6 @@ static int __init sbridge_init(void)
35263524

35273525
if (rc >= 0) {
35283526
mce_register_decode_chain(&sbridge_mce_dec);
3529-
if (edac_get_report_status() == EDAC_REPORTING_DISABLED)
3530-
sbridge_printk(KERN_WARNING, "Loading driver, error reporting disabled.\n");
35313527
return 0;
35323528
}
35333529

drivers/edac/skx_common.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -574,9 +574,6 @@ int skx_mce_check_error(struct notifier_block *nb, unsigned long val,
574574
struct mem_ctl_info *mci;
575575
char *type;
576576

577-
if (edac_get_report_status() == EDAC_REPORTING_DISABLED)
578-
return NOTIFY_DONE;
579-
580577
if (mce->kflags & MCE_HANDLED_CEC)
581578
return NOTIFY_DONE;
582579

include/linux/edac.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,6 @@ struct device;
3131
extern int edac_op_state;
3232

3333
struct bus_type *edac_get_sysfs_subsys(void);
34-
int edac_get_report_status(void);
35-
void edac_set_report_status(int new);
36-
37-
enum {
38-
EDAC_REPORTING_ENABLED,
39-
EDAC_REPORTING_DISABLED,
40-
EDAC_REPORTING_FORCE
41-
};
4234

4335
static inline void opstate_init(void)
4436
{

0 commit comments

Comments
 (0)