From: Lucas Stach <l.stach@pengutronix.de> To: Russell King <linux@arm.linux.org.uk> Cc: Tony Lindgren <tony@atomide.com>, Hauke Mehrtens <hauke@hauke-m.de>, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, patchwork-lst@pengutronix.de Subject: [PATCH v2 3/3] ARM: BCM5301X: remove workaround imprecise abort fault handler Date: Thu, 15 Oct 2015 12:32:22 +0200 [thread overview] Message-ID: <1444905142-21500-4-git-send-email-l.stach@pengutronix.de> (raw) In-Reply-To: <1444905142-21500-1-git-send-email-l.stach@pengutronix.de> This is not needed anymore. Handling a potentially pending imprecise external abort left behind by the bootloader is now done in a slightly safer way inside the common ARM startup code. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> --- arch/arm/mach-bcm/bcm_5301x.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/arch/arm/mach-bcm/bcm_5301x.c b/arch/arm/mach-bcm/bcm_5301x.c index 5478fe6bcce6..c8830a2b0d60 100644 --- a/arch/arm/mach-bcm/bcm_5301x.c +++ b/arch/arm/mach-bcm/bcm_5301x.c @@ -9,40 +9,6 @@ #include <asm/hardware/cache-l2x0.h> #include <asm/mach/arch.h> -#include <asm/siginfo.h> -#include <asm/signal.h> - - -static bool first_fault = true; - -static int bcm5301x_abort_handler(unsigned long addr, unsigned int fsr, - struct pt_regs *regs) -{ - if ((fsr == 0x1406 || fsr == 0x1c06) && first_fault) { - first_fault = false; - - /* - * These faults with codes 0x1406 (BCM4709) or 0x1c06 happens - * for no good reason, possibly left over from the CFE boot - * loader. - */ - pr_warn("External imprecise Data abort at addr=%#lx, fsr=%#x ignored.\n", - addr, fsr); - - /* Returning non-zero causes fault display and panic */ - return 0; - } - - /* Others should cause a fault */ - return 1; -} - -static void __init bcm5301x_init_early(void) -{ - /* Install our hook */ - hook_fault_code(16 + 6, bcm5301x_abort_handler, SIGBUS, BUS_OBJERR, - "imprecise external abort"); -} static const char *const bcm5301x_dt_compat[] __initconst = { "brcm,bcm4708", @@ -52,6 +18,5 @@ static const char *const bcm5301x_dt_compat[] __initconst = { DT_MACHINE_START(BCM5301X, "BCM5301X") .l2c_aux_val = 0, .l2c_aux_mask = ~0, - .init_early = bcm5301x_init_early, .dt_compat = bcm5301x_dt_compat, MACHINE_END -- 2.6.1
WARNING: multiple messages have this Message-ID (diff)
From: l.stach@pengutronix.de (Lucas Stach) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 3/3] ARM: BCM5301X: remove workaround imprecise abort fault handler Date: Thu, 15 Oct 2015 12:32:22 +0200 [thread overview] Message-ID: <1444905142-21500-4-git-send-email-l.stach@pengutronix.de> (raw) In-Reply-To: <1444905142-21500-1-git-send-email-l.stach@pengutronix.de> This is not needed anymore. Handling a potentially pending imprecise external abort left behind by the bootloader is now done in a slightly safer way inside the common ARM startup code. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> --- arch/arm/mach-bcm/bcm_5301x.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/arch/arm/mach-bcm/bcm_5301x.c b/arch/arm/mach-bcm/bcm_5301x.c index 5478fe6bcce6..c8830a2b0d60 100644 --- a/arch/arm/mach-bcm/bcm_5301x.c +++ b/arch/arm/mach-bcm/bcm_5301x.c @@ -9,40 +9,6 @@ #include <asm/hardware/cache-l2x0.h> #include <asm/mach/arch.h> -#include <asm/siginfo.h> -#include <asm/signal.h> - - -static bool first_fault = true; - -static int bcm5301x_abort_handler(unsigned long addr, unsigned int fsr, - struct pt_regs *regs) -{ - if ((fsr == 0x1406 || fsr == 0x1c06) && first_fault) { - first_fault = false; - - /* - * These faults with codes 0x1406 (BCM4709) or 0x1c06 happens - * for no good reason, possibly left over from the CFE boot - * loader. - */ - pr_warn("External imprecise Data abort at addr=%#lx, fsr=%#x ignored.\n", - addr, fsr); - - /* Returning non-zero causes fault display and panic */ - return 0; - } - - /* Others should cause a fault */ - return 1; -} - -static void __init bcm5301x_init_early(void) -{ - /* Install our hook */ - hook_fault_code(16 + 6, bcm5301x_abort_handler, SIGBUS, BUS_OBJERR, - "imprecise external abort"); -} static const char *const bcm5301x_dt_compat[] __initconst = { "brcm,bcm4708", @@ -52,6 +18,5 @@ static const char *const bcm5301x_dt_compat[] __initconst = { DT_MACHINE_START(BCM5301X, "BCM5301X") .l2c_aux_val = 0, .l2c_aux_mask = ~0, - .init_early = bcm5301x_init_early, .dt_compat = bcm5301x_dt_compat, MACHINE_END -- 2.6.1
next prev parent reply other threads:[~2015-10-15 10:32 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-10-15 10:32 [PATCH v2 0/3] ARM: handle imprecise aborts from firmware in common code Lucas Stach 2015-10-15 10:32 ` Lucas Stach 2015-10-15 10:32 ` [PATCH v2 1/3] ARM: catch pending imprecise abort on unmask Lucas Stach 2015-10-15 10:32 ` Lucas Stach 2015-10-15 15:32 ` Russell King - ARM Linux 2015-10-15 15:32 ` Russell King - ARM Linux 2015-10-15 15:39 ` Tony Lindgren 2015-10-15 15:39 ` Tony Lindgren 2015-10-15 16:06 ` Russell King - ARM Linux 2015-10-15 16:06 ` Russell King - ARM Linux 2015-10-15 16:23 ` Tony Lindgren 2015-10-15 16:23 ` Tony Lindgren 2015-10-16 8:21 ` Lucas Stach 2015-10-16 8:21 ` Lucas Stach 2015-10-19 12:41 ` Lucas Stach 2015-10-19 12:41 ` Lucas Stach 2015-10-15 10:32 ` [PATCH v2 2/3] ARM: OMAP2+: remove custom abort handler for t410 Lucas Stach 2015-10-15 10:32 ` Lucas Stach 2015-11-12 13:32 ` Lucas Stach 2015-11-12 13:32 ` Lucas Stach 2015-11-12 17:51 ` Tony Lindgren 2015-11-12 17:51 ` Tony Lindgren 2015-10-15 10:32 ` Lucas Stach [this message] 2015-10-15 10:32 ` [PATCH v2 3/3] ARM: BCM5301X: remove workaround imprecise abort fault handler Lucas Stach 2015-11-12 13:37 ` Lucas Stach 2015-11-12 17:54 ` Hauke Mehrtens 2015-11-25 0:01 ` Florian Fainelli 2015-11-25 0:01 ` Florian Fainelli 2015-10-16 19:11 ` [PATCH v2 0/3] ARM: handle imprecise aborts from firmware in common code Tyler Baker 2015-10-16 19:11 ` Tyler Baker
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=1444905142-21500-4-git-send-email-l.stach@pengutronix.de \ --to=l.stach@pengutronix.de \ --cc=hauke@hauke-m.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-omap@vger.kernel.org \ --cc=linux@arm.linux.org.uk \ --cc=patchwork-lst@pengutronix.de \ --cc=tony@atomide.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: linkBe 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.