Skip to content

Commit 25836ce

Browse files
yghannamsuryasaimadhu
authored andcommitted
EDAC/mc_sysfs: Increase legacy channel support to 12
Newer AMD systems, such as Genoa, can support up to 12 channels per EDAC "mc" device. These are detected by the device's EDAC module, and the current EDAC interface is properly enumerated. However, the legacy EDAC sysfs interface provides device attributes only for channels 0 to 7. Therefore, channels 8 to 11 will not be visible in the legacy interface. This was overlooked in the initial support for AMD Genoa. Add additional device attributes so that up to 12 channels are visible in the legacy EDAC sysfs interface. Fixes: e2be595 ("EDAC/amd64: Add support for AMD Family 19h Models 10h-1Fh and A0h-AFh") Signed-off-by: Yazen Ghannam <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 7e5f430 commit 25836ce

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

drivers/edac/edac_mc_sysfs.c

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,14 @@ DEVICE_CHANNEL(ch6_dimm_label, S_IRUGO | S_IWUSR,
298298
channel_dimm_label_show, channel_dimm_label_store, 6);
299299
DEVICE_CHANNEL(ch7_dimm_label, S_IRUGO | S_IWUSR,
300300
channel_dimm_label_show, channel_dimm_label_store, 7);
301+
DEVICE_CHANNEL(ch8_dimm_label, S_IRUGO | S_IWUSR,
302+
channel_dimm_label_show, channel_dimm_label_store, 8);
303+
DEVICE_CHANNEL(ch9_dimm_label, S_IRUGO | S_IWUSR,
304+
channel_dimm_label_show, channel_dimm_label_store, 9);
305+
DEVICE_CHANNEL(ch10_dimm_label, S_IRUGO | S_IWUSR,
306+
channel_dimm_label_show, channel_dimm_label_store, 10);
307+
DEVICE_CHANNEL(ch11_dimm_label, S_IRUGO | S_IWUSR,
308+
channel_dimm_label_show, channel_dimm_label_store, 11);
301309

302310
/* Total possible dynamic DIMM Label attribute file table */
303311
static struct attribute *dynamic_csrow_dimm_attr[] = {
@@ -309,6 +317,10 @@ static struct attribute *dynamic_csrow_dimm_attr[] = {
309317
&dev_attr_legacy_ch5_dimm_label.attr.attr,
310318
&dev_attr_legacy_ch6_dimm_label.attr.attr,
311319
&dev_attr_legacy_ch7_dimm_label.attr.attr,
320+
&dev_attr_legacy_ch8_dimm_label.attr.attr,
321+
&dev_attr_legacy_ch9_dimm_label.attr.attr,
322+
&dev_attr_legacy_ch10_dimm_label.attr.attr,
323+
&dev_attr_legacy_ch11_dimm_label.attr.attr,
312324
NULL
313325
};
314326

@@ -329,6 +341,14 @@ DEVICE_CHANNEL(ch6_ce_count, S_IRUGO,
329341
channel_ce_count_show, NULL, 6);
330342
DEVICE_CHANNEL(ch7_ce_count, S_IRUGO,
331343
channel_ce_count_show, NULL, 7);
344+
DEVICE_CHANNEL(ch8_ce_count, S_IRUGO,
345+
channel_ce_count_show, NULL, 8);
346+
DEVICE_CHANNEL(ch9_ce_count, S_IRUGO,
347+
channel_ce_count_show, NULL, 9);
348+
DEVICE_CHANNEL(ch10_ce_count, S_IRUGO,
349+
channel_ce_count_show, NULL, 10);
350+
DEVICE_CHANNEL(ch11_ce_count, S_IRUGO,
351+
channel_ce_count_show, NULL, 11);
332352

333353
/* Total possible dynamic ce_count attribute file table */
334354
static struct attribute *dynamic_csrow_ce_count_attr[] = {
@@ -340,6 +360,10 @@ static struct attribute *dynamic_csrow_ce_count_attr[] = {
340360
&dev_attr_legacy_ch5_ce_count.attr.attr,
341361
&dev_attr_legacy_ch6_ce_count.attr.attr,
342362
&dev_attr_legacy_ch7_ce_count.attr.attr,
363+
&dev_attr_legacy_ch8_ce_count.attr.attr,
364+
&dev_attr_legacy_ch9_ce_count.attr.attr,
365+
&dev_attr_legacy_ch10_ce_count.attr.attr,
366+
&dev_attr_legacy_ch11_ce_count.attr.attr,
343367
NULL
344368
};
345369

0 commit comments

Comments
 (0)