Skip to content

Commit 03f7eae

Browse files
author
Mauro Carvalho Chehab
committed
edac: remove arch-specific parameter for the error handler
Remove the arch-dependent parameter, as it were not used, as the MCE tracepoint weren't implemented. It probably doesn't make sense to have an MCE-specific tracepoint, as this will cost more bytes at the tracepoint, and tracepoint is not free. The changes at the EDAC drivers were done by this small perl script: $file .=$_ while (<>); $file =~ s/(edac_mc_handle_error)\s*\(([^\;]+)\,([^\,\)]+)\s*\)/$1($2)/g; print $file; Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 075f309 commit 03f7eae

28 files changed

+73
-86
lines changed

drivers/edac/amd64_edac.c

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,8 +1050,7 @@ static void k8_map_sysaddr_to_csrow(struct mem_ctl_info *mci, u64 sys_addr,
10501050
page, offset, syndrome,
10511051
-1, -1, -1,
10521052
"failed to map error addr to a node",
1053-
"",
1054-
NULL);
1053+
"");
10551054
return;
10561055
}
10571056

@@ -1062,8 +1061,7 @@ static void k8_map_sysaddr_to_csrow(struct mem_ctl_info *mci, u64 sys_addr,
10621061
page, offset, syndrome,
10631062
-1, -1, -1,
10641063
"failed to map error addr to a csrow",
1065-
"",
1066-
NULL);
1064+
"");
10671065
return;
10681066
}
10691067

@@ -1083,8 +1081,7 @@ static void k8_map_sysaddr_to_csrow(struct mem_ctl_info *mci, u64 sys_addr,
10831081
page, offset, syndrome,
10841082
csrow, -1, -1,
10851083
"unknown syndrome - possible error reporting race",
1086-
"",
1087-
NULL);
1084+
"");
10881085
return;
10891086
}
10901087
} else {
@@ -1102,7 +1099,7 @@ static void k8_map_sysaddr_to_csrow(struct mem_ctl_info *mci, u64 sys_addr,
11021099
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, src_mci,
11031100
page, offset, syndrome,
11041101
csrow, channel, -1,
1105-
"", "", NULL);
1102+
"", "");
11061103
}
11071104

11081105
static int ddr2_cs_size(unsigned i, bool dct_width)
@@ -1615,8 +1612,7 @@ static void f1x_map_sysaddr_to_csrow(struct mem_ctl_info *mci, u64 sys_addr,
16151612
page, offset, syndrome,
16161613
-1, -1, -1,
16171614
"failed to map error addr to a csrow",
1618-
"",
1619-
NULL);
1615+
"");
16201616
return;
16211617
}
16221618

@@ -1631,7 +1627,7 @@ static void f1x_map_sysaddr_to_csrow(struct mem_ctl_info *mci, u64 sys_addr,
16311627
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci,
16321628
page, offset, syndrome,
16331629
csrow, chan, -1,
1634-
"", "", NULL);
1630+
"", "");
16351631
}
16361632

16371633
/*
@@ -1917,8 +1913,7 @@ static void amd64_handle_ce(struct mem_ctl_info *mci, struct mce *m)
19171913
0, 0, 0,
19181914
-1, -1, -1,
19191915
"HW has no ERROR_ADDRESS available",
1920-
"",
1921-
NULL);
1916+
"");
19221917
return;
19231918
}
19241919

@@ -1946,8 +1941,7 @@ static void amd64_handle_ue(struct mem_ctl_info *mci, struct mce *m)
19461941
0, 0, 0,
19471942
-1, -1, -1,
19481943
"HW has no ERROR_ADDRESS available",
1949-
"",
1950-
NULL);
1944+
"");
19511945
return;
19521946
}
19531947

@@ -1966,8 +1960,7 @@ static void amd64_handle_ue(struct mem_ctl_info *mci, struct mce *m)
19661960
page, offset, 0,
19671961
-1, -1, -1,
19681962
"ERROR ADDRESS NOT mapped to a MC",
1969-
"",
1970-
NULL);
1963+
"");
19711964
return;
19721965
}
19731966

@@ -1981,13 +1974,12 @@ static void amd64_handle_ue(struct mem_ctl_info *mci, struct mce *m)
19811974
page, offset, 0,
19821975
-1, -1, -1,
19831976
"ERROR ADDRESS NOT mapped to CS",
1984-
"",
1985-
NULL);
1977+
"");
19861978
} else {
19871979
edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci,
19881980
page, offset, 0,
19891981
csrow, -1, -1,
1990-
"", "", NULL);
1982+
"", "");
19911983
}
19921984
}
19931985

drivers/edac/amd76x_edac.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static int amd76x_process_error_info(struct mem_ctl_info *mci,
148148
edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci,
149149
mci->csrows[row]->first_page, 0, 0,
150150
row, 0, -1,
151-
mci->ctl_name, "", NULL);
151+
mci->ctl_name, "");
152152
}
153153
}
154154

@@ -163,7 +163,7 @@ static int amd76x_process_error_info(struct mem_ctl_info *mci,
163163
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci,
164164
mci->csrows[row]->first_page, 0, 0,
165165
row, 0, -1,
166-
mci->ctl_name, "", NULL);
166+
mci->ctl_name, "");
167167
}
168168
}
169169

drivers/edac/cell_edac.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static void cell_edac_count_ce(struct mem_ctl_info *mci, int chan, u64 ar)
5050
/* TODO: Decoding of the error address */
5151
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci,
5252
csrow->first_page + pfn, offset, syndrome,
53-
0, chan, -1, "", "", NULL);
53+
0, chan, -1, "", "");
5454
}
5555

