aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/tile_edac.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-04-16 14:12:28 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-28 18:13:48 -0400
commit40467db77050592cd514304db770739385b53cc6 (patch)
tree18d100d2ea3ec78a1b42af344cb581b093110a90 /drivers/edac/tile_edac.c
parentc36e3e77687b39073903f55461fc9417514e831e (diff)
tile_edac: convert driver to use the new edac ABI
The legacy edac ABI is going to be removed. Port the driver to use and benefit from the new API functionality. Acked-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/tile_edac.c')
-rw-r--r--drivers/edac/tile_edac.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/edac/tile_edac.c b/drivers/edac/tile_edac.c
index 054c9bb3a5dc..bcdd1e4dc735 100644
--- a/drivers/edac/tile_edac.c
+++ b/drivers/edac/tile_edac.c
@@ -71,7 +71,10 @@ static void tile_edac_check(struct mem_ctl_info *mci)
71 if (mem_error.sbe_count != priv->ce_count) { 71 if (mem_error.sbe_count != priv->ce_count) {
72 dev_dbg(mci->dev, "ECC CE err on node %d\n", priv->node); 72 dev_dbg(mci->dev, "ECC CE err on node %d\n", priv->node);
73 priv->ce_count = mem_error.sbe_count; 73 priv->ce_count = mem_error.sbe_count;
74 edac_mc_handle_ce(mci, 0, 0, 0, 0, 0, mci->ctl_name); 74 edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci,
75 0, 0, 0,
76 0, 0, -1,
77 mci->ctl_name, "", NULL);
75 } 78 }
76} 79}
77 80
@@ -122,6 +125,7 @@ static int __devinit tile_edac_mc_probe(struct platform_device *pdev)
122 char hv_file[32]; 125 char hv_file[32];
123 int hv_devhdl; 126 int hv_devhdl;
124 struct mem_ctl_info *mci; 127 struct mem_ctl_info *mci;
128 struct edac_mc_layer layers[2];
125 struct tile_edac_priv *priv; 129 struct tile_edac_priv *priv;
126 int rc; 130 int rc;
127 131
@@ -131,8 +135,14 @@ static int __devinit tile_edac_mc_probe(struct platform_device *pdev)
131 return -EINVAL; 135 return -EINVAL;
132 136
133 /* A TILE MC has a single channel and one chip-select row. */ 137 /* A TILE MC has a single channel and one chip-select row. */
134 mci = edac_mc_alloc(sizeof(struct tile_edac_priv), 138 layers[0].type = EDAC_MC_LAYER_CHIP_SELECT;
135 TILE_EDAC_NR_CSROWS, TILE_EDAC_NR_CHANS, pdev->id); 139 layers[0].size = TILE_EDAC_NR_CSROWS;
140 layers[0].is_virt_csrow = true;
141 layers[1].type = EDAC_MC_LAYER_CHANNEL;
142 layers[1].size = TILE_EDAC_NR_CHANS;
143 layers[1].is_virt_csrow = false;
144 mci = new_edac_mc_alloc(pdev->id, ARRAY_SIZE(layers), layers,
145 sizeof(struct tile_edac_priv));
136 if (mci == NULL) 146 if (mci == NULL)
137 return -ENOMEM; 147 return -ENOMEM;
138 priv = mci->pvt_info; 148 priv = mci->pvt_info;