From patchwork Fri Jan 31 17:08:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 3562771 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 701A4C02DC for ; Fri, 31 Jan 2014 17:09:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A2AA2022A for ; Fri, 31 Jan 2014 17:09:09 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3D3C02021C for ; Fri, 31 Jan 2014 17:09:08 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W9HaP-0001wQ-FS; Fri, 31 Jan 2014 17:09:01 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W9HaM-00070O-NP; Fri, 31 Jan 2014 17:08:58 +0000 Received: from pandora.arm.linux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W9HaI-0006zW-6U for linux-arm-kernel@lists.infradead.org; Fri, 31 Jan 2014 17:08:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=pandora; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=Int9YOW/VdxJR4OgbadScUkEC7PytEI5SyYATW7DlGg=; b=EMYxnfPXiCFIRV2woP6CwkoTXF5nXLE/odpaZABKnCjy/epxluEx1+MAox5FX0akcgPXcKw+SHMqu/dWq/+kGD1h5yaoLGwns4ZUfUj1X9/yH0g8f2TKAtJ6MZpPkEoCIFvfEeIKnXw+DBaB85nc6we5Qz8yO3HKeJ+7lN5bfUU=; Received: from n2100.arm.linux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:4f86]:54462) by pandora.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1W9HZt-0003xD-Gw; Fri, 31 Jan 2014 17:08:29 +0000 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1W9HZs-0000y1-9G; Fri, 31 Jan 2014 17:08:28 +0000 Date: Fri, 31 Jan 2014 17:08:27 +0000 From: Russell King - ARM Linux To: Fabrice Gasnier Subject: Re: Why are imprecise external aborts masked on recent kernel while booting ? Message-ID: <20140131170827.GH15937@n2100.arm.linux.org.uk> References: <52EBC86D.1010509@st.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <52EBC86D.1010509@st.com> User-Agent: Mutt/1.5.19 (2009-01-05) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140131_120854_702407_22C6D000 X-CRM114-Status: GOOD ( 13.34 ) X-Spam-Score: -2.6 (--) Cc: linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Jan 31, 2014 at 04:59:41PM +0100, Fabrice Gasnier wrote: > Is it a desired change in recent kernels ? I think it was an unnoticed behavioural change. > Is it possible to unmask imprecise data aborts earlier in the boot > process (e.g. before PCIe bus enumeration, when drivers are being probed) > ? How about this patch? diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 172ee18ff124..b0ff06f49cd0 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -900,6 +900,15 @@ void __init early_trap_init(void *vectors_base) flush_icache_range(vectors, vectors + PAGE_SIZE * 2); modify_domain(DOMAIN_USER, DOMAIN_CLIENT); + + /* Enable imprecise aborts */ + asm volatile( + "mrs %0, cpsr\n" + " bic %0, %0, %1\n" + " msr cpsr_c, %0" + : "=&r" (i) + : "r" (PSR_A_BIT)); + #else /* ifndef CONFIG_CPU_V7M */ /* * on V7-M there is no need to copy the vector table to a dedicated