5656
static void cell_edac_count_ue(struct mem_ctl_info *mci, int chan, u64 ar)
@@ -72,7 +72,7 @@ static void cell_edac_count_ue(struct mem_ctl_info *mci, int chan, u64 ar)
7272
/* TODO: Decoding of the error address */
7373
edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci,
7474
csrow->first_page + pfn, offset, 0,
75-
0, chan, -1, "", "", NULL);
75+
0, chan, -1, "", "");
7676
}
7777

7878
static void cell_edac_check(struct mem_ctl_info *mci)

drivers/edac/cpc925_edac.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,15 +557,15 @@ static void cpc925_mc_check(struct mem_ctl_info *mci)
557557
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci,
558558
pfn, offset, syndrome,
559559
csrow, channel, -1,
560-
mci->ctl_name, "", NULL);
560+
mci->ctl_name, "");
561561
}
562562

563563
if (apiexcp & UECC_EXCP_DETECTED) {
564564
cpc925_mc_printk(mci, KERN_INFO, "DRAM UECC Fault\n");
565565
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci,
566566
pfn, offset, 0,
567567
csrow, -1, -1,
568-
mci->ctl_name, "", NULL);
568+
mci->ctl_name, "");
569569
}
570570

571571
cpc925_mc_printk(mci, KERN_INFO, "Dump registers:\n");

drivers/edac/e752x_edac.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ static void do_process_ce(struct mem_ctl_info *mci, u16 error_one,
374374
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci,
375375
page, offset_in_page(sec1_add << 4), sec1_syndrome,
376376
row, channel, -1,
377-
"e752x CE", "", NULL);
377+
"e752x CE", "");
378378
}
379379

380380
static inline void process_ce(struct mem_ctl_info *mci, u16 error_one,
@@ -412,7 +412,7 @@ static void do_process_ue(struct mem_ctl_info *mci, u16 error_one,
412412
block_page,
413413
offset_in_page(error_2b << 4), 0,
414414
row, -1, -1,
415-
"e752x UE from Read", "", NULL);
415+
"e752x UE from Read", "");
416416

417417
}
418418
if (error_one & 0x0404) {
@@ -431,7 +431,7 @@ static void do_process_ue(struct mem_ctl_info *mci, u16 error_one,
431431
block_page,
432432
offset_in_page(error_2b << 4), 0,
433433
row, -1, -1,
434-
"e752x UE from Scruber", "", NULL);
434+
"e752x UE from Scruber", "");
435435
}
436436
}
437437

@@ -456,7 +456,7 @@ static inline void process_ue_no_info_wr(struct mem_ctl_info *mci,
456456
edac_dbg(3, "\n");
457457
edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 0, 0, 0,
458458
-1, -1, -1,
459-
"e752x UE log memory write", "", NULL);
459+
"e752x UE log memory write", "");
460460
}
461461

