From: Kai.Jiang Date: Tue, 26 Jul 2011 23:08:49 +0000 (-0700) Subject: drivers/edac/mpc85xx_edac.c: correct offset_in_page mask bits in edac_mc_handle_ce() X-Git-Tag: v3.1-rc1~182 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=444d2921215ae6c21f90eb5fa5d03f784f84f1aa;p=platform%2Fupstream%2Fkernel-adaptation-pc.git 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 Signed-off-by: Shaohui Xie Cc: Anton Vorontsov Cc: Grant Likely Cc: "David S. Miller" Cc: Kumar Gala Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c index 11e1a5d..8af8e86 100644 --- a/drivers/edac/mpc85xx_edac.c +++ b/drivers/edac/mpc85xx_edac.c @@ -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"); 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); 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); out_be32(pdata->mc_vbase + MPC85XX_MC_ERR_DETECT, err_detect);