Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp6419952ybh; Wed, 7 Aug 2019 23:45:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDx+WLYS/eCxoxAeJW1vah//aeU74/jD57A1sasYQru1oBKOF2MZYOL+tgqiCepsdDdp5d X-Received: by 2002:a17:902:7083:: with SMTP id z3mr7080568plk.87.1565246737592; Wed, 07 Aug 2019 23:45:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565246737; cv=none; d=google.com; s=arc-20160816; b=gk1RnkHcbtZU1Ycia5c/kmEikvQAbH99Afcg6WlCq3G64z8Juu//7bq4mXoUR4PhV/ CDVZ8VlZnpbw2eK5btHQFj07gRTSZF+q1++Y9m9Cm+epVqW09YdlMB1Y/RT0w7Ilp+TV Kl9F9YuXZEa/1gkgD64altMVJJ3m58lZqFdudGN9ER+sic3q2bndNCrhK27oRI7dUh5B dnC52n+Mh0lCy+v6uqEPJsLMzHuHXZ3/zvvVr1kLBpOMYQA2oDtIIDY/XzE9BkPzEZef 542X2Ir7QimMYmrDsIWAi6gRYFk506C2gHW+Zm2Z/mPHgtFfwd4ne/f7bpsGrAeXIFtt MRbA== 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=Nh05acH3OEgdLVIm/2eBOZKe1o2r6ECA+cmmbDHMQ3I=; b=SkO3l7sH0J1EUIxiDiggCTGX6cRGbAylB0jo+mLvdyO1kWGAaVPfF6nKB+/W8Weok1 67VDmwxb4+Pk677ahDxGxHaKk9z277G1GwQMjRkJPvYzfvgyrGOa8tmidWhPGQuuuNV3 0KjEVtnavVddw/hcfnfxPytXq64b29psvDlbpcNIra7ZLxTpyutAXNQ68HLYZR/wh9u0 fpYikzPGE3EDZMP6rzEyHeDt88xj36lHgfK9c7jqhxq/mO+6AviZy6ROtwJ+OkPrVOCb 9IFTD8TO3hUFgHjyBLRL8VJ87p8efFkzHxbcWqDupkV+walnTF9fJTTj6ogULcv+JLbh A/VA== 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 p62si1204788pjp.66.2019.08.07.23.45.20; Wed, 07 Aug 2019 23:45:37 -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 S1731333AbfHHG32 (ORCPT + 99 others); Thu, 8 Aug 2019 02:29:28 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:41847 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725817AbfHHG31 (ORCPT ); Thu, 8 Aug 2019 02:29:27 -0400 X-UUID: f28d89808aa94ba5be406f897b7fcec8-20190808 X-UUID: f28d89808aa94ba5be406f897b7fcec8-20190808 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0707 with TLS) with ESMTP id 1421459042; Thu, 08 Aug 2019 14:29:20 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 8 Aug 2019 14:29:19 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 8 Aug 2019 14:29:19 +0800 From: Miles Chen To: Catalin Marinas , Will Deacon CC: , , , , Miles Chen , Mark Rutland , Anshuman Khandual , James Morse Subject: [PATCH v3] arm64: mm: print hexadecimal EC value in mem_abort_decode() Date: Thu, 8 Aug 2019 14:29:18 +0800 Message-ID: <20190808062918.13226-1-miles.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: CA9711DA6A7449949D2FF391CE8DAC631472E15EBECA6DBBEC9D0B85D6B3E30B2000:8 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 Change since v2: add acked-by tag from Mark since v2 implemented the suggestion in v1 add reviewed-by tag from Anshuman in v2 Acked-by: Mark Rutland Reviewed-by: Anshuman Khandual 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