aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/edac/edac_mc.c6
-rw-r--r--include/linux/edac.h22
2 files changed, 20 insertions, 8 deletions
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index ca6c04d350ee..690cbf15a007 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -39,7 +39,7 @@ static LIST_HEAD(mc_devices);
39 39
40#ifdef CONFIG_EDAC_DEBUG 40#ifdef CONFIG_EDAC_DEBUG
41 41
42static void edac_mc_dump_channel(struct channel_info *chan) 42static void edac_mc_dump_channel(struct rank_info *chan)
43{ 43{
44 debugf4("\tchannel = %p\n", chan); 44 debugf4("\tchannel = %p\n", chan);
45 debugf4("\tchannel->chan_idx = %d\n", chan->chan_idx); 45 debugf4("\tchannel->chan_idx = %d\n", chan->chan_idx);
@@ -156,7 +156,7 @@ struct mem_ctl_info *edac_mc_alloc(unsigned sz_pvt, unsigned nr_csrows,
156{ 156{
157 struct mem_ctl_info *mci; 157 struct mem_ctl_info *mci;
158 struct csrow_info *csi, *csrow; 158 struct csrow_info *csi, *csrow;
159 struct channel_info *chi, *chp, *chan; 159 struct rank_info *chi, *chp, *chan;
160 void *pvt; 160 void *pvt;
161 unsigned size; 161 unsigned size;
162 int row, chn; 162 int row, chn;
@@ -181,7 +181,7 @@ struct mem_ctl_info *edac_mc_alloc(unsigned sz_pvt, unsigned nr_csrows,
181 * rather than an imaginary chunk of memory located at address 0. 181 * rather than an imaginary chunk of memory located at address 0.
182 */ 182 */
183 csi = (struct csrow_info *)(((char *)mci) + ((unsigned long)csi)); 183 csi = (struct csrow_info *)(((char *)mci) + ((unsigned long)csi));
184 chi = (struct channel_info *)(((char *)mci) + ((unsigned long)chi)); 184 chi = (struct rank_info *)(((char *)mci) + ((unsigned long)chi));
185 pvt = sz_pvt ? (((char *)mci) + ((unsigned long)pvt)) : NULL; 185 pvt = sz_pvt ? (((char *)mci) + ((unsigned long)pvt)) : NULL;
186 186
187 /* setup index and various internal pointers */ 187 /* setup index and various internal pointers */
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 {