462462
static void do_process_ded_retry(struct mem_ctl_info *mci, u16 error,

drivers/edac/e7xxx_edac.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,14 +220,14 @@ static void process_ce(struct mem_ctl_info *mci, struct e7xxx_error_info *info)
220220
/* convert syndrome to channel */
221221
channel = e7xxx_find_channel(syndrome);
222222
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, page, 0, syndrome,
223-
row, channel, -1, "e7xxx CE", "", NULL);
223+
row, channel, -1, "e7xxx CE", "");
224224
}
225225

226226
static void process_ce_no_info(struct mem_ctl_info *mci)
227227
{
228228
edac_dbg(3, "\n");
229229
edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 0, 0, 0, -1, -1, -1,
230-
"e7xxx CE log register overflow", "", NULL);
230+
"e7xxx CE log register overflow", "");
231231
}
232232

233233
static void process_ue(struct mem_ctl_info *mci, struct e7xxx_error_info *info)
@@ -243,15 +243,15 @@ static void process_ue(struct mem_ctl_info *mci, struct e7xxx_error_info *info)
243243
row = edac_mc_find_csrow_by_page(mci, block_page);
244244

245245
edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, block_page, 0, 0,
246-
row, -1, -1, "e7xxx UE", "", NULL);
246+
row, -1, -1, "e7xxx UE", "");
247247
}
248248

249249
static void process_ue_no_info(struct mem_ctl_info *mci)
250250
{
251251
edac_dbg(3, "\n");
252252

253253
edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 0, 0, 0, -1, -1, -1,
254-
"e7xxx UE log register overflow", "", NULL);
254+
"e7xxx UE log register overflow", "");
255255
}
256256

257257
static void e7xxx_get_error_info(struct mem_ctl_info *mci,

drivers/edac/edac_core.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,7 @@ void edac_mc_handle_error(const enum hw_event_mc_err_type type,
462462
const int mid_layer,
463463
const int low_layer,
464464
const char *msg,
465-
const char *other_detail,
466-
const void *arch_log);
465+
const char *other_detail);
467466

468467
/*
469468
* edac_device APIs

drivers/edac/edac_mc.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,9 +1044,6 @@ static void edac_ue_error(struct mem_ctl_info *mci,
10441044
* @other_detail: Technical details about the event that
10451045
* may help hardware manufacturers and
10461046
* EDAC developers to analyse the event
1047-
* @arch_log: Architecture-specific struct that can
1048-
* be used to add extended information to the
1049-
* tracepoint, like dumping MCE registers.
10501047
*/
10511048
void edac_mc_handle_error(const enum hw_event_mc_err_type type,
10521049
struct mem_ctl_info *mci,
@@ -1057,8 +1054,7 @@ void edac_mc_handle_error(const enum hw_event_mc_err_type type,
10571054
const int mid_layer,
10581055
const int low_layer,
10591056
const char *msg,
1060-
const char *other_detail,
1061-
const void *arch_log)
1057+
const char *other_detail)
10621058
{
10631059
/* FIXME: too much for stack: move it to some pre-alocated area */
10641060
char detail[80], location[80];

drivers/edac/edac_mc_sysfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ static ssize_t edac_fake_inject_write(struct file *file,
827827
mci->fake_inject_layer[0],
828828
mci->fake_inject_layer[1],
829829
mci->fake_inject_layer[2],
830-
"FAKE ERROR", "for EDAC testing only", NULL);
830+
"FAKE ERROR", "for EDAC testing only");
831831

832832
return count;
833833
}

drivers/edac/i3000_edac.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ static int i3000_process_error_info(struct mem_ctl_info *mci,
247247
if ((info->errsts ^ info->errsts2) & I3000_ERRSTS_BITS) {
248248
edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 0, 0, 0,
249249
-1, -1, -1,
250-
"UE overwrote CE", "", NULL);
250+
"UE overwrote CE", "");
251251
info->errsts = info->errsts2;
252252
}
253253

@@ -261,12 +261,12 @@ static int i3000_process_error_info(struct mem_ctl_info *mci,
261261
edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci,
262262
pfn, offset, 0,
263263
row, -1, -1,
264-
"i3000 UE", "", NULL);
264+
"i3000 UE", "");
265265
else
266266
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci,
267267
pfn, offset, info->derrsyn,
268268
row, multi_chan ? channel : 0, -1,
269-
"i3000 CE", "", NULL);
269+
"i3000 CE", "");
270270

271271
return 1;
272272
}

0 commit comments

Comments
 (0)