linux/drivers/edac
Mauro Carvalho Chehab e39f4ea9b0 edac: Only expose csrows/channels on legacy API if they're populated
This patch actually fixes a bug with the legacy API, where, at the
same csrow, some channels may have different DIMMs. This can happen
on FB-DIMM/RAMBUS and modern Intel controllers.

This is the case, for example, of Nehalem machines:

$ ./edac-ctl --layout
       +-----------------------------------+
       |                mc0                |
       | channel0  | channel1  | channel2  |
-------+-----------------------------------+
slot2: |     0 MB  |     0 MB  |     0 MB  |
slot1: |  1024 MB  |     0 MB  |     0 MB  |
slot0: |  1024 MB  |  1024 MB  |  1024 MB  |
-------+-----------------------------------+

Before this patch, non-filled memories were shown. Now, only what's
filled is there:

grep . /sys/devices/system/edac/mc/mc0/csrow*/ch?*
/sys/devices/system/edac/mc/mc0/csrow0/ch0_ce_count:0
/sys/devices/system/edac/mc/mc0/csrow0/ch0_dimm_label:CPU#0Channel#0_DIMM#0
/sys/devices/system/edac/mc/mc0/csrow0/ch1_ce_count:0
/sys/devices/system/edac/mc/mc0/csrow0/ch1_dimm_label:CPU#0Channel#0_DIMM#1
/sys/devices/system/edac/mc/mc0/csrow1/ch0_ce_count:0
/sys/devices/system/edac/mc/mc0/csrow1/ch0_dimm_label:CPU#0Channel#1_DIMM#0
/sys/devices/system/edac/mc/mc0/csrow2/ch0_ce_count:0
/sys/devices/system/edac/mc/mc0/csrow2/ch0_dimm_label:CPU#0Channel#2_DIMM#0

Thanks-to: Aristeu Rozanski Filho <arozansk@redhat.com>
Reviewed-by: Aristeu Rozanski <arozansk@redhat.com>
Cc: Doug Thompson <norsk5@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 13:23:44 -03:00
..
Kconfig edac: add a new per-dimm API and make the old per-virtual-rank API obsolete 2012-06-11 13:23:42 -03:00
Makefile edac: sb_edac: Add it to the building system 2011-11-01 10:01:54 -02:00
amd64_edac.c amd64_edac: convert sysfs logic to use struct device 2012-06-11 13:23:40 -03:00
amd64_edac.h amd64_edac: convert sysfs logic to use struct device 2012-06-11 13:23:40 -03:00
amd64_edac_dbg.c amd64_edac: convert sysfs logic to use struct device 2012-06-11 13:23:40 -03:00
amd64_edac_inj.c amd64_edac: convert sysfs logic to use struct device 2012-06-11 13:23:40 -03:00
amd76x_edac.c edac: Rename the parent dev to pdev 2012-06-11 11:56:06 -03:00
amd8111_edac.c edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
amd8111_edac.h
amd8131_edac.c edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
amd8131_edac.h
cell_edac.c edac: Rename the parent dev to pdev 2012-06-11 11:56:06 -03:00
cpc925_edac.c edac: Move grain/dtype/edac_type calculus to be out of channel loop 2012-06-11 13:23:44 -03:00
e7xxx_edac.c edac: Move grain/dtype/edac_type calculus to be out of channel loop 2012-06-11 13:23:44 -03:00
e752x_edac.c edac: Move grain/dtype/edac_type calculus to be out of channel loop 2012-06-11 13:23:44 -03:00
edac_core.h RAS: Add a tracepoint for reporting memory controller events 2012-06-11 11:55:52 -03:00
edac_device.c edac: rewrite edac_align_ptr() 2012-05-28 19:10:59 -03:00
edac_device_sysfs.c edac: convert sysdev_class to a regular subsystem 2011-12-14 15:21:07 -08:00
edac_mc.c edac: Get rid of the old kobj's from the edac mc code 2012-06-11 13:23:41 -03:00
edac_mc_sysfs.c edac: Only expose csrows/channels on legacy API if they're populated 2012-06-11 13:23:44 -03:00
edac_module.c edac: rewrite the sysfs code to use struct device 2012-06-11 13:23:30 -03:00
edac_module.h edac: rewrite the sysfs code to use struct device 2012-06-11 13:23:30 -03:00
edac_pci.c edac: rewrite edac_align_ptr() 2012-05-28 19:10:59 -03:00
edac_pci_sysfs.c edac: convert sysdev_class to a regular subsystem 2011-12-14 15:21:07 -08:00
edac_stub.c device.h: cleanup users outside of linux/include (C files) 2012-03-11 14:27:37 -04:00
i7core_edac.c i7core_edac: convert it to use struct device 2012-06-11 13:23:41 -03:00
i3000_edac.c edac: Rename the parent dev to pdev 2012-06-11 11:56:06 -03:00
i3200_edac.c edac: Rename the parent dev to pdev 2012-06-11 11:56:06 -03:00
i5000_edac.c edac: Get rid of the old kobj's from the edac mc code 2012-06-11 13:23:41 -03:00
i5100_edac.c edac: Rename the parent dev to pdev 2012-06-11 11:56:06 -03:00
i5400_edac.c edac: Rename the parent dev to pdev 2012-06-11 11:56:06 -03:00
i7300_edac.c edac: Rename the parent dev to pdev 2012-06-11 11:56:06 -03:00
i82443bxgx_edac.c edac: Rename the parent dev to pdev 2012-06-11 11:56:06 -03:00
i82860_edac.c edac: Rename the parent dev to pdev 2012-06-11 11:56:06 -03:00
i82875p_edac.c edac: Get rid of the old kobj's from the edac mc code 2012-06-11 13:23:41 -03:00
i82975x_edac.c edac: Rename the parent dev to pdev 2012-06-11 11:56:06 -03:00
mce_amd.c MCE, AMD: Drop too granulary family model checks 2012-04-04 15:50:11 +02:00
mce_amd.h MCE, AMD: Constify error tables 2012-03-19 12:06:26 +01:00
mce_amd_inj.c device.h: cleanup users outside of linux/include (C files) 2012-03-11 14:27:37 -04:00
mpc85xx_edac.c mpc85xx_edac: convert sysfs logic to use struct device 2012-06-11 13:23:39 -03:00
mpc85xx_edac.h edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
mv64x60_edac.c edac: Rename the parent dev to pdev 2012-06-11 11:56:06 -03:00
mv64x60_edac.h edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
pasemi_edac.c edac: Rename the parent dev to pdev 2012-06-11 11:56:06 -03:00
ppc4xx_edac.c edac: Rename the parent dev to pdev 2012-06-11 11:56:06 -03:00
ppc4xx_edac.h
r82600_edac.c edac: Rename the parent dev to pdev 2012-06-11 11:56:06 -03:00
sb_edac.c edac: Rename the parent dev to pdev 2012-06-11 11:56:06 -03:00
tile_edac.c edac: Rename the parent dev to pdev 2012-06-11 11:56:06 -03:00
x38_edac.c edac: Rename the parent dev to pdev 2012-06-11 11:56:06 -03:00