linux-kernel-test/drivers/edac
Mauro Carvalho Chehab 24bef66e74 edac: Fix the dimm filling for csrows-based layouts
The driver is currently filling data in a wrong way, on drivers
for csrows-based memory controller, when the first layer is a
csrow.

This is not easily to notice, as, in general, memories are
filed in dual, interleaved, symetric mode, as very few memory
controllers support asymetric modes.

While digging into a bug for i82795_edac driver, the asymetric
mode there is now working, allowing us to fill the machine with
4x1GB ranks at channel 0, and 2x512GB at channel 1:

Channel 0 ranks:
EDAC DEBUG: i82975x_init_csrows: DIMM A0: from page 0x00000000 to 0x0003ffff (size: 0x00040000 pages)
EDAC DEBUG: i82975x_init_csrows: DIMM A1: from page 0x00040000 to 0x0007ffff (size: 0x00040000 pages)
EDAC DEBUG: i82975x_init_csrows: DIMM A2: from page 0x00080000 to 0x000bffff (size: 0x00040000 pages)
EDAC DEBUG: i82975x_init_csrows: DIMM A3: from page 0x000c0000 to 0x000fffff (size: 0x00040000 pages)

Channel 1 ranks:
EDAC DEBUG: i82975x_init_csrows: DIMM B0: from page 0x00100000 to 0x0011ffff (size: 0x00020000 pages)
EDAC DEBUG: i82975x_init_csrows: DIMM B1: from page 0x00120000 to 0x0013ffff (size: 0x00020000 pages)

Instead of properly showing the memories as such, before this patch, it
shows the memory layout as:

          +-----------------------------------+
          |                mc0                |
          |  csrow0   |  csrow1   |  csrow2   |
----------+-----------------------------------+
channel1: |  1024 MB  |  1024 MB  |   512 MB  |
channel0: |  1024 MB  |  1024 MB  |   512 MB  |
----------+-----------------------------------+

as if both channels were symetric, grouping the DIMMs on a wrong
layout.

After this patch, the memory is correctly represented.
So, for csrows at layers[0], it shows:

          +-----------------------------------------------+
          |                      mc0                      |
          |  csrow0   |  csrow1   |  csrow2   |  csrow3   |
----------+-----------------------------------------------+
channel1: |   512 MB  |   512 MB  |     0 MB  |     0 MB  |
channel0: |  1024 MB  |  1024 MB  |  1024 MB  |  1024 MB  |
----------+-----------------------------------------------+

For csrows at layers[1], it shows:

        +-----------------------+
        |          mc0          |
        | channel0  | channel1  |
--------+-----------------------+
csrow3: |  1024 MB  |     0 MB  |
csrow2: |  1024 MB  |     0 MB  |
--------+-----------------------+
csrow1: |  1024 MB  |   512 MB  |
csrow0: |  1024 MB  |   512 MB  |
--------+-----------------------+

So, no matter of what comes first, the information between
channel and csrow will be properly represented.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-25 07:17:18 -02: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 edac: Convert debugfX to edac_dbg(X, 2012-06-11 13:23:49 -03:00
amd64_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
amd64_edac.h amd64_edac: convert sysfs logic to use struct device 2012-06-11 13:23:40 -03:00
amd76x_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
amd8111_edac.c edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
amd8111_edac.h edac: AMD8111 driver header file 2009-04-02 19:05:03 -07:00
amd8131_edac.c edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
amd8131_edac.h tree-wide: fix comment/printk typos 2010-11-01 15:38:34 -04:00
cell_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
cpc925_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
e7xxx_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
e752x_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
edac_core.h Merge branch 'devel' 2012-07-29 21:11:05 -03:00
edac_device_sysfs.c edac: Convert debugfX to edac_dbg(X, 2012-06-11 13:23:49 -03:00
edac_device.c Merge branch 'devel' 2012-07-29 21:11:05 -03:00
edac_mc_sysfs.c edac: allow specifying the error count with fake_inject 2012-06-27 09:01:30 -03:00
edac_mc.c edac: Fix the dimm filling for csrows-based layouts 2012-10-25 07:17:18 -02:00
edac_module.c edac: create top-level debugfs directory 2012-06-12 12:15:49 -03:00
edac_module.h edac: create top-level debugfs directory 2012-06-12 12:15:49 -03:00
edac_pci_sysfs.c edac: Convert debugfX to edac_dbg(X, 2012-06-11 13:23:49 -03:00
edac_pci.c edac: Convert debugfX to edac_dbg(X, 2012-06-11 13:23:49 -03:00
edac_stub.c device.h: cleanup users outside of linux/include (C files) 2012-03-11 14:27:37 -04:00
highbank_l2_edac.c edac: add support for Calxeda highbank L2 cache ecc 2012-06-27 09:01:29 -03:00
highbank_mc_edac.c edac: add support for Calxeda highbank memory controller 2012-06-27 09:00:57 -03:00
i7core_edac.c Merge branch 'devel' 2012-07-29 21:11:05 -03:00
i3000_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
i3200_edac.c i3200_edac: Fix memory rank size 2012-09-25 07:32:33 -03:00
i5000_edac.c i5000: Fix the memory size calculation with 2R memories 2012-09-25 07:38:19 -03:00
i5100_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
i5400_edac.c edac i5000, i5400: fix pointer math in i5000_get_mc_regs() 2012-06-27 09:08:40 -03:00
i7300_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
i82443bxgx_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
i82860_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
i82875p_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
i82975x_edac.c i82975x_edac: Fix dimm label initialization 2012-10-25 07:17:01 -02:00
Kconfig edac: add support for Calxeda highbank L2 cache ecc 2012-06-27 09:01:29 -03:00
Makefile edac: add support for Calxeda highbank L2 cache ecc 2012-06-27 09:01:29 -03:00
mce_amd_inj.c device.h: cleanup users outside of linux/include (C files) 2012-03-11 14:27:37 -04:00
mce_amd.c MCE, AMD: Drop too granulary family model checks 2012-04-04 15:50:11 +02:00
mce_amd.h x86/bitops: Move BIT_64() for a wider use 2012-05-23 17:16:42 +02:00
mpc85xx_edac.c Merge branch 'devel' 2012-07-29 21:11:05 -03:00
mpc85xx_edac.h edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
mv64x60_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
mv64x60_edac.h edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
pasemi_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
ppc4xx_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
ppc4xx_edac.h edac: new ppc4xx driver module 2009-04-02 19:05:03 -07:00
r82600_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
sb_edac.c sb_edac: Avoid overflow errors at memory size calculation 2012-09-25 07:38:20 -03:00
tile_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
x38_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00