Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4050241ybh; Tue, 6 Aug 2019 05:35:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqzfOT5KkkLkBhb1lN3IC14vFSCqiBzBFybDX7HMTZ1NVSQjcE0aHbNhQr4wu6CSxzWY/F1E X-Received: by 2002:a17:90a:d14b:: with SMTP id t11mr2991081pjw.79.1565094954388; Tue, 06 Aug 2019 05:35:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565094954; cv=none; d=google.com; s=arc-20160816; b=YYSlrHZAsAJUKcP1FfbDNvTFUk4m3uKp60sb7pKK6WZ4n2evB+V0CgD5gA2Y80Kgrt g5r72wFv3ZKMUwNK1Yu7V0aMGN8W7fKuWz552q64be4z7PM6bkEVGc1I9n4QS/QbINNt rB4yG8TeiFuaAKryzzAkBe1RCIo2b6PUDyTpd7dujB3QhhtkhJpKkiWXzZ+Jy0Er2PuD 8d5tkVkAi6NQKuUCOFy/YCuohWUn5T6TxCq6iX/a1SlZkP6bE61D9AIKiF5H5zpbIGlE KRU5tI7TrgyIX5xW0Izn1hTsFwXgUZvOuCQv+9R6VibzEXDtB8r0xxTo8jw5eyGG+htC rk9g== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=W0z9mOjgUdRpkosyHrm9OEpYzR+CLPhl9UjyKRocX28=; b=hjJIBghnkOiRiOl/jQsNpCata+ipGqXhBUlZtf7uxFSvY0zgZnAXnlQjGkf3KNMw/K vKxUmP1tRdBU6ZHKUgIsEAH2yjHzRbNGLFsbdDNbGV4Jz30/NgT2gJOsnCW3a0DCdp+k z+ZC2zLOwNwrn06zuVIcyg5axfxlU6z8Nlw9BXvRdEF6xdkip014+ePhl5mD8IAXlBIo flIqoq+RlMbCNAbHLWQQkZhnS/kGNOm0w5xfbZwTV6L94oGth2bH/2C0yrus50LvIJrx aYzGEwKYeJyrehammvcX8aGr/tbvgi3k83aWO0S2n8WvyVP4SZPe8xnF5ivkOq91KiIp OIQg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si12735689plh.334.2019.08.06.05.35.38; Tue, 06 Aug 2019 05:35:54 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731414AbfHFMez (ORCPT + 99 others); Tue, 6 Aug 2019 08:34:55 -0400 Received: from foss.arm.com ([217.140.110.172]:60920 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726834AbfHFMez (ORCPT ); Tue, 6 Aug 2019 08:34:55 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2361A28; Tue, 6 Aug 2019 05:34:54 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DC1073F694; Tue, 6 Aug 2019 05:34:52 -0700 (PDT) Date: Tue, 6 Aug 2019 13:34:50 +0100 From: Mark Rutland To: Miles Chen Cc: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, wsd_upstream@mediatek.com, Anshuman Khandual , James Morse Subject: Re: [PATCH] arm64: mm: print hexadecimal EC value in mem_abort_decode() Message-ID: <20190806123450.GE475@lakrids.cambridge.arm.com> References: <20190806112948.4357-1-miles.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190806112948.4357-1-miles.chen@mediatek.com> User-Agent: Mutt/1.11.1+11 (2f07cb52) (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 06, 2019 at 07:29:48PM +0800, Miles Chen wrote: > This change prints the hexadecimal EC value in mem_abort_decode(), > which makes it easier to lookup the corresponding EC in > the ARM Architecture Reference Manual. > > The commit 1f9b8936f36f ("arm64: Decode information from ESR upon mem > faults") prints useful information when memory abort occurs. It would > be easier to lookup "0x25" instead of "DABT" in the document. Then we > can check the corresponding ISS. > > For example: > Current info Document > EC Exception class > "CP15 MCR/MRC" 0x3 "MCR or MRC access to CP15a..." > "ASIMD" 0x7 "Access to SIMD or floating-point..." > "DABT (current EL)" 0x25 "Data Abort taken without..." > ... > > Before: > Unable to handle kernel paging request at virtual address 000000000000c000 > Mem abort info: > ESR = 0x96000046 > Exception class = DABT (current EL), IL = 32 bits > SET = 0, FnV = 0 > EA = 0, S1PTW = 0 > Data abort info: > ISV = 0, ISS = 0x00000046 > CM = 0, WnR = 1 > > After: > Unable to handle kernel paging request at virtual address 000000000000c000 > Mem abort info: > ESR = 0x96000046 > EC = 0x25, Exception class = DABT (current EL), IL = 32 bits > SET = 0, FnV = 0 > EA = 0, S1PTW = 0 > Data abort info: > ISV = 0, ISS = 0x00000046 > CM = 0, WnR = 1 > > Cc: Mark Rutland > Cc: Anshuman Khandual > Cc: James Morse > Signed-off-by: Miles Chen > --- > arch/arm64/mm/fault.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c > index cfd65b63f36f..afb6041e25e6 100644 > --- a/arch/arm64/mm/fault.c > +++ b/arch/arm64/mm/fault.c > @@ -86,8 +86,8 @@ static void mem_abort_decode(unsigned int esr) > pr_alert("Mem abort info:\n"); > > pr_alert(" ESR = 0x%08x\n", esr); > - pr_alert(" Exception class = %s, IL = %u bits\n", > - esr_get_class_string(esr), > + pr_alert(" EC = 0x%lx, Exception class = %s, IL = %u bits\n", > + ESR_ELx_EC(esr), esr_get_class_string(esr), Could we make this: pr_alert(" EC = 0x%02lx: %s, IL = %u bits\n", ESR_ELx_EC(esr), esr_get_class_string(esr)); We don't need to spell out "Exception Class" if we say "EC", and we should print the EC hex value with a consistent width as we do for the ISS. With that: Acked-by: Mark Rutland Thanks, Mark.