* [PATCH] powerpc/mpc85xx: Fix EDAC address capture
@ 2015-05-07 9:04 songwenbin
2015-05-08 21:34 ` Scott Wood
0 siblings, 1 reply; 3+ messages in thread
From: songwenbin @ 2015-05-07 9:04 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Mingkai.hu, York Sun, songwenbin
From: York Sun <yorksun@freescale.com>
Extend err_addr to cover 64 bits for DDR errors.
Signed-off-by: York Sun <yorksun@freescale.com>
Change-Id: Idb112c4a106416a9cad9933c415e6f62de5cf07b
Reviewed-on: http://git.am.freescale.net:8181/553
Tested-by: Schmitt Richard-B43082 <B43082@freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Signed-off-by: songwenbin <wenbin.song@freescale.com>
---
drivers/edac/mpc85xx_edac.c | 10 +++++++---
drivers/edac/mpc85xx_edac.h | 1 +
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
index 68bf234..23ef8e9 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
@@ -811,6 +811,8 @@ static void sbe_ecc_decode(u32 cap_high, u32 cap_low, u32 cap_ecc,
}
}
+#define make64(high, low) (((u64)(high) << 32) | (low))
+
static void mpc85xx_mc_check(struct mem_ctl_info *mci)
{
struct mpc85xx_mc_pdata *pdata = mci->pvt_info;
@@ -818,7 +820,7 @@ static void mpc85xx_mc_check(struct mem_ctl_info *mci)
u32 bus_width;
u32 err_detect;
u32 syndrome;
- u32 err_addr;
+ u64 err_addr;
u32 pfn;
int row_index;
u32 cap_high;
@@ -849,7 +851,9 @@ static void mpc85xx_mc_check(struct mem_ctl_info *mci)
else
syndrome &= 0xffff;
- err_addr = in_be32(pdata->mc_vbase + MPC85XX_MC_CAPTURE_ADDRESS);
+ err_addr = make64(
+ in_be32(pdata->mc_vbase + MPC85XX_MC_CAPTURE_EXT_ADDRESS),
+ in_be32(pdata->mc_vbase + MPC85XX_MC_CAPTURE_ADDRESS));
pfn = err_addr >> PAGE_SHIFT;
for (row_index = 0; row_index < mci->nr_csrows; row_index++) {
@@ -886,7 +890,7 @@ static void mpc85xx_mc_check(struct mem_ctl_info *mci)
mpc85xx_mc_printk(mci, KERN_ERR,
"Captured Data / ECC:\t%#8.8x_%08x / %#2.2x\n",
cap_high, cap_low, syndrome);
- mpc85xx_mc_printk(mci, KERN_ERR, "Err addr: %#8.8x\n", err_addr);
+ mpc85xx_mc_printk(mci, KERN_ERR, "Err addr: %#8.8llx\n", err_addr);
mpc85xx_mc_printk(mci, KERN_ERR, "PFN: %#8.8x\n", pfn);
/* we are out of range */
diff --git a/drivers/edac/mpc85xx_edac.h b/drivers/edac/mpc85xx_edac.h
index 4498baf..9352e88 100644
--- a/drivers/edac/mpc85xx_edac.h
+++ b/drivers/edac/mpc85xx_edac.h
@@ -43,6 +43,7 @@
#define MPC85XX_MC_ERR_INT_EN 0x0e48
#define MPC85XX_MC_CAPTURE_ATRIBUTES 0x0e4c
#define MPC85XX_MC_CAPTURE_ADDRESS 0x0e50
+#define MPC85XX_MC_CAPTURE_EXT_ADDRESS 0x0e54
#define MPC85XX_MC_ERR_SBE 0x0e58
#define DSC_MEM_EN 0x80000000
--
2.1.0.27.g96db324
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/mpc85xx: Fix EDAC address capture
2015-05-07 9:04 [PATCH] powerpc/mpc85xx: Fix EDAC address capture songwenbin
@ 2015-05-08 21:34 ` Scott Wood
2015-05-08 21:35 ` Scott Wood
0 siblings, 1 reply; 3+ messages in thread
From: Scott Wood @ 2015-05-08 21:34 UTC (permalink / raw)
To: songwenbin; +Cc: linuxppc-dev, Mingkai.hu, York Sun
On Thu, 2015-05-07 at 17:04 +0800, songwenbin wrote:
> From: York Sun <yorksun@freescale.com>
>
> Extend err_addr to cover 64 bits for DDR errors.
>
> Signed-off-by: York Sun <yorksun@freescale.com>
> Change-Id: Idb112c4a106416a9cad9933c415e6f62de5cf07b
> Reviewed-on: http://git.am.freescale.net:8181/553
> Tested-by: Schmitt Richard-B43082 <B43082@freescale.com>
> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
> Signed-off-by: songwenbin <wenbin.song@freescale.com>
Please don't include gerrit stuff in upstream submissions. Definitely
don't include "Reviewed-by/Tested-by" from gerrit as those approvals are
from an entirely different context.
-Scott
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/mpc85xx: Fix EDAC address capture
2015-05-08 21:34 ` Scott Wood
@ 2015-05-08 21:35 ` Scott Wood
0 siblings, 0 replies; 3+ messages in thread
From: Scott Wood @ 2015-05-08 21:35 UTC (permalink / raw)
To: songwenbin; +Cc: linuxppc-dev, Mingkai.hu, York Sun
On Fri, 2015-05-08 at 16:34 -0500, Scott Wood wrote:
> On Thu, 2015-05-07 at 17:04 +0800, songwenbin wrote:
> > From: York Sun <yorksun@freescale.com>
> >
> > Extend err_addr to cover 64 bits for DDR errors.
> >
> > Signed-off-by: York Sun <yorksun@freescale.com>
> > Change-Id: Idb112c4a106416a9cad9933c415e6f62de5cf07b
> > Reviewed-on: http://git.am.freescale.net:8181/553
> > Tested-by: Schmitt Richard-B43082 <B43082@freescale.com>
> > Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
> > Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
> > Signed-off-by: songwenbin <wenbin.song@freescale.com>
>
> Please don't include gerrit stuff in upstream submissions. Definitely
> don't include "Reviewed-by/Tested-by" from gerrit as those approvals are
> from an entirely different context.
Never mind, I see you fixed that in v2. :-)
That said, these patches should go via the edac tree (see MAINTAINERS).
-Scott
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-08 21:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-07 9:04 [PATCH] powerpc/mpc85xx: Fix EDAC address capture songwenbin
2015-05-08 21:34 ` Scott Wood
2015-05-08 21:35 ` Scott Wood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).