Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp3513082imd; Mon, 29 Oct 2018 08:14:03 -0700 (PDT) X-Google-Smtp-Source: AJdET5eNIJ3R2p+3dLDfQLCClNwvCh8Gt05UKz1fcZZVe11IMUQr/M8naVTkXCsdsbAdB5jRfdfr X-Received: by 2002:a63:df50:: with SMTP id h16mr12354380pgj.421.1540826043118; Mon, 29 Oct 2018 08:14:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540826043; cv=none; d=google.com; s=arc-20160816; b=iWpS1SNu7xd2F8rtxy78BRDWb58CQQfNHtIdrtr7Zs2u5ITd/TgnHLlV2WHrUqyAqL vrnDNMgN5niRzBJdbPhVF+Jf2Z0WW51aOADJAko8Rd6j18CatKUsLOjlVHyTnX0Pow8A qhewgUDdwto43YaT0ngnBVaEccBHlUDslDiKZGCjaeR5UHkzvoL2PdN622ox8/1aZ63d qXQ8B8P5lx89CduuF3Cc8Bb49oSr7hHVdDqwiE/fhsq62SE27XDf+0Xo3Ha67eLg3nFA fw2VUrYZFjpu34JmZWO9zhoXlgQSKxWZAEE8Na1KeTGoE1EzO9gMMJATO6Pb55OUgQRP /frQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=aQyW1iGgeDAjWkuahUCBcMcb9F2dD9H0+yGaYLqFNNY=; b=Yj+lWuIyUB4irccKeCpNYTHSAWriJP4tzdJVmbgBzIHw4yO4bv9ttRHn8l6mm8tJ2z YbCeDi3mbzLTLrSeCWFxl8rOBuADyrU36/WSckOdMuTubSJLUztrGt/t2qAPekMNGyev j+Mef+3rDAqxM1wOugr1Bs4i1ulgHVKFoM4AsB0/9fA5tCHcVPhnWaGof+R17UkPq+ov bASGrYPxQTTXrBbzH2Cs73dN7DlQ85C80z0FDXA6JagMK8QoeMP7Q3oauGSxJx2zSRSL hxtv4n+bNhYN3jC6Nnq9a9K22bZ1Po8CI7EyHLQ5ZHapepVbOSqnKfHlgS6F/1u8/9T2 qy7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=Pq14H4g0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n23-v6si12251741pgb.330.2018.10.29.08.13.36; Mon, 29 Oct 2018 08:14:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=Pq14H4g0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727558AbeJ3ABt (ORCPT + 99 others); Mon, 29 Oct 2018 20:01:49 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:38576 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727251AbeJ3ABt (ORCPT ); Mon, 29 Oct 2018 20:01:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=aQyW1iGgeDAjWkuahUCBcMcb9F2dD9H0+yGaYLqFNNY=; b=Pq14H4g0D7b9Zb5SUXupUiZxG APb5TPbjX5iUqOiP4pPiAVxIMsKUR/tKydvUjMJYskRSiaejIlri+k0Bi+Oc/5j+CaGcwtypvr7Yw VsCQSvNoX6kpNCyiJAKeP7rYcAyBzdW+Y8uhFCb2W5+mXytwfYgT4OkQ+BVn2g+vm2/Hs=; Received: from n2100.armlinux.org.uk ([fd8f:7570:feb6:1:214:fdff:fe10:4f86]:32769) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) (envelope-from ) id 1gH9DW-0005BI-6h; Mon, 29 Oct 2018 15:12:34 +0000 Received: from linux by n2100.armlinux.org.uk with local (Exim 4.90_1) (envelope-from ) id 1gH9DT-0002Oa-1a; Mon, 29 Oct 2018 15:12:31 +0000 Date: Mon, 29 Oct 2018 15:12:29 +0000 From: Russell King - ARM Linux To: "Wiebe, Wladislav (Nokia - DE/Ulm)" Cc: "tony@atomide.com" , "akpm@linux-foundation.org" , "ebiederm@xmission.com" , "jrdr.linux@gmail.com" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] arm: mm: fault: check ADFSR in case of abort Message-ID: <20181029151228.GG30658@n2100.armlinux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 29, 2018 at 02:20:51PM +0000, Wiebe, Wladislav (Nokia - DE/Ulm) wrote: > When running into situations like: > "Unhandled fault: synchronous external abort (0x210) at 0xXXX" > or > "Unhandled prefetch abort: synchronous external abort (0x210) at 0xXXX" > it is useful to know the content of ADFSR (Auxiliary Data Fault Status > Register) to indicate an ECC double-bit error in L1 or L2 cache. > > Refer to: > Cortex-A15 Technical Reference Manual, Revision: r2p1 > [6.4.8. Error Correction Code] This is CPU independent code, and so must only access registers that are present on all CPUs which may run that code. Here's the extract from the ARM ARM for the ADFSR and AIFSR: The position of these registers is architecturally-defined, but the content and use of the registers is IMPLEMENTATION DEFINED. An implementation can use these registers to return additional fault status information. An example use of these registers is to return more information for diagnosing parity errors. So by testing bits in this register, you are making use of implementation defined values. It also goes on to say: These registers are not implemented in architecture versions before ARMv7. So before ARMv7, we have to take note of the unimplemented CP15 rules: 2. In an allocated CP15 primary register, accesses to all unallocated encodings are UNPREDICTABLE for accesses at PL1 or higher. This means that any MCR or MRC access from PL1 or higher with a combination of , , and values not shown in, or referenced from, Full list of VMSA CP15 registers, by coprocessor register number on page B3-1481, that would access an allocated CP15 primary register, is UNPREDICTABLE. As indicated by rule 1, for the ARMv7-Aarchitecture, the allocated CP15 primary registers are: • in any VMSA implementation, c0-c3, c5-c11, c13, and c15 ... So I'd prefer if we didn't attempt to read this register on CPUs where this isn't explicitly implemented. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up