aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-05-02 13:37:00 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-28 18:13:50 -0400
commitca0907b9e413bb1d1f3ea123b663535b74928846 (patch)
treeccba396e942f41fe3d0c0a8673620427790e0e8f
parente2acc357ee9e77e543861b841aa47fc62c528543 (diff)
edac: Remove the legacy EDAC ABI
Now that all drivers got converted to use the new ABI, we can drop the old one. Acked-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/edac/amd64_edac.c2
-rw-r--r--drivers/edac/amd76x_edac.c2
-rw-r--r--drivers/edac/cell_edac.c2
-rw-r--r--drivers/edac/cpc925_edac.c2
-rw-r--r--drivers/edac/e752x_edac.c3
-rw-r--r--drivers/edac/e7xxx_edac.c2
-rw-r--r--drivers/edac/edac_core.h76
-rw-r--r--drivers/edac/edac_mc.c52
-rw-r--r--drivers/edac/i3000_edac.c2
-rw-r--r--drivers/edac/i3200_edac.c2
-rw-r--r--drivers/edac/i5000_edac.c3
-rw-r--r--drivers/edac/i5100_edac.c2
-rw-r--r--drivers/edac/i5400_edac.c3
-rw-r--r--drivers/edac/i7300_edac.c3
-rw-r--r--drivers/edac/i7core_edac.c2
-rw-r--r--drivers/edac/i82443bxgx_edac.c2
-rw-r--r--drivers/edac/i82860_edac.c2
-rw-r--r--drivers/edac/i82875p_edac.c2
-rw-r--r--drivers/edac/i82975x_edac.c2
-rw-r--r--drivers/edac/mpc85xx_edac.c3
-rw-r--r--drivers/edac/mv64x60_edac.c2
-rw-r--r--drivers/edac/pasemi_edac.c2
-rw-r--r--drivers/edac/ppc4xx_edac.c2
-rw-r--r--drivers/edac/r82600_edac.c2
-rw-r--r--drivers/edac/sb_edac.c2
-rw-r--r--drivers/edac/tile_edac.c2
-rw-r--r--drivers/edac/x38_edac.c2
27 files changed, 32 insertions, 151 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index c431544519b1..7be9b7288e90 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -2596,7 +2596,7 @@ static int amd64_init_one_instance(struct pci_dev *F2)
2596 layers[1].type = EDAC_MC_LAYER_CHANNEL; 2596 layers[1].type = EDAC_MC_LAYER_CHANNEL;
2597 layers[1].size = pvt->channel_count; 2597 layers[1].size = pvt->channel_count;
2598 layers[1].is_virt_csrow = false; 2598 layers[1].is_virt_csrow = false;
2599 mci = new_edac_mc_alloc(nid, ARRAY_SIZE(layers), layers, 0); 2599 mci = edac_mc_alloc(nid, ARRAY_SIZE(layers), layers, 0);
2600 if (!mci) 2600 if (!mci)
2601 goto err_siblings; 2601 goto err_siblings;
2602 2602
diff --git a/drivers/edac/amd76x_edac.c b/drivers/edac/amd76x_edac.c
index 69f2b2ebb263..9774d443fa57 100644
--- a/drivers/edac/amd76x_edac.c
+++ b/drivers/edac/amd76x_edac.c
@@ -251,7 +251,7 @@ static int amd76x_probe1(struct pci_dev *pdev, int dev_idx)
251 layers[1].type = EDAC_MC_LAYER_CHANNEL; 251 layers[1].type = EDAC_MC_LAYER_CHANNEL;
252 layers[1].size = 1; 252 layers[1].size = 1;
253 layers[1].is_virt_csrow = false; 253 layers[1].is_virt_csrow = false;
254 mci = new_edac_mc_alloc(0, ARRAY_SIZE(layers), layers, 0); 254 mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, 0);
255 255
256 if (mci == NULL) 256 if (mci == NULL)
257 return -ENOMEM; 257 return -ENOMEM;
diff --git a/drivers/edac/cell_edac.c b/drivers/edac/cell_edac.c
index 14aa17492757..69ee6aab5c71 100644
--- a/drivers/edac/cell_edac.c
+++ b/drivers/edac/cell_edac.c
@@ -204,7 +204,7 @@ static int __devinit cell_edac_probe(struct platform_device *pdev)
204 layers[1].type = EDAC_MC_LAYER_CHANNEL; 204 layers[1].type = EDAC_MC_LAYER_CHANNEL;
205 layers[1].size = num_chans; 205 layers[1].size = num_chans;
206 layers[1].is_virt_csrow = false; 206 layers[1].is_virt_csrow = false;
207 mci = new_edac_mc_alloc(pdev->id, ARRAY_SIZE(layers), layers, 207 mci = edac_mc_alloc(pdev->id, ARRAY_SIZE(layers), layers,
208 sizeof(struct cell_edac_priv)); 208 sizeof(struct cell_edac_priv));
209 if (mci == NULL) 209 if (mci == NULL)
210 return -ENOMEM; 210 return -ENOMEM;
diff --git a/drivers/edac/cpc925_edac.c b/drivers/edac/cpc925_edac.c
index 2d94fa91c746..e22030a9de66 100644
--- a/drivers/edac/cpc925_edac.c
+++ b/drivers/edac/cpc925_edac.c
@@ -982,7 +982,7 @@ static int __devinit cpc925_probe(struct platform_device *pdev)
982 layers[1].type = EDAC_MC_LAYER_CHANNEL; 982 layers[1].type = EDAC_MC_LAYER_CHANNEL;
983 layers[1].size = nr_channels; 983 layers[1].size = nr_channels;
984 layers[1].is_virt_csrow = false; 984 layers[1].is_virt_csrow = false;
985 mci = new_edac_mc_alloc(edac_mc_idx, ARRAY_SIZE(layers), layers, 985 mci = edac_mc_alloc(edac_mc_idx, ARRAY_SIZE(layers), layers,
986 sizeof(struct cpc925_mc_pdata)); 986 sizeof(struct cpc925_mc_pdata));
987 if (!mci) { 987 if (!mci) {
988 cpc925_printk(KERN_ERR, "No memory for mem_ctl_info\n"); 988 cpc925_printk(KERN_ERR, "No memory for mem_ctl_info\n");
diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c
index aaa3bb8893c1..d28a6851bb18 100644
--- a/drivers/edac/e752x_edac.c
+++ b/drivers/edac/e752x_edac.c
@@ -1278,8 +1278,7 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx)
1278 layers[1].type = EDAC_MC_LAYER_CHANNEL; 1278 layers[1].type = EDAC_MC_LAYER_CHANNEL;
1279 layers[1].size = drc_chan + 1; 1279 layers[1].size = drc_chan + 1;
1280 layers[1].is_virt_csrow = false; 1280 layers[1].is_virt_csrow = false;
1281 mci = new_edac_mc_alloc(0, ARRAY_SIZE(layers), layers, 1281 mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(*pvt));
1282 sizeof(*pvt));
1283 if (mci == NULL) 1282 if (mci == NULL)
1284 return -ENOMEM; 1283 return -ENOMEM;
1285 1284
diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c
index d4cfc24b2f8d..9a9c1a546797 100644
--- a/drivers/edac/e7xxx_edac.c
+++ b/drivers/edac/e7xxx_edac.c
@@ -447,7 +447,7 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
447 layers[1].type = EDAC_MC_LAYER_CHANNEL; 447 layers[1].type = EDAC_MC_LAYER_CHANNEL;
448 layers[1].size = drc_chan + 1; 448 layers[1].size = drc_chan + 1;
449 layers[1].is_virt_csrow = false; 449 layers[1].is_virt_csrow = false;
450 mci = new_edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(*pvt)); 450 mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(*pvt));
451 if (mci == NULL) 451 if (mci == NULL)
452 return -ENOMEM; 452 return -ENOMEM;
453 453
diff --git a/drivers/edac/edac_core.h b/drivers/edac/edac_core.h
index 1286c5e1bdc0..f06ce9ab692c 100644
--- a/drivers/edac/edac_core.h
+++ b/drivers/edac/edac_core.h
@@ -447,9 +447,7 @@ static inline void pci_write_bits32(struct pci_dev *pdev, int offset,
447 447
448#endif /* CONFIG_PCI */ 448#endif /* CONFIG_PCI */
449 449
450struct mem_ctl_info *edac_mc_alloc(unsigned sz_pvt, unsigned nr_csrows, 450struct mem_ctl_info *edac_mc_alloc(unsigned mc_num,
451 unsigned nr_chans, int edac_index);
452struct mem_ctl_info *new_edac_mc_alloc(unsigned edac_index,
453 unsigned n_layers, 451 unsigned n_layers,
454 struct edac_mc_layer *layers, 452 struct edac_mc_layer *layers,
455 unsigned sz_pvt); 453 unsigned sz_pvt);
@@ -460,18 +458,6 @@ extern struct mem_ctl_info *find_mci_by_dev(struct device *dev);
460extern struct mem_ctl_info *edac_mc_del_mc(struct device *dev); 458extern struct mem_ctl_info *edac_mc_del_mc(struct device *dev);
461extern int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci, 459extern int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci,
462 unsigned long page); 460 unsigned long page);
463
464/*
465 * The no info errors are used when error overflows are reported.
466 * There are a limited number of error logging registers that can
467 * be exausted. When all registers are exhausted and an additional
468 * error occurs then an error overflow register records that an
469 * error occurred and the type of error, but doesn't have any
470 * further information. The ce/ue versions make for cleaner
471 * reporting logic and function interface - reduces conditional
472 * statement clutter and extra function arguments.
473 */
474
475void edac_mc_handle_error(const enum hw_event_mc_err_type type, 461void edac_mc_handle_error(const enum hw_event_mc_err_type type,
476 struct mem_ctl_info *mci, 462 struct mem_ctl_info *mci,
477 const unsigned long page_frame_number, 463 const unsigned long page_frame_number,
@@ -484,66 +470,6 @@ void edac_mc_handle_error(const enum hw_event_mc_err_type type,
484 const char *other_detail, 470 const char *other_detail,
485 const void *mcelog); 471 const void *mcelog);
486 472
487static inline void edac_mc_handle_ce(struct mem_ctl_info *mci,
488 unsigned long page_frame_number,
489 unsigned long offset_in_page,
490 unsigned long syndrome, int row, int channel,
491 const char *msg)
492{
493 edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci,
494 page_frame_number, offset_in_page, syndrome,
495 row, channel, -1, msg, NULL, NULL);
496}
497
498static inline void edac_mc_handle_ce_no_info(struct mem_ctl_info *mci,
499 const char *msg)
500{
501 edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci,
502 0, 0, 0, -1, -1, -1, msg, NULL, NULL);
503}
504
505static inline void edac_mc_handle_ue(struct mem_ctl_info *mci,
506 unsigned long page_frame_number,
507 unsigned long offset_in_page, int row,
508 const char *msg)
509{
510 edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci,
511 page_frame_number, offset_in_page, 0,
512 row, -1, -1, msg, NULL, NULL);
513}
514
515static inline void edac_mc_handle_ue_no_info(struct mem_ctl_info *mci,
516 const char *msg)
517{
518 edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci,
519 0, 0, 0, -1, -1, -1, msg, NULL, NULL);
520}
521
522static inline void edac_mc_handle_fbd_ue(struct mem_ctl_info *mci,
523 unsigned int csrow,
524 unsigned int channel0,
525 unsigned int channel1,
526 char *msg)
527{
528 /*
529 *FIXME: The error can also be at channel1 (e. g. at the second
530 * channel of the same branch). The fix is to push
531 * edac_mc_handle_error() call into each driver
532 */
533 edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci,
534 0, 0, 0,
535 csrow, channel0, -1, msg, NULL, NULL);
536}
537
538static inline void edac_mc_handle_fbd_ce(struct mem_ctl_info *mci,
539 unsigned int csrow,
540 unsigned int channel, char *msg)
541{
542 edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci,
543 0, 0, 0,
544 csrow, channel, -1, msg, NULL, NULL);
545}
546
547/* 473/*
548 * edac_device APIs 474 * edac_device APIs
549 */ 475 */
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 1bd237ee4ca7..06028de5fe1b 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -195,13 +195,13 @@ void *edac_align_ptr(void **p, unsigned size, int n_elems)
195 * on such scenarios, as grouping the multiple ranks require drivers change. 195 * on such scenarios, as grouping the multiple ranks require drivers change.
196 * 196 *
197 * Returns: 197 * Returns:
198 * NULL allocation failed 198 * On failure: NULL
199 * struct mem_ctl_info pointer 199 * On success: struct mem_ctl_info pointer
200 */ 200 */
201struct mem_ctl_info *new_edac_mc_alloc(unsigned mc_num, 201struct mem_ctl_info *edac_mc_alloc(unsigned mc_num,
202 unsigned n_layers, 202 unsigned n_layers,
203 struct edac_mc_layer *layers, 203 struct edac_mc_layer *layers,
204 unsigned sz_pvt) 204 unsigned sz_pvt)
205{ 205{
206 struct mem_ctl_info *mci; 206 struct mem_ctl_info *mci;
207 struct edac_mc_layer *layer; 207 struct edac_mc_layer *layer;
@@ -370,46 +370,6 @@ struct mem_ctl_info *new_edac_mc_alloc(unsigned mc_num,
370 */ 370 */
371 return mci; 371 return mci;
372} 372}
373EXPORT_SYMBOL_GPL(new_edac_mc_alloc);
374
375/**
376 * edac_mc_alloc: Allocate and partially fill a struct mem_ctl_info structure
377 * @mc_num: Memory controller number
378 * @n_layers: Number of layers at the MC hierarchy
379 * layers: Describes each layer as seen by the Memory Controller
380 * @size_pvt: Size of private storage needed
381 *
382 *
383 * FIXME: drivers handle multi-rank memories in different ways: some
384 * drivers map multi-ranked DIMMs as one DIMM while others
385 * as several DIMMs.
386 *
387 * Everything is kmalloc'ed as one big chunk - more efficient.
388 * It can only be used if all structures have the same lifetime - otherwise
389 * you have to allocate and initialize your own structures.
390 *
391 * Use edac_mc_free() to free mc structures allocated by this function.
392 *
393 * Returns:
394 * On failure: NULL
395 * On success: struct mem_ctl_info pointer
396 */
397
398struct mem_ctl_info *edac_mc_alloc(unsigned sz_pvt, unsigned nr_csrows,
399 unsigned nr_chans, int mc_num)
400{
401 unsigned n_layers = 2;
402 struct edac_mc_layer layers[n_layers];
403
404 layers[0].type = EDAC_MC_LAYER_CHIP_SELECT;
405 layers[0].size = nr_csrows;
406 layers[0].is_virt_csrow = true;
407 layers[1].type = EDAC_MC_LAYER_CHANNEL;
408 layers[1].size = nr_chans;
409 layers[1].is_virt_csrow = false;
410
411 return new_edac_mc_alloc(mc_num, ARRAY_SIZE(layers), layers, sz_pvt);
412}
413EXPORT_SYMBOL_GPL(edac_mc_alloc); 373EXPORT_SYMBOL_GPL(edac_mc_alloc);
414 374
415/** 375/**
diff --git a/drivers/edac/i3000_edac.c b/drivers/edac/i3000_edac.c
index 195a92e1c0ae..8ad1744faacd 100644
--- a/drivers/edac/i3000_edac.c
+++ b/drivers/edac/i3000_edac.c
@@ -362,7 +362,7 @@ static int i3000_probe1(struct pci_dev *pdev, int dev_idx)
362 layers[1].type = EDAC_MC_LAYER_CHANNEL; 362 layers[1].type = EDAC_MC_LAYER_CHANNEL;
363 layers[1].size = nr_channels; 363 layers[1].size = nr_channels;
364 layers[1].is_virt_csrow = false; 364 layers[1].is_virt_csrow = false;
365 mci = new_edac_mc_alloc(0, ARRAY_SIZE(layers), layers, 0); 365 mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, 0);
366 if (!mci) 366 if (!mci)
367 return -ENOMEM; 367 return -ENOMEM;
368 368
diff --git a/drivers/edac/i3200_edac.c b/drivers/edac/i3200_edac.c
index d152662ffc66..bbe43ef71823 100644
--- a/drivers/edac/i3200_edac.c
+++ b/drivers/edac/i3200_edac.c
@@ -347,7 +347,7 @@ static int i3200_probe1(struct pci_dev *pdev, int dev_idx)
347 layers[1].type = EDAC_MC_LAYER_CHANNEL; 347 layers[1].type = EDAC_MC_LAYER_CHANNEL;
348 layers[1].size = nr_channels; 348 layers[1].size = nr_channels;
349 layers[1].is_virt_csrow = false; 349 layers[1].is_virt_csrow = false;
350 mci = new_edac_mc_alloc(0, ARRAY_SIZE(layers), layers, 350 mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers,
351 sizeof(struct i3200_priv)); 351 sizeof(struct i3200_priv));
352 if (!mci) 352 if (!mci)
353 return -ENOMEM; 353 return -ENOMEM;
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c
index fdbc57cb7287..82f3f4d2e7b8 100644
--- a/drivers/edac/i5000_edac.c
+++ b/drivers/edac/i5000_edac.c
@@ -1396,8 +1396,7 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx)
1396 layers[2].type = EDAC_MC_LAYER_SLOT; 1396 layers[2].type = EDAC_MC_LAYER_SLOT;
1397 layers[2].size = num_dimms_per_channel; 1397 layers[2].size = num_dimms_per_channel;
1398 layers[2].is_virt_csrow = true; 1398 layers[2].is_virt_csrow = true;
1399 mci = new_edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(*pvt)); 1399 mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(*pvt));
1400
1401 if (mci == NULL) 1400 if (mci == NULL)
1402 return -ENOMEM; 1401 return -ENOMEM;
1403 1402
diff --git a/drivers/edac/i5100_edac.c b/drivers/edac/i5100_edac.c
index 691cd49aa169..d9b4921707f8 100644
--- a/drivers/edac/i5100_edac.c
+++ b/drivers/edac/i5100_edac.c
@@ -936,7 +936,7 @@ static int __devinit i5100_init_one(struct pci_dev *pdev,
936 layers[1].type = EDAC_MC_LAYER_SLOT; 936 layers[1].type = EDAC_MC_LAYER_SLOT;
937 layers[1].size = ranksperch; 937 layers[1].size = ranksperch;
938 layers[1].is_virt_csrow = true; 938 layers[1].is_virt_csrow = true;
939 mci = new_edac_mc_alloc(0, ARRAY_SIZE(layers), layers, 939 mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers,
940 sizeof(*priv)); 940 sizeof(*priv));
941 if (!mci) { 941 if (!mci) {
942 ret = -ENOMEM; 942 ret = -ENOMEM;
diff --git a/drivers/edac/i5400_edac.c b/drivers/edac/i5400_edac.c
index 508f369b1f6c..ff7bf8050c9c 100644
--- a/drivers/edac/i5400_edac.c
+++ b/drivers/edac/i5400_edac.c
@@ -1280,8 +1280,7 @@ static int i5400_probe1(struct pci_dev *pdev, int dev_idx)
1280 layers[2].type = EDAC_MC_LAYER_SLOT; 1280 layers[2].type = EDAC_MC_LAYER_SLOT;
1281 layers[2].size = DIMMS_PER_CHANNEL; 1281 layers[2].size = DIMMS_PER_CHANNEL;
1282 layers[2].is_virt_csrow = true; 1282 layers[2].is_virt_csrow = true;
1283 mci = new_edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(*pvt)); 1283 mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(*pvt));
1284
1285 if (mci == NULL) 1284 if (mci == NULL)
1286 return -ENOMEM; 1285 return -ENOMEM;
1287 1286
diff --git a/drivers/edac/i7300_edac.c b/drivers/edac/i7300_edac.c
index c2cf9771692a..97c22fd650ee 100644
--- a/drivers/edac/i7300_edac.c
+++ b/drivers/edac/i7300_edac.c
@@ -1051,8 +1051,7 @@ static int __devinit i7300_init_one(struct pci_dev *pdev,
1051 layers[2].type = EDAC_MC_LAYER_SLOT; 1051 layers[2].type = EDAC_MC_LAYER_SLOT;
1052 layers[2].size = MAX_SLOTS; 1052 layers[2].size = MAX_SLOTS;
1053 layers[2].is_virt_csrow = true; 1053 layers[2].is_virt_csrow = true;
1054 mci = new_edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(*pvt)); 1054 mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(*pvt));
1055
1056 if (mci == NULL) 1055 if (mci == NULL)
1057 return -ENOMEM; 1056 return -ENOMEM;
1058 1057
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index bc2c04550b8b..6d89c78a9b7a 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -2147,7 +2147,7 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev)
2147 layers[1].type = EDAC_MC_LAYER_SLOT; 2147 layers[1].type = EDAC_MC_LAYER_SLOT;
2148 layers[1].size = MAX_DIMMS; 2148 layers[1].size = MAX_DIMMS;
2149 layers[1].is_virt_csrow = true; 2149 layers[1].is_virt_csrow = true;
2150 mci = new_edac_mc_alloc(i7core_dev->socket, ARRAY_SIZE(layers), layers, 2150 mci = edac_mc_alloc(i7core_dev->socket, ARRAY_SIZE(layers), layers,
2151 sizeof(*pvt)); 2151 sizeof(*pvt));
2152 if (unlikely(!mci)) 2152 if (unlikely(!mci))
2153 return -ENOMEM; 2153 return -ENOMEM;
diff --git a/drivers/edac/i82443bxgx_edac.c b/drivers/edac/i82443bxgx_edac.c
index 524f9a2c5707..52072c28a8a6 100644
--- a/drivers/edac/i82443bxgx_edac.c
+++ b/drivers/edac/i82443bxgx_edac.c
@@ -255,7 +255,7 @@ static int i82443bxgx_edacmc_probe1(struct pci_dev *pdev, int dev_idx)
255 layers[1].type = EDAC_MC_LAYER_CHANNEL; 255 layers[1].type = EDAC_MC_LAYER_CHANNEL;
256 layers[1].size = I82443BXGX_NR_CHANS; 256 layers[1].size = I82443BXGX_NR_CHANS;
257 layers[1].is_virt_csrow = false; 257 layers[1].is_virt_csrow = false;
258 mci = new_edac_mc_alloc(0, ARRAY_SIZE(layers), layers, 0); 258 mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, 0);
259 if (mci == NULL) 259 if (mci == NULL)
260 return -ENOMEM; 260 return -ENOMEM;
261 261
diff --git a/drivers/edac/i82860_edac.c b/drivers/edac/i82860_edac.c
index 8834e4ed9802..08045059d10b 100644
--- a/drivers/edac/i82860_edac.c
+++ b/drivers/edac/i82860_edac.c
@@ -206,7 +206,7 @@ static int i82860_probe1(struct pci_dev *pdev, int dev_idx)
206 layers[1].type = EDAC_MC_LAYER_SLOT; 206 layers[1].type = EDAC_MC_LAYER_SLOT;
207 layers[1].size = 8; 207 layers[1].size = 8;
208 layers[1].is_virt_csrow = true; 208 layers[1].is_virt_csrow = true;
209 mci = new_edac_mc_alloc(0, ARRAY_SIZE(layers), layers, 0); 209 mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, 0);
210 if (!mci) 210 if (!mci)
211 return -ENOMEM; 211 return -ENOMEM;
212 212
diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c
index 89ca38a779a3..b613e31c16e5 100644
--- a/drivers/edac/i82875p_edac.c
+++ b/drivers/edac/i82875p_edac.c
@@ -420,7 +420,7 @@ static int i82875p_probe1(struct pci_dev *pdev, int dev_idx)
420 layers[1].type = EDAC_MC_LAYER_CHANNEL; 420 layers[1].type = EDAC_MC_LAYER_CHANNEL;
421 layers[1].size = nr_chans; 421 layers[1].size = nr_chans;
422 layers[1].is_virt_csrow = false; 422 layers[1].is_virt_csrow = false;
423 mci = new_edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(*pvt)); 423 mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(*pvt));
424 if (!mci) { 424 if (!mci) {
425 rc = -ENOMEM; 425 rc = -ENOMEM;
426 goto fail0; 426 goto fail0;
diff --git a/drivers/edac/i82975x_edac.c b/drivers/edac/i82975x_edac.c
index 092fa5ab2e1a..9c346d7f707f 100644
--- a/drivers/edac/i82975x_edac.c
+++ b/drivers/edac/i82975x_edac.c
@@ -555,7 +555,7 @@ static int i82975x_probe1(struct pci_dev *pdev, int dev_idx)
555 layers[1].type = EDAC_MC_LAYER_CHANNEL; 555 layers[1].type = EDAC_MC_LAYER_CHANNEL;
556 layers[1].size = I82975X_NR_CSROWS(chans); 556 layers[1].size = I82975X_NR_CSROWS(chans);
557 layers[1].is_virt_csrow = false; 557 layers[1].is_virt_csrow = false;
558 mci = new_edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(*pvt)); 558 mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(*pvt));
559 if (!mci) { 559 if (!mci) {
560 rc = -ENOMEM; 560 rc = -ENOMEM;
561 goto fail1; 561 goto fail1;
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
index a15141025a94..4c402353ba98 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
@@ -980,8 +980,7 @@ static int __devinit mpc85xx_mc_err_probe(struct platform_device *op)
980 layers[1].type = EDAC_MC_LAYER_CHANNEL; 980 layers[1].type = EDAC_MC_LAYER_CHANNEL;
981 layers[1].size = 1; 981 layers[1].size = 1;
982 layers[1].is_virt_csrow = false; 982 layers[1].is_virt_csrow = false;
983 mci = new_edac_mc_alloc(edac_mc_idx, ARRAY_SIZE(layers), layers, 983 mci = edac_mc_alloc(edac_mc_idx, ARRAY_SIZE(layers), sizeof(*pdata));
984 sizeof(*pdata));
985 if (!mci) { 984 if (!mci) {
986 devres_release_group(&op->dev, mpc85xx_mc_err_probe); 985 devres_release_group(&op->dev, mpc85xx_mc_err_probe);
987 return -ENOMEM; 986 return -ENOMEM;
diff --git a/drivers/edac/mv64x60_edac.c b/drivers/edac/mv64x60_edac.c
index 289a6cc859b4..b0bb5a3d2527 100644
--- a/drivers/edac/mv64x60_edac.c
+++ b/drivers/edac/mv64x60_edac.c
@@ -715,7 +715,7 @@ static int __devinit mv64x60_mc_err_probe(struct platform_device *pdev)
715 layers[1].type = EDAC_MC_LAYER_CHANNEL; 715 layers[1].type = EDAC_MC_LAYER_CHANNEL;
716 layers[1].size = 1; 716 layers[1].size = 1;
717 layers[1].is_virt_csrow = false; 717 layers[1].is_virt_csrow = false;
718 mci = new_edac_mc_alloc(edac_mc_idx, ARRAY_SIZE(layers), layers, 718 mci = edac_mc_alloc(edac_mc_idx, ARRAY_SIZE(layers), layers,
719 sizeof(struct mv64x60_mc_pdata)); 719 sizeof(struct mv64x60_mc_pdata));
720 if (!mci) { 720 if (!mci) {
721 printk(KERN_ERR "%s: No memory for CPU err\n", __func__); 721 printk(KERN_ERR "%s: No memory for CPU err\n", __func__);
diff --git a/drivers/edac/pasemi_edac.c b/drivers/edac/pasemi_edac.c
index 46aed62436b5..b095a906a994 100644
--- a/drivers/edac/pasemi_edac.c
+++ b/drivers/edac/pasemi_edac.c
@@ -215,7 +215,7 @@ static int __devinit pasemi_edac_probe(struct pci_dev *pdev,
215 layers[1].type = EDAC_MC_LAYER_CHANNEL; 215 layers[1].type = EDAC_MC_LAYER_CHANNEL;
216 layers[1].size = PASEMI_EDAC_NR_CHANS; 216 layers[1].size = PASEMI_EDAC_NR_CHANS;
217 layers[1].is_virt_csrow = false; 217 layers[1].is_virt_csrow = false;
218 mci = new_edac_mc_alloc(system_mmc_id++, ARRAY_SIZE(layers), layers, 218 mci = edac_mc_alloc(system_mmc_id++, ARRAY_SIZE(layers), layers,
219 0); 219 0);
220 if (mci == NULL) 220 if (mci == NULL)
221 return -ENOMEM; 221 return -ENOMEM;
diff --git a/drivers/edac/ppc4xx_edac.c b/drivers/edac/ppc4xx_edac.c
index 59f50b6f21d3..f3f9fed06ad7 100644
--- a/drivers/edac/ppc4xx_edac.c
+++ b/drivers/edac/ppc4xx_edac.c
@@ -1291,7 +1291,7 @@ static int __devinit ppc4xx_edac_probe(struct platform_device *op)
1291 layers[1].type = EDAC_MC_LAYER_CHANNEL; 1291 layers[1].type = EDAC_MC_LAYER_CHANNEL;
1292 layers[1].size = ppc4xx_edac_nr_chans; 1292 layers[1].size = ppc4xx_edac_nr_chans;
1293 layers[1].is_virt_csrow = false; 1293 layers[1].is_virt_csrow = false;
1294 mci = new_edac_mc_alloc(ppc4xx_edac_instance, ARRAY_SIZE(layers), layers, 1294 mci = edac_mc_alloc(ppc4xx_edac_instance, ARRAY_SIZE(layers), layers,
1295 sizeof(struct ppc4xx_edac_pdata)); 1295 sizeof(struct ppc4xx_edac_pdata));
1296 if (mci == NULL) { 1296 if (mci == NULL) {
1297 ppc4xx_edac_printk(KERN_ERR, "%s: " 1297 ppc4xx_edac_printk(KERN_ERR, "%s: "
diff --git a/drivers/edac/r82600_edac.c b/drivers/edac/r82600_edac.c
index aea1a0c0eca3..e1cacd164f31 100644
--- a/drivers/edac/r82600_edac.c
+++ b/drivers/edac/r82600_edac.c
@@ -291,7 +291,7 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx)
291 layers[1].type = EDAC_MC_LAYER_CHANNEL; 291 layers[1].type = EDAC_MC_LAYER_CHANNEL;
292 layers[1].size = R82600_NR_CHANS; 292 layers[1].size = R82600_NR_CHANS;
293 layers[1].is_virt_csrow = false; 293 layers[1].is_virt_csrow = false;
294 mci = new_edac_mc_alloc(0, ARRAY_SIZE(layers), layers, 0); 294 mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, 0);
295 if (mci == NULL) 295 if (mci == NULL)
296 return -ENOMEM; 296 return -ENOMEM;
297 297
diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index 828647969124..2f95a1b583dc 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -1640,7 +1640,7 @@ static int sbridge_register_mci(struct sbridge_dev *sbridge_dev)
1640 layers[1].type = EDAC_MC_LAYER_SLOT; 1640 layers[1].type = EDAC_MC_LAYER_SLOT;
1641 layers[1].size = MAX_DIMMS; 1641 layers[1].size = MAX_DIMMS;
1642 layers[1].is_virt_csrow = true; 1642 layers[1].is_virt_csrow = true;
1643 mci = new_edac_mc_alloc(sbridge_dev->mc, ARRAY_SIZE(layers), layers, 1643 mci = edac_mc_alloc(sbridge_dev->mc, ARRAY_SIZE(layers), layers,
1644 sizeof(*pvt)); 1644 sizeof(*pvt));
1645 1645
1646 if (unlikely(!mci)) 1646 if (unlikely(!mci))
diff --git a/drivers/edac/tile_edac.c b/drivers/edac/tile_edac.c
index bcdd1e4dc735..7bb4614730db 100644
--- a/drivers/edac/tile_edac.c
+++ b/drivers/edac/tile_edac.c
@@ -141,7 +141,7 @@ static int __devinit tile_edac_mc_probe(struct platform_device *pdev)
141 layers[1].type = EDAC_MC_LAYER_CHANNEL; 141 layers[1].type = EDAC_MC_LAYER_CHANNEL;
142 layers[1].size = TILE_EDAC_NR_CHANS; 142 layers[1].size = TILE_EDAC_NR_CHANS;
143 layers[1].is_virt_csrow = false; 143 layers[1].is_virt_csrow = false;
144 mci = new_edac_mc_alloc(pdev->id, ARRAY_SIZE(layers), layers, 144 mci = edac_mc_alloc(pdev->id, ARRAY_SIZE(layers), layers,
145 sizeof(struct tile_edac_priv)); 145 sizeof(struct tile_edac_priv));
146 if (mci == NULL) 146 if (mci == NULL)
147 return -ENOMEM; 147 return -ENOMEM;
diff --git a/drivers/edac/x38_edac.c b/drivers/edac/x38_edac.c
index 8f8cda914534..1ac7962d63ea 100644
--- a/drivers/edac/x38_edac.c
+++ b/drivers/edac/x38_edac.c
@@ -348,7 +348,7 @@ static int x38_probe1(struct pci_dev *pdev, int dev_idx)
348 layers[1].type = EDAC_MC_LAYER_CHANNEL; 348 layers[1].type = EDAC_MC_LAYER_CHANNEL;
349 layers[1].size = x38_channel_num; 349 layers[1].size = x38_channel_num;
350 layers[1].is_virt_csrow = false; 350 layers[1].is_virt_csrow = false;
351 mci = new_edac_mc_alloc(0, ARRAY_SIZE(layers), layers, 0); 351 mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, 0);
352 if (!mci) 352 if (!mci)
353 return -ENOMEM; 353 return -ENOMEM;
354 354