From: York Sun <yorksun@freescale.com>
To: <galak@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org, York Sun <yorksun@freescale.com>
Subject: [PATCH 1/7] powerpc/mpc85xx: Fix EDAC address capture
Date: Fri, 6 Sep 2013 08:43:13 -0700 [thread overview]
Message-ID: <1378482199-10581-1-git-send-email-yorksun@freescale.com> (raw)
Extend err_addr to cover 64 bits for DDR errors.
Signed-off-by: York Sun <yorksun@freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@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 3eb32f6..392178f 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
@@ -773,6 +773,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;
@@ -780,7 +782,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;
@@ -811,7 +813,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++) {
@@ -848,7 +852,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 932016f..efb25bc 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
--
1.7.9.5
next reply other threads:[~2013-09-06 15:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-06 15:43 York Sun [this message]
2013-09-06 15:43 ` [PATCH 2/7] powerpc/mpc8xxx: Change EDAC for FSL SoC York Sun
2013-09-06 15:43 ` [PATCH 3/7] i2c/rtc-ds3232: Fix irq for probing York Sun
2013-09-10 22:26 ` Scott Wood
2013-09-06 15:43 ` [PATCH 4/7] power/mpc85xx: Add delay after enabling I2C master York Sun
2013-09-06 15:43 ` [PATCH 5/7] powerpc/corenet64_smp_defconfig: Enable most SPI splash York Sun
2013-10-29 0:28 ` [5/7] " Scott Wood
2013-10-29 0:39 ` York Sun
2013-09-06 15:43 ` [PATCH 6/7] powerpc/t4240emu: Add device tree file for t4240emu York Sun
2013-09-06 15:43 ` [PATCH 7/7] powerpc/b4860emu: Add device tree file for b4860emu York Sun
2013-09-10 22:31 ` Scott Wood
2013-09-10 22:25 ` [PATCH 1/7] powerpc/mpc85xx: Fix EDAC address capture Scott Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1378482199-10581-1-git-send-email-yorksun@freescale.com \
--to=yorksun@freescale.com \
--cc=galak@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).