aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/edac.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-01-27 08:26:13 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-03-21 14:22:50 -0400
commita4b4be3fd7a76021f67380b03d8bccebf067db72 (patch)
tree545aa3c8a1f8a5ae5747df1c8886d1e5e9518bab /include/linux/edac.h
parent0142877aa4e54dd9943fb727e9b386c36c8e3ab7 (diff)
edac: rename channel_info to rank_info
What it is pointed by a csrow/channel vector is a rank information, and not a channel information. On a traditional architecture, the memory controller directly access the memory ranks, via chip select rows. Different ranks at the same DIMM is selected via different chip select rows. So, typically, one csrow/channel pair means one different DIMM. On FB-DIMMs, there's a microcontroller chip at the DIMM, called Advanced Memory Buffer (AMB) that serves as the interface between the memory controller and the memory chips. The AMB selection is via the DIMM slot, and not via a csrow. It is up to the AMB to talk with the csrows of the DRAM chips. So, the FB-DIMM memory controllers see the DIMM slot, and not the DIMM rank. RAMBUS is similar. Newer memory controllers, like the ones found on Intel Sandy Bridge and Nehalem, even working with normal DDR3 DIMM's, don't use the usual channel A/channel B interleaving schema to provide 128 bits data access. Instead, they have more channels (3 or 4 channels), and they can use several interleaving schemas. Such memory controllers see the DIMMs directly on their registers, instead of the ranks, which is better for the driver, as its main usageis to point to a broken DIMM stick (the Field Repleceable Unit), and not to point to a broken DRAM chip. The drivers that support such such newer memory architecture models currently need to fake information and to abuse on EDAC structures, as the subsystem was conceived with the idea that the csrow would always be visible by the CPU. To make things a little worse, those drivers don't currently fake csrows/channels on a consistent way, as the concepts there don't apply to the memory controllers they're talking with. So, each driver author interpreted the concepts using a different logic. In order to fix it, let's rename the data structure that points into a DIMM rank to "rank_info", in order to be clearer about what's stored there. Latter patches will provide a better way to represent the memory hierarchy for the other types of memory controller. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/linux/edac.h')
-rw-r--r--include/linux/edac.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/include/linux/edac.h b/include/linux/edac.h
index 0714d67a6e1a..e3e3d26c638e 100644
--- a/include/linux/edac.h
+++ b/include/linux/edac.h
@@ -308,10 +308,22 @@ enum scrub_type {
308 * PS - I enjoyed writing all that about as much as you enjoyed reading it. 308 * PS - I enjoyed writing all that about as much as you enjoyed reading it.
309 */ 309 */
310 310
311struct channel_info { 311/**
312 int chan_idx; /* channel index */ 312 * struct rank_info - contains the information for one DIMM rank
313 u32 ce_count; /* Correctable Errors for this CHANNEL */ 313 *
314 char label[EDAC_MC_LABEL_LEN + 1]; /* DIMM label on motherboard */ 314 * @chan_idx: channel number where the rank is (typically, 0 or 1)
315 * @ce_count: number of correctable errors for this rank
316 * @label: DIMM label. Different ranks for the same DIMM should be
317 * filled, on userspace, with the same label.
318 * FIXME: The core currently won't enforce it.
319 * @csrow: A pointer to the chip select row structure (the parent
320 * structure). The location of the rank is given by
321 * the (csrow->csrow_idx, chan_idx) vector.
322 */
323struct rank_info {
324 int chan_idx;
325 u32 ce_count;
326 char label[EDAC_MC_LABEL_LEN + 1];
315 struct csrow_info *csrow; /* the parent */ 327 struct csrow_info *csrow; /* the parent */
316}; 328};
317 329
@@ -335,7 +347,7 @@ struct csrow_info {
335 347
336 /* channel information for this csrow */ 348 /* channel information for this csrow */
337 u32 nr_channels; 349 u32 nr_channels;
338 struct channel_info *channels; 350 struct rank_info *channels;
339}; 351};
340 352
341struct mcidev_sysfs_group { 353struct mcidev_sysfs_group {