drivers/edac/mpc85xx_edac.c: correct offset_in_page mask bits in edac_mc_handle_ce()
Parameter offset_in_page in edac_mc_handle_ce() should mask the higher bits above the page size, not the lower bits. The original input sometimes causes a crash. Signed-off-by: Kai.Jiang <Kai.Jiang@freescale.com> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Cc: Anton Vorontsov <avorontsov@mvista.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: "David S. Miller" <davem@davemloft.net> Cc: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
b34a6b1da3
commit
444d292121
|
@ -854,11 +854,11 @@ static void mpc85xx_mc_check(struct mem_ctl_info *mci)
|
||||||
mpc85xx_mc_printk(mci, KERN_ERR, "PFN out of range!\n");
|
mpc85xx_mc_printk(mci, KERN_ERR, "PFN out of range!\n");
|
||||||
|
|
||||||
if (err_detect & DDR_EDE_SBE)
|
if (err_detect & DDR_EDE_SBE)
|
||||||
edac_mc_handle_ce(mci, pfn, err_addr & PAGE_MASK,
|
edac_mc_handle_ce(mci, pfn, err_addr & ~PAGE_MASK,
|
||||||
syndrome, row_index, 0, mci->ctl_name);
|
syndrome, row_index, 0, mci->ctl_name);
|
||||||
|
|
||||||
if (err_detect & DDR_EDE_MBE)
|
if (err_detect & DDR_EDE_MBE)
|
||||||
edac_mc_handle_ue(mci, pfn, err_addr & PAGE_MASK,
|
edac_mc_handle_ue(mci, pfn, err_addr & ~PAGE_MASK,
|
||||||
row_index, mci->ctl_name);
|
row_index, mci->ctl_name);
|
||||||
|
|
||||||
out_be32(pdata->mc_vbase + MPC85XX_MC_ERR_DETECT, err_detect);
|
out_be32(pdata->mc_vbase + MPC85XX_MC_ERR_DETECT, err_detect);
|
||||||
|
|
Loading…
Reference in a new issue