All of lore.kernel.org
 help / color / mirror / Atom feed
From: York Sun <york.sun@nxp.com>
To: <linux-edac@vger.kernel.org>
Cc: <morbidrsa@gmail.com>, <oss@buserror.net>, <stuart.yoder@nxp.com>,
	<bp@alien8.de>, York Sun <york.sun@nxp.com>,
	Doug Thompson <dougthompson@xmission.com>, <mchehab@kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: [Patch v4 1/9] driver/edac/mpc85xx_edac: Drop setting/clearing RFXE bit in HID1
Date: Tue, 9 Aug 2016 14:55:38 -0700	[thread overview]
Message-ID: <1470779760-16483-2-git-send-email-york.sun@nxp.com> (raw)
In-Reply-To: <1470779760-16483-1-git-send-email-york.sun@nxp.com>

On e500v1, read fault exception enable (RFXE) controls whether
assertion of core_fault_in causes a machine check interrupt.
Assertion of core_fault_in can result from uncorrectable data
error, such as  an L2 multi-bit ECC error. It can also occur from
a system error if logic on the integrated device signals a fault
for nonfatal errors. RFXE bit is cleared out of reset, and should
be left clear for normal operation. Assertion of core_fault_in does
not cause a machine check.

RFXE is set specifically for RIO (Rapid IO) and PCI for book E to
catch the errors by machine check. With this bit set, EDAC driver
can't get the interrupt in case of uncorrectable error. So this
bit is cleared in favor of EDAC. However, the benefit of catching
such uncorrectable error doesn't outweigh the other errors which
may hang the system. Beside, e500v2 has different errors masked
by RFXE, and e500mc doesn't support this bit. It is more reasonable
to leave RFXE as is in EDAC driver, and leave the uncorrectable
errors triggering machine check for e500v1.

Signed-off-by: York Sun <york.sun@nxp.com>
Suggested-by: Scott Wood <oss@buserror.net>

---
Change log
  v4: Fix typo in commit message
  v3: Revise commit message
  v2: new patch in this set

 drivers/edac/mpc85xx_edac.c | 40 ----------------------------------------
 1 file changed, 40 deletions(-)

diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
index ca63d0d..fdc3d9b 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
@@ -46,9 +46,6 @@ static u32 orig_pci_err_en;
 #endif
 
 static u32 orig_l2_err_disable;
-#ifdef CONFIG_FSL_SOC_BOOKE
-static u32 orig_hid1[2];
-#endif
 
 /************************ MC SYSFS parts ***********************************/
 
@@ -1225,14 +1222,6 @@ static struct platform_driver mpc85xx_mc_err_driver = {
 	},
 };
 
-#ifdef CONFIG_FSL_SOC_BOOKE
-static void __init mpc85xx_mc_clear_rfxe(void *data)
-{
-	orig_hid1[smp_processor_id()] = mfspr(SPRN_HID1);
-	mtspr(SPRN_HID1, (orig_hid1[smp_processor_id()] & ~HID1_RFXE));
-}
-#endif
-
 static struct platform_driver * const drivers[] = {
 	&mpc85xx_mc_err_driver,
 	&mpc85xx_l2_err_driver,
@@ -1263,42 +1252,13 @@ static int __init mpc85xx_mc_init(void)
 	if (res)
 		printk(KERN_WARNING EDAC_MOD_STR "drivers fail to register\n");
 
-#ifdef CONFIG_FSL_SOC_BOOKE
-	pvr = mfspr(SPRN_PVR);
-
-	if ((PVR_VER(pvr) == PVR_VER_E500V1) ||
-	    (PVR_VER(pvr) == PVR_VER_E500V2)) {
-		/*
-		 * need to clear HID1[RFXE] to disable machine check int
-		 * so we can catch it
-		 */
-		if (edac_op_state == EDAC_OPSTATE_INT)
-			on_each_cpu(mpc85xx_mc_clear_rfxe, NULL, 0);
-	}
-#endif
-
 	return 0;
 }
 
 module_init(mpc85xx_mc_init);
 
-#ifdef CONFIG_FSL_SOC_BOOKE
-static void __exit mpc85xx_mc_restore_hid1(void *data)
-{
-	mtspr(SPRN_HID1, orig_hid1[smp_processor_id()]);
-}
-#endif
-
 static void __exit mpc85xx_mc_exit(void)
 {
-#ifdef CONFIG_FSL_SOC_BOOKE
-	u32 pvr = mfspr(SPRN_PVR);
-
-	if ((PVR_VER(pvr) == PVR_VER_E500V1) ||
-	    (PVR_VER(pvr) == PVR_VER_E500V2)) {
-		on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0);
-	}
-#endif
 	platform_unregister_drivers(drivers, ARRAY_SIZE(drivers));
 }
 
-- 
2.7.4

       reply	other threads:[~2016-08-09 21:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1470779760-16483-1-git-send-email-york.sun@nxp.com>
2016-08-09 21:55 ` York Sun [this message]
2016-08-09 21:55 ` [Patch v4 2/9] driver/edac/mpc85xx_edac: Replace printk with proper pr_* format York Sun
2016-08-09 21:55 ` [Patch v4 3/9] driver/edac/fsl-ddr: Separate FSL DDR EDAC driver from MPC85xx York Sun
2016-08-11 13:36   ` Borislav Petkov
2016-08-11 15:05     ` york sun
2016-08-11 20:13     ` york sun
2016-08-09 21:55 ` [Patch v4 4/9] driver/edac/fsl_ddr: Rename macros and names York Sun
2016-08-09 21:55 ` [Patch v4 5/9] driver/edac/fsl_ddr: Add DDR types York Sun
2016-08-09 21:55 ` [Patch v4 6/9] driver/edac/fsl_ddr: Add support of little endian York Sun
2016-08-09 21:55   ` York Sun
2016-08-10 22:26   ` Rob Herring
2016-08-12  7:41   ` Borislav Petkov
2016-08-12  7:41     ` Borislav Petkov
2016-08-09 21:55 ` [Patch v4 7/9] driver/edac/fsl_ddr: Fix kernel warning when module is removed York Sun
2016-08-09 21:55 ` [Patch v4 8/9] driver/edac/layerscape_edac: Add Layerscape EDAC support York Sun
2016-08-09 21:55   ` York Sun
2016-08-12  9:12   ` Borislav Petkov
2016-08-12  9:12     ` Borislav Petkov
2016-08-23 16:46     ` york sun
2016-08-23 16:46       ` york sun

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=1470779760-16483-2-git-send-email-york.sun@nxp.com \
    --to=york.sun@nxp.com \
    --cc=bp@alien8.de \
    --cc=dougthompson@xmission.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=morbidrsa@gmail.com \
    --cc=oss@buserror.net \
    --cc=stuart.yoder@nxp.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.