Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp3979069ybh; Tue, 6 Aug 2019 04:31:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmd9WWZOe8UfYfwj2zNLaN+l0ZXV1INmYamXT6/XQBbaGGPWNiHk/V0ygLX2ZD4TM6Fx0z X-Received: by 2002:a62:3c3:: with SMTP id 186mr3193793pfd.21.1565091072502; Tue, 06 Aug 2019 04:31:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565091072; cv=none; d=google.com; s=arc-20160816; b=DidQ/l609iJgKBnCjpd4bOBkvZ2AJJK87w3+imJATRDHAdmgd1E7sJPHvFjt2whAWR 76jEjmRIyS6JNrcoi8BEV4uXE8ymtC6rODvFw33Hr95F1KDsG5yDwDGPJjaZ3ZAgCvdi WEPVgzrO7LFoG9d4CXZ8RIr9SzaFFbPsEIBl669IsG/YkItv/aw3M3b+EpVzkSfnpbse gA7+/tIW562BP7g+rvkxcOSc6OjMJz1bI+EYlrkYf58aNffVvACclrvEX3m6PbosRGQn 6KL9/U9wkyDDhkxnCRT6tDasTHgRvAygKFcoPITP2tdxjOVC/vgGDHlyGflanj18N1dF eKtg== 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=i1sDguRL1LBk2D409tQuUVBMor09ZjQ9jmUIgJ0Nwhk=; b=0vW8qJO52FP6Y4Pgsz1ErPNNOKHywEq1U9DvJUjb2v1GlcPM0+ls6zJReOLqoNWshO UFMy5207dwqzhHtv0PfmCT3rPthdJjnDi0hT4CfnmXkCgvTZZuFbeM3ms+dRADRnJBSp 4CbPq1Cq1w82WB6AgNBOXh+6yxM2W4msvKmJeP7VwXmNWkWclcGrOmb4Z9L0oeYbE+uy yoBN1bNTOdaAm6LnOHafnqJROxSxF/3NM82CWV3UF4j7TEy9Pg2NFDiaUQk47QB1cjFe 5feQ1aDF3BagH1iGrx2D+LglaB4NVMCeRX4LOZ2/StTdIBiht6n1ak99O70yBoc8PGpW sRag== 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 g6si44487150pll.82.2019.08.06.04.30.56; Tue, 06 Aug 2019 04:31:12 -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 S1730912AbfHFL35 (ORCPT + 99 others); Tue, 6 Aug 2019 07:29:57 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:45895 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726783AbfHFL35 (ORCPT ); Tue, 6 Aug 2019 07:29:57 -0400 X-UUID: f455010bd29142c48c7dbdffd71aecee-20190806 X-UUID: f455010bd29142c48c7dbdffd71aecee-20190806 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0707 with TLS) with ESMTP id 1004773151; Tue, 06 Aug 2019 19:29:48 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs06n1.mediatek.inc (172.21.101.129) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 6 Aug 2019 19:29:49 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 6 Aug 2019 19:29:49 +0800 From: Miles Chen To: Catalin Marinas , Will Deacon CC: , , , , Miles Chen , Mark Rutland , Anshuman Khandual , James Morse Subject: [PATCH] arm64: mm: print hexadecimal EC value in mem_abort_decode() Date: Tue, 6 Aug 2019 19:29:48 +0800 Message-ID: <20190806112948.4357-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, 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), (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