aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_mc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/edac_mc.c')
-rw-r--r--drivers/edac/edac_mc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 856860314789..6e4c94e9654a 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -129,7 +129,7 @@ void *edac_align_ptr(void *ptr, unsigned size)
129 * struct mem_ctl_info pointer 129 * struct mem_ctl_info pointer
130 */ 130 */
131struct mem_ctl_info *edac_mc_alloc(unsigned sz_pvt, unsigned nr_csrows, 131struct mem_ctl_info *edac_mc_alloc(unsigned sz_pvt, unsigned nr_csrows,
132 unsigned nr_chans) 132 unsigned nr_chans, int edac_index)
133{ 133{
134 struct mem_ctl_info *mci; 134 struct mem_ctl_info *mci;
135 struct csrow_info *csi, *csrow; 135 struct csrow_info *csi, *csrow;
@@ -159,7 +159,8 @@ struct mem_ctl_info *edac_mc_alloc(unsigned sz_pvt, unsigned nr_csrows,
159 chi = (struct channel_info *)(((char *)mci) + ((unsigned long)chi)); 159 chi = (struct channel_info *)(((char *)mci) + ((unsigned long)chi));
160 pvt = sz_pvt ? (((char *)mci) + ((unsigned long)pvt)) : NULL; 160 pvt = sz_pvt ? (((char *)mci) + ((unsigned long)pvt)) : NULL;
161 161
162 memset(mci, 0, size); /* clear all fields */ 162 /* setup index and various internal pointers */
163 mci->mc_idx = edac_index;
163 mci->csrows = csi; 164 mci->csrows = csi;
164 mci->pvt_info = pvt; 165 mci->pvt_info = pvt;
165 mci->nr_csrows = nr_csrows; 166 mci->nr_csrows = nr_csrows;
@@ -405,10 +406,10 @@ EXPORT_SYMBOL(edac_mc_find);
405 */ 406 */
406 407
407/* FIXME - should a warning be printed if no error detection? correction? */ 408/* FIXME - should a warning be printed if no error detection? correction? */
408int edac_mc_add_mc(struct mem_ctl_info *mci, int mc_idx) 409int edac_mc_add_mc(struct mem_ctl_info *mci)
409{ 410{
410 debugf0("%s()\n", __func__); 411 debugf0("%s()\n", __func__);
411 mci->mc_idx = mc_idx; 412
412#ifdef CONFIG_EDAC_DEBUG 413#ifdef CONFIG_EDAC_DEBUG
413 if (edac_debug_level >= 3) 414 if (edac_debug_level >= 3)
414 edac_mc_dump_mci(mci); 415 edac_mc_dump_mci(mci);