Re: [PATCH 0/6] Add a per-dimm structure

From: Mauro Carvalho Chehab
Date: Fri Mar 16 2012 - 10:07:24 EST


Em 16-03-2012 09:07, Mauro Carvalho Chehab escreveu:
> Em 16-03-2012 08:15, Borislav Petkov escreveu:
>> Lemme save you all the trouble:
...
> Anyway, I wrote the patches for it already after Greg's email.
> I'm just about to test them.

And they're already working.

The patches are (will be, after mirror sync) at:
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac.git hw_events_v8

There are just two new patches on it (and some bug fix patches got fold
to simplify their review):

c316427 edac: preserve the current EDAC sysfs API on a separate file

- Just copies the edac_mc_sysfs.c as edac_mc_sysfs_legacy.c,
in order to preserve the ABI before the changes;

22790f1 edac: Convert edac mc to use struct device

- Fixes edac_mc_sysfs_legacy.c with the changes at the struct,
and converts edac_mc_sysfs to use struct device.

There are still a few adjustments to do, so this is not a final version,
but the patch is already doing what's expected.

I decided to code the ras functions it as a new class, under:
/sys/class/ras

I didn't convert yet the code that creates the CE/UE error counters
per rank/dimm/branch/csrow, as it will need some changes. The code is
also creating a "power" subdir, of course, this is uneeded/unwanted,
but the basic stuff is already there:

$ tree /sys/class/ras
/sys/class/ras
âââ mc0 -> ../../devices/pci0000:3f/0000:3f:03.0/ras/mc0
âââ rank0 -> ../../devices/pci0000:3f/0000:3f:03.0/ras/mc0/rank0
âââ rank1 -> ../../devices/pci0000:3f/0000:3f:03.0/ras/mc0/rank1
âââ rank3 -> ../../devices/pci0000:3f/0000:3f:03.0/ras/mc0/rank3
âââ rank6 -> ../../devices/pci0000:3f/0000:3f:03.0/ras/mc0/rank6

$ tree /sys/class/ras/mc0
/sys/class/ras/mc0
âââ ce_count
âââ ce_noinfo_count
âââ device -> ../../../0000:3f:03.0
âââ fake_inject
âââ max_location
âââ mc_name
âââ power
â âââ async
â âââ autosuspend_delay_ms
â âââ control
â âââ runtime_active_kids
â âââ runtime_active_time
â âââ runtime_enabled
â âââ runtime_status
â âââ runtime_suspended_time
â âââ runtime_usage
âââ rank0
â âââ device -> ../../mc0
â âââ dimm_dev_type
â âââ dimm_edac_mode
â âââ dimm_label
â âââ dimm_location
â âââ dimm_mem_type
â âââ power
â â âââ async
â â âââ autosuspend_delay_ms
â â âââ control
â â âââ runtime_active_kids
â â âââ runtime_active_time
â â âââ runtime_enabled
â â âââ runtime_status
â â âââ runtime_suspended_time
â â âââ runtime_usage
â âââ size
â âââ subsystem -> ../../../../../../class/ras
â âââ uevent
âââ rank1
â âââ device -> ../../mc0
â âââ dimm_dev_type
â âââ dimm_edac_mode
â âââ dimm_label
â âââ dimm_location
â âââ dimm_mem_type
â âââ power
â â âââ async
â â âââ autosuspend_delay_ms
â â âââ control
â â âââ runtime_active_kids
â â âââ runtime_active_time
â â âââ runtime_enabled
â â âââ runtime_status
â â âââ runtime_suspended_time
â â âââ runtime_usage
â âââ size
â âââ subsystem -> ../../../../../../class/ras
â âââ uevent
âââ rank3
â âââ device -> ../../mc0
â âââ dimm_dev_type
â âââ dimm_edac_mode
â âââ dimm_label
â âââ dimm_location
â âââ dimm_mem_type
â âââ power
â â âââ async
â â âââ autosuspend_delay_ms
â â âââ control
â â âââ runtime_active_kids
â â âââ runtime_active_time
â â âââ runtime_enabled
â â âââ runtime_status
â â âââ runtime_suspended_time
â â âââ runtime_usage
â âââ size
â âââ subsystem -> ../../../../../../class/ras
â âââ uevent
âââ rank6
â âââ device -> ../../mc0
â âââ dimm_dev_type
â âââ dimm_edac_mode
â âââ dimm_label
â âââ dimm_location
â âââ dimm_mem_type
â âââ power
â â âââ async
â â âââ autosuspend_delay_ms
â â âââ control
â â âââ runtime_active_kids
â â âââ runtime_active_time
â â âââ runtime_enabled
â â âââ runtime_status
â â âââ runtime_suspended_time
â â âââ runtime_usage
â âââ size
â âââ subsystem -> ../../../../../../class/ras
â âââ uevent
âââ reset_counters
âââ sdram_scrub_rate
âââ seconds_since_reset
âââ size_mb
âââ subsystem -> ../../../../../class/ras
âââ ue_count
âââ ue_noinfo_count
âââ uevent

19 directories, 85 files

The legacy API is also there, just like it was
before the entire patchset:

$ tree /sys/devices/system/edac/
/sys/devices/system/edac/
âââ mc
â âââ mc0
â âââ all_channel_counts
â â âââ udimm0
â â âââ udimm1
â â âââ udimm2
â âââ ce_count
â âââ ce_noinfo_count
â âââ csrow0
â â âââ ce_count
â â âââ ch0_ce_count
â â âââ ch0_dimm_label
â â âââ ch1_ce_count
â â âââ ch1_dimm_label
â â âââ ch2_ce_count
â â âââ ch2_dimm_label
â â âââ dev_type
â â âââ edac_mode
â â âââ mem_type
â â âââ size_mb
â â âââ ue_count
â âââ csrow1
â â âââ ce_count
â â âââ ch0_ce_count
â â âââ ch0_dimm_label
â â âââ ch1_ce_count
â â âââ ch1_dimm_label
â â âââ ch2_ce_count
â â âââ ch2_dimm_label
â â âââ dev_type
â â âââ edac_mode
â â âââ mem_type
â â âââ size_mb
â â âââ ue_count
â âââ csrow2
â â âââ ce_count
â â âââ ch0_ce_count
â â âââ ch0_dimm_label
â â âââ ch1_ce_count
â â âââ ch1_dimm_label
â â âââ ch2_ce_count
â â âââ ch2_dimm_label
â â âââ dev_type
â â âââ edac_mode
â â âââ mem_type
â â âââ size_mb
â â âââ ue_count
â âââ device -> ../../../../pci0000:3f/0000:3f:03.0
â âââ inject_addrmatch
â â âââ bank
â â âââ channel
â â âââ col
â â âââ dimm
â â âââ page
â â âââ rank
â âââ inject_eccmask
â âââ inject_enable
â âââ inject_section
â âââ inject_type
â âââ mc_name
â âââ reset_counters
â âââ sdram_scrub_rate
â âââ seconds_since_reset
â âââ size_mb
â âââ ue_count
â âââ ue_noinfo_count
âââ pci
âââ check_pci_errors
âââ edac_pci_log_npe
âââ edac_pci_log_pe
âââ edac_pci_panic_on_pe
âââ pci0
â âââ device -> ../../../../pci0000:3f/0000:3f:03.0
â âââ npe_count
â âââ pe_count
âââ pci_nonparity_count
âââ pci_parity_count

11 directories, 66 files
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/