Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C8A33C433FE for ; Mon, 14 Feb 2022 08:14:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 47CEF10E1C0; Mon, 14 Feb 2022 08:14:37 +0000 (UTC) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2057.outbound.protection.outlook.com [40.107.93.57]) by gabe.freedesktop.org (Postfix) with ESMTPS id C697310E1C0 for ; Mon, 14 Feb 2022 08:14:36 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ESmdgTnCdenCbWRTvncF2JRfwJrP5LPROtr1Uj7ukJLJVK6pnNePiRk/2FYI6mog4EO7NaXslxaaaGOBjqZQ0tWmGchpyTbvNin/ZrD4YRk/XFBhi8k4Jud5Jl1jWEKP0Xy01xQe2d3zQ60aPA/dxgXxYFV3HX5ptfPbRSDPiXIVXbLcKpEeMx6sj09aH2VAXIHxjqmFcG9iSG0Uq/rGYTGJWSS+/3x2aYupJta7YR/9IpiASQQ3anv7QaA69HTcEXx0CCizTRcOyQgzrLGcwWG5Ya2jRsJP5UsIjgD0TqoEHyoHJIpig4IhAcxZ2DKV3xCZyogVzJNgTVsg0JD3Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RMotqZ95n+blF5du33f3wo2p5eg8WB0MfYUdXgS7rNY=; b=EAtBK09rwqonDWVdmLXFwejB0VLW9UCgiR2ok9JDInogAiVYTCEDBBC+F7kK75mYPg9bJn+tGfd570DqbT1YXn07PWsZs8J6ni+ARoelbDqDfSCGHogU5PB+k2Gkq6a4yNX0l421XjiRruPOY/Faz2w4Jw7KfZasBb2D4nNCwIk4XdTlnMZ5Qigej2Rl8JD81Lk/PKNZKTOlC6rMeH4KmFv8coRtoIsaGnU9i2f8gjG8tX9l1pzjJS5HHuopQluvsimQY1bEpNRh8FPEeBZG4mJm93USyR2y+NvpK2HtAAaLiLk72+YW+syxnMFMwqVjEG80gD1DNacB0/q/syTmdQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RMotqZ95n+blF5du33f3wo2p5eg8WB0MfYUdXgS7rNY=; b=4eLmurvBCYLNnTC/dopsb1tzc0vmJccfN0j31Jcm0skPUGaBDH5SUhpEzjs+OIqEhm/VRWjHiFyMlF/h/6P4lmP9ZGi1cspDSDI6dy3C3EtxCiARHwsDx3vvCdnGRq3qGgjvYV9UClA1tprU2uFqYAn1Q2UL3NIAnhpugRGDsko= Received: from DM5PR22CA0008.namprd22.prod.outlook.com (2603:10b6:3:101::18) by BYAPR12MB2824.namprd12.prod.outlook.com (2603:10b6:a03:97::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.18; Mon, 14 Feb 2022 08:14:31 +0000 Received: from DM6NAM11FT039.eop-nam11.prod.protection.outlook.com (2603:10b6:3:101:cafe::aa) by DM5PR22CA0008.outlook.office365.com (2603:10b6:3:101::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.18 via Frontend Transport; Mon, 14 Feb 2022 08:14:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT039.mail.protection.outlook.com (10.13.172.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4975.11 via Frontend Transport; Mon, 14 Feb 2022 08:14:30 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.18; Mon, 14 Feb 2022 02:14:29 -0600 Received: from stanley-test.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.18 via Frontend Transport; Mon, 14 Feb 2022 02:14:27 -0600 From: Stanley.Yang To: , , Subject: [PATCH Review 1/1] drm/amdgpu: print more error info Date: Mon, 14 Feb 2022 16:14:25 +0800 Message-ID: <20220214081425.22205-1-Stanley.Yang@amd.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f1727478-d95f-4ff6-c346-08d9ef9206b0 X-MS-TrafficTypeDiagnostic: BYAPR12MB2824:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1247; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KFeXp1e5bTctYm9152S+NqQHlkchI5yG4vz5l0pMaGNwIicagbasWXQI/qfHSBQ5HSFJVJ98K+FsHkwgu3RIr7APOVhyaHhyWrHQ0RLEUCK6O9B8JwCV9gqqhXKGoyMyS9hT+5nXaxU5oNn0K/zMqZq0L35MZqa/M+0Ch9+4KAg5DzMpv1MCyktoYgjjSIuNncN96KCc6ujBAB2YSFYgZvRUAL0BgLV4mMMdffAYR6fOhyz5vxISn7G8HslGiOx+xGc+aXNwEpHETzMo0j5nVZ/km0zuvF7ydOvhrQ+hl1ii6TSiJO/WikyysgMDA8UvmPSnvS12gcRNpVtnkhzZAklBeqmfK5hy93WAplFZ4XXprc4v05iskH0OdvlB8l1DGi6yCJD7zgM8cxUuUTP8k1V61qBaGQFrYPMVWzYkHH9HliBiDCuETWfaJtwJTPOTXHE3yAkMUwzE8kxNnevweJ5Frv3MQmMfSiWHual/PDykBljcSCoJu/5wusqG/rWceOa/TM1YeBkg5rGLCx/CjsTOq7k/XihE/0JkxqmZV/UorY9IO30Rhvx1n5Q3IFwjvAm9BMgGbMOTu0Mrj2WRD5U8LiVgWC04qH0RXwfKk8utPHoehWNU5XiXvZvFuVIkRKUF1TnyW5H7270gJXPnoFCwU5bnOc/4YzPGR88oQM2zkEm/bjo0LMfegr2+DibEFtLwxcEn8gdumzHGcoDBWg== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(40470700004)(46966006)(6636002)(81166007)(40460700003)(356005)(8936002)(5660300002)(82310400004)(86362001)(2906002)(36860700001)(4326008)(7696005)(47076005)(110136005)(316002)(83380400001)(36756003)(8676002)(508600001)(26005)(1076003)(186003)(70206006)(336012)(426003)(70586007)(2616005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Feb 2022 08:14:30.5209 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f1727478-d95f-4ff6-c346-08d9ef9206b0 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT039.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2824 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Stanley.Yang" Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" print more error info when deferred uncorrectable ras error changed from V1: move Defferred error msg into query uncorrectable error count function. Signed-off-by: Stanley.Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 +- drivers/gpu/drm/amd/amdgpu/umc_v6_7.c | 72 ++++++++++++++++++- .../include/asic_reg/umc/umc_6_7_0_offset.h | 6 ++ 3 files changed, 78 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 5d3968b5f92c..8016a638c847 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -1529,11 +1529,8 @@ static void amdgpu_ras_interrupt_handler(struct ras_manager *obj) data->rptr) % data->ring_size; if (data->cb) { - if (amdgpu_ras_is_poison_mode_supported(obj->adev) && - obj->head.block == AMDGPU_RAS_BLOCK__UMC) - dev_info(obj->adev->dev, - "Poison is created, no user action is needed.\n"); - else { + if (!(amdgpu_ras_is_poison_mode_supported(obj->adev) && + obj->head.block == AMDGPU_RAS_BLOCK__UMC)) { /* Let IP handle its data, maybe we need get the output * from the callback to udpate the error type/count, etc */ diff --git a/drivers/gpu/drm/amd/amdgpu/umc_v6_7.c b/drivers/gpu/drm/amd/amdgpu/umc_v6_7.c index 87e4ef18e151..2a91452c5ac8 100644 --- a/drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +++ b/drivers/gpu/drm/amd/amdgpu/umc_v6_7.c @@ -87,8 +87,14 @@ static void umc_v6_7_ecc_info_querry_uncorrectable_error_count(struct amdgpu_dev { uint64_t mc_umc_status; uint32_t eccinfo_table_idx; + uint32_t umc_reg_offset; + uint32_t mc_umc_addr; + uint64_t reg_value; struct amdgpu_ras *ras = amdgpu_ras_get_context(adev); + umc_reg_offset = get_umc_v6_7_reg_offset(adev, + umc_inst, ch_inst); + eccinfo_table_idx = umc_inst * adev->umc.channel_inst_num + ch_inst; /* check the MCUMC_STATUS */ mc_umc_status = ras->umc_ecc.ecc[eccinfo_table_idx].mca_umc_status; @@ -97,8 +103,36 @@ static void umc_v6_7_ecc_info_querry_uncorrectable_error_count(struct amdgpu_dev REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, UECC) == 1 || REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, PCC) == 1 || REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, UC) == 1 || - REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, TCC) == 1)) + REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, TCC) == 1)) { *error_count += 1; + + if (REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, Deferred) == 1) + dev_info(adev->dev, "Deferred error, poison is created, no user action is needed.\n"); + + if (mc_umc_status) + dev_info(adev->dev, "MCA STATUS 0x%llx, umc_reg_offset 0x%x\n", mc_umc_status, umc_reg_offset); + + /* print IPID registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0, regMCA_UMC_UMC0_MCUMC_IPIDT0); + reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset) * 4); + if (reg_value) + dev_info(adev->dev, "MCA IPID 0x%llx, umc_reg_offset 0x%x\n", reg_value, umc_reg_offset); + + /* print SYND registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0, regMCA_UMC_UMC0_MCUMC_SYNDT0); + reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset) * 4); + if (reg_value) + dev_info(adev->dev, "MCA SYND 0x%llx, umc_reg_offset 0x%x\n", reg_value, umc_reg_offset); + + /* print MISC0 registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0, regMCA_UMC_UMC0_MCUMC_MISC0T0); + reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset) * 4); + if (reg_value) + dev_info(adev->dev, "MCA MISC0 0x%llx, umc_reg_offset 0x%x\n", reg_value, umc_reg_offset); + } } static void umc_v6_7_ecc_info_query_ras_error_count(struct amdgpu_device *adev, @@ -168,11 +202,13 @@ static void umc_v6_7_ecc_info_query_error_address(struct amdgpu_device *adev, /* loop for all possibilities of [C4 C3 C2] */ for (column = 0; column < UMC_V6_7_NA_MAP_PA_NUM; column++) { retired_page = soc_pa | (column << UMC_V6_7_PA_C2_BIT); + dev_info(adev->dev, "Error Address(PA): 0x%llx\n", retired_page); amdgpu_umc_fill_error_record(err_data, err_addr, retired_page, channel_index, umc_inst); /* shift R14 bit */ retired_page ^= (0x1ULL << UMC_V6_7_PA_R14_BIT); + dev_info(adev->dev, "Error Address(PA): 0x%llx\n", retired_page); amdgpu_umc_fill_error_record(err_data, err_addr, retired_page, channel_index, umc_inst); } @@ -251,6 +287,8 @@ static void umc_v6_7_querry_uncorrectable_error_count(struct amdgpu_device *adev { uint64_t mc_umc_status; uint32_t mc_umc_status_addr; + uint32_t mc_umc_addr; + uint64_t reg_value; mc_umc_status_addr = SOC15_REG_OFFSET(UMC, 0, regMCA_UMC_UMC0_MCUMC_STATUST0); @@ -262,8 +300,36 @@ static void umc_v6_7_querry_uncorrectable_error_count(struct amdgpu_device *adev REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, UECC) == 1 || REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, PCC) == 1 || REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, UC) == 1 || - REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, TCC) == 1)) + REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, TCC) == 1)) { *error_count += 1; + + if (REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, Deferred) == 1) + dev_info(adev->dev, "Deferred error, poison is created, no user action is needed.\n"); + + if (mc_umc_status) + dev_info(adev->dev, "MCA STATUS 0x%llx, umc_reg_offset 0x%x\n", mc_umc_status, umc_reg_offset); + + /* print IPID registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0, regMCA_UMC_UMC0_MCUMC_IPIDT0); + reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset) * 4); + if (reg_value) + dev_info(adev->dev, "MCA IPID 0x%llx, umc_reg_offset 0x%x\n", reg_value, umc_reg_offset); + + /* print SYND registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0, regMCA_UMC_UMC0_MCUMC_SYNDT0); + reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset) * 4); + if (reg_value) + dev_info(adev->dev, "MCA SYND 0x%llx, umc_reg_offset 0x%x\n", reg_value, umc_reg_offset); + + /* print MISC0 registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0, regMCA_UMC_UMC0_MCUMC_MISC0T0); + reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset) * 4); + if (reg_value) + dev_info(adev->dev, "MCA MISC0 0x%llx, umc_reg_offset 0x%x\n", reg_value, umc_reg_offset); + } } static void umc_v6_7_reset_error_count_per_channel(struct amdgpu_device *adev, @@ -403,11 +469,13 @@ static void umc_v6_7_query_error_address(struct amdgpu_device *adev, /* loop for all possibilities of [C4 C3 C2] */ for (column = 0; column < UMC_V6_7_NA_MAP_PA_NUM; column++) { retired_page = soc_pa | (column << UMC_V6_7_PA_C2_BIT); + dev_info(adev->dev, "Error Address(PA): 0x%llx\n", retired_page); amdgpu_umc_fill_error_record(err_data, err_addr, retired_page, channel_index, umc_inst); /* shift R14 bit */ retired_page ^= (0x1ULL << UMC_V6_7_PA_R14_BIT); + dev_info(adev->dev, "Error Address(PA): 0x%llx\n", retired_page); amdgpu_umc_fill_error_record(err_data, err_addr, retired_page, channel_index, umc_inst); } diff --git a/drivers/gpu/drm/amd/include/asic_reg/umc/umc_6_7_0_offset.h b/drivers/gpu/drm/amd/include/asic_reg/umc/umc_6_7_0_offset.h index 912955f75b14..37d89a3f336a 100644 --- a/drivers/gpu/drm/amd/include/asic_reg/umc/umc_6_7_0_offset.h +++ b/drivers/gpu/drm/amd/include/asic_reg/umc/umc_6_7_0_offset.h @@ -31,6 +31,12 @@ #define regMCA_UMC_UMC0_MCUMC_STATUST0_BASE_IDX 0 #define regMCA_UMC_UMC0_MCUMC_ADDRT0 0x03c4 #define regMCA_UMC_UMC0_MCUMC_ADDRT0_BASE_IDX 0 +#define regMCA_UMC_UMC0_MCUMC_MISC0T0 0x03c6 +#define regMCA_UMC_UMC0_MCUMC_MISC0T0_BASE_IDX 0 +#define regMCA_UMC_UMC0_MCUMC_IPIDT0 0x03ca +#define regMCA_UMC_UMC0_MCUMC_IPIDT0_BASE_IDX 0 +#define regMCA_UMC_UMC0_MCUMC_SYNDT0 0x03cc +#define regMCA_UMC_UMC0_MCUMC_SYNDT0_BASE_IDX 0 // addressBlock: umc_w_phy_umc0_umcch0_umcchdec -- 2.17.1