Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4751576ybh; Tue, 6 Aug 2019 17:34:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+E471ZBk4sP8OhW2btqoiMqB3IZVMVxHzX070P3BKG7ZyPcOtUe5IIiALTFQxtgufl1w8 X-Received: by 2002:a62:2784:: with SMTP id n126mr6594195pfn.61.1565138093882; Tue, 06 Aug 2019 17:34:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565138093; cv=none; d=google.com; s=arc-20160816; b=cpJ/SEB0hqzxpk8jzse6mrf7q8oYq10KTdLYJQjUte88gdHIbLLmwg6kdD/xbAV9TA Ey2yCV0w+TP6gCFA8sT4g+abT0rotaZWQz+oAdeer1cPGgYV/LL9EmKQo+u/C8DPuZ3f plPNmZNcPMdZX1zsyVb7HMiqsr7EYjBQFcQfgy8TCx2rZnNGcbisu66EDOE0YZX3Ux7t JJ/5Gwhds1opBg/maub5qHyMS6eVSQnnQSHmnRGldaMeVRXu2GNsxp07yQUmojpFjJC/ vQqUliT37f980NXOs+N4btvPekPcXX+yycrR9+6ibFrAulSIx8yxvg45PFK3r2Gdx1TF /QKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=BP+U4pCVeRNrDmYczAN8JJQ2NdsdHniyOp73qczZzr8=; b=afTpFK7RTf6RvL+AcBwu8CXhaSlrGKnKlvg4I9KS6oja161hI9tkgIIZBlq0NnKg0m E4bOmPCe+s0vgoR4XHAkB667YSwDwiCzuGDDSvMhUyw+gK6T4hhCkUWs0Kw8S6AlcPAa yAG8P1Bisj/TyUBkYYgYsUcyIWHNtZjjVnV8PltztB4GxqfNplftdgolcWnH5p4Df5e0 oiVChX9Pesdx1Sf5vXxMWXnE7IM0uY8+Rp9M3iJKkYxNTGaIDbIau6TxZvDv0PMObIkk 4lTe633reCsLU6UmqGbiwrPC5H/1dxgnFg2zP1hXkN7ZAsCblC6V+/B5IaFquLSKpsuM d2Bg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q4si11117124pgv.106.2019.08.06.17.34.38; Tue, 06 Aug 2019 17:34:53 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727569AbfHGAdp (ORCPT + 99 others); Tue, 6 Aug 2019 20:33:45 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:35214 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726340AbfHGAdp (ORCPT ); Tue, 6 Aug 2019 20:33:45 -0400 X-UUID: 37262de7528f4ec0ae64e19c3aa12211-20190807 X-UUID: 37262de7528f4ec0ae64e19c3aa12211-20190807 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0707 with TLS) with ESMTP id 48035339; Wed, 07 Aug 2019 08:33:37 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs06n1.mediatek.inc (172.21.101.129) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 7 Aug 2019 08:33:37 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 7 Aug 2019 08:33:37 +0800 From: Miles Chen To: Catalin Marinas , Will Deacon CC: , , , , Miles Chen , Mark Rutland , Anshuman Khandual , James Morse Subject: [PATCH v2] arm64: mm: print hexadecimal EC value in mem_abort_decode() Date: Wed, 7 Aug 2019 08:33:36 +0800 Message-ID: <20190807003336.28040-1-miles.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: 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 Change since v1: print "EC" instead of "Exception class" print EC in fixwidth 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..ad4980a27edb 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%02lx: %s, IL = %u bits\n", + ESR_ELx_EC(esr), esr_get_class_string(esr), (esr & ESR_ELx_IL) ? 32 : 16); pr_alert(" SET = %lu, FnV = %lu\n", (esr & ESR_ELx_SET_MASK) >> ESR_ELx_SET_SHIFT, -- 2.18.0