From patchwork Thu Feb 22 18:12:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 13567903 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 8FA27C5479F for ; Thu, 22 Feb 2024 18:22:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Zl7trGBa4ccYnCfZPbMp0euikgIp6jtvjZBYJubLPkA=; b=aiUx+zREab+uI5 COeCdz+W05fjcgdsmLeHXOuea90CcXa9/JFadN9CJOP7JnVN/6MqC80NO4Gucjj5Qr6seJBDfOCpH 9mYrulg0a9Mm7Avcb47SHoI9zCqzfl42pui/KLXkimV8Hz/WuX9gJUKg8UXbQwBgOAf7zA3y306He AVoy1hrBQZC+9Y+AXPzYKcOECd1nBTPL4vTo57FaIH8/WjtfmL4nUaBXyBpJthKNzQcH2t+0P6dID BLHirrlKGUoSgzMpbF1v1b6fVm0rAFo9ULlHBwwvecxXKgwhBydKCR5P94/OAQvOS6pafOGx25zQN DiqvSJVGTq6Wf3raiu9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdDhw-000000060iP-3Edu; Thu, 22 Feb 2024 18:22:08 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdDbo-00000005xeu-13oB for linux-arm-kernel@bombadil.infradead.org; Thu, 22 Feb 2024 18:16:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=Tv0ab2lgE4guOpRcHEiI1iTXuRh4uBNVZdl4mwlt2wg=; b=r+/LjkkfCTibOWbgvljDpdeooh IMpDQNVT0XxNB7UQVEzM5CPzGibCPM3GnI6aXOiVqrCiW5H5T3jnaT6iSqo55ThyTZDE7t3YGfwyF nRo2JQv4i4+rlI3xhqUmCL1qJcVeeSb8KIk3HWN7u4y/Hm9gpznIQD8+AEeDTrOARdbU/YN4qR2b+ 23o0RvLXoCk2jI6i6qHgxFkd/FW/s1ozqYrO9obEpEuT6Q36jgvVHvd9Tos5R7MsCmqJi0gskO8uT 3n6y9QhdmVuocgO5ZYUynb1gO/hzaJk4W4Q1x0uVULL0AAGy4VOfi/PDCMLec/ile6liL6k6NSaWT DArUo91A==; Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by casper.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdDbj-00000004Ild-3Kie for linux-arm-kernel@lists.infradead.org; Thu, 22 Feb 2024 18:15:47 +0000 Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2d21e2b2245so1342791fa.0 for ; Thu, 22 Feb 2024 10:15:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708625679; x=1709230479; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Tv0ab2lgE4guOpRcHEiI1iTXuRh4uBNVZdl4mwlt2wg=; b=cJL/7hL2YD6L28ql4wsLrh2wUcrJeQKY75XICdyl0mpbjIT9qpMjelmWPIjcdQ7ny5 63AmZnOeQNHNXSWQpT6sxqCfkZQF0rUGfMDgY6HY9YrLAA1U9AZUARVJRxQQuID5jKPv hys2F/Q3KXiN7DEVofu6TV2bjJEx/u8fbuqzCtwXGLdoTu3DxtKyvj3oys9qWD4ZCtiy l2TZf8+BeQwxzUOh9aI7d+6XKKf+T0pP/J64UxdpzxY+L9DuDM4Nrb85oIJbKyIzKczn qTDd+y49WsdmF9qc3wb8PqtfXEgOd53R+bv+vLkImAEPipC4D59Ttr7WFHN98Ol21kH3 fxjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708625679; x=1709230479; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Tv0ab2lgE4guOpRcHEiI1iTXuRh4uBNVZdl4mwlt2wg=; b=R858R2IkuXi7aiRv11JlCmkEGJn4e3pPDnVSx1qgIvjfioFs1oamtqnk58AwdmhLtV bmewCLEhpT9eMELKhdLDE2dk9IF09zuJ9xaHqMF0Krwz8FKxmIZDPsrfv8MMqsg+Saar L2I1u4egxGXDSXe4NBua0c+nQf3PrtyHXW7jQR5KD9d61C+VBCAl55dS3b4iBHiJl0ql GQTPenqgChz1pyolqdYE9M+uSK/9w77gAhcW+qZbcSlLx1NlpasdAFPW7g033FYxcUfB RjBSX0GUrC41BwNUqj9bodTLdfPjEauiOp5zsZ5epJx+tIuPg6PPtJ8iytM3fPxN0My7 aYOg== X-Forwarded-Encrypted: i=1; AJvYcCXllu5eZ+2E83aMXKW8waW9KuE6IMd9JVK44/VUbbC37N7RlXKkh+icmAJDqRTov0CwA9FtJtS546yGBWP2X+egjfKUWLWFM3QP1f0gnykXFhFoZWA= X-Gm-Message-State: AOJu0Yx2H6G+iDS1jBOmob0u8ga67z2DPIkw237BI8V/P4CEW/fWiG8M sDAhN3cGfBnlHyzEAWEUilURzdZzUVL6/8bYbrjOHeAdAcjP5ClX X-Google-Smtp-Source: AGHT+IHA+WyWxnQ+pOSdLU4Imqh9orDNdwYCUlK6uxFXLm/wiayy7DJwE0Kc0gDTLDO3NPom4pMyow== X-Received: by 2002:a05:6512:1244:b0:512:bf7e:ca25 with SMTP id fb4-20020a056512124400b00512bf7eca25mr7610267lfb.20.1708625678696; Thu, 22 Feb 2024 10:14:38 -0800 (PST) Received: from localhost ([178.176.56.174]) by smtp.gmail.com with ESMTPSA id o5-20020ac24c45000000b00512e50c09acsm1089lfk.48.2024.02.22.10.14.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 10:14:38 -0800 (PST) From: Serge Semin To: Michal Simek , Alexander Stein , Borislav Petkov , Tony Luck , James Morse , Mauro Carvalho Chehab , Robert Richter Cc: Serge Semin , Punnaiah Choudary Kalluri , Dinh Nguyen , Arnd Bergmann , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 10/20] EDAC/synopsys: Drop struct ecc_error_info.blknr field Date: Thu, 22 Feb 2024 21:12:55 +0300 Message-ID: <20240222181324.28242-11-fancer.lancer@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240222181324.28242-1-fancer.lancer@gmail.com> References: <20240222181324.28242-1-fancer.lancer@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240222_181543_857698_C44592C2 X-CRM114-Status: GOOD ( 12.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Even though the ECC(C|U)ADDR1 CSR description indeed says it's a "Block number" in the DW uMCTL2 DDRC IP-core databooks, the corresponding register field is named as ECC(C|U)ADDR1.ecc_(un)corr_col (which means ECC (un)corrected column) and in the rest of the document it's referred as the SDRAM address column. Thus use the already available ecc_error_info.col field to read the column number to and drop the questionable ecc_error_info.blknr field for good. Signed-off-by: Serge Semin --- drivers/edac/synopsys_edac.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c index 21b0d791cb8b..6ca119459bd3 100644 --- a/drivers/edac/synopsys_edac.c +++ b/drivers/edac/synopsys_edac.c @@ -173,7 +173,7 @@ #define ECC_CEADDR0_RNK_MASK BIT(24) #define ECC_CEADDR1_BNKGRP_MASK 0x3000000 #define ECC_CEADDR1_BNKNR_MASK 0x70000 -#define ECC_CEADDR1_BLKNR_MASK 0xFFF +#define ECC_CEADDR1_COL_MASK 0xFFF #define ECC_CEADDR1_BNKGRP_SHIFT 24 #define ECC_CEADDR1_BNKNR_SHIFT 16 @@ -271,7 +271,6 @@ * @bitpos: Bit position. * @data: Data causing the error. * @bankgrpnr: Bank group number. - * @blknr: Block number. */ struct ecc_error_info { u32 row; @@ -280,7 +279,6 @@ struct ecc_error_info { u32 bitpos; u32 data; u32 bankgrpnr; - u32 blknr; }; /** @@ -433,7 +431,7 @@ static int zynqmp_get_error_info(struct synps_edac_priv *priv) ECC_CEADDR1_BNKNR_SHIFT; p->ceinfo.bankgrpnr = (regval & ECC_CEADDR1_BNKGRP_MASK) >> ECC_CEADDR1_BNKGRP_SHIFT; - p->ceinfo.blknr = (regval & ECC_CEADDR1_BLKNR_MASK); + p->ceinfo.col = (regval & ECC_CEADDR1_COL_MASK); p->ceinfo.data = readl(base + ECC_CSYND0_OFST); edac_dbg(2, "ECCCSYN0: 0x%08X ECCCSYN1: 0x%08X ECCCSYN2: 0x%08X\n", readl(base + ECC_CSYND0_OFST), readl(base + ECC_CSYND1_OFST), @@ -449,7 +447,7 @@ static int zynqmp_get_error_info(struct synps_edac_priv *priv) ECC_CEADDR1_BNKGRP_SHIFT; p->ueinfo.bank = (regval & ECC_CEADDR1_BNKNR_MASK) >> ECC_CEADDR1_BNKNR_SHIFT; - p->ueinfo.blknr = (regval & ECC_CEADDR1_BLKNR_MASK); + p->ueinfo.col = (regval & ECC_CEADDR1_COL_MASK); p->ueinfo.data = readl(base + ECC_UESYND0_OFST); out: spin_lock_irqsave(&priv->reglock, flags); @@ -480,10 +478,9 @@ static void handle_error(struct mem_ctl_info *mci, struct synps_ecc_status *p) pinf = &p->ceinfo; if (priv->p_data->quirks & DDR_ECC_INTR_SUPPORT) { snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, - "DDR ECC error type:%s Row %d Bank %d BankGroup Number %d Block Number %d Bit Position: %d Data: 0x%08x", - "CE", pinf->row, pinf->bank, - pinf->bankgrpnr, pinf->blknr, - pinf->bitpos, pinf->data); + "DDR ECC error type:%s Row %d Col %d Bank %d BankGroup Number %d Bit Position: %d Data: 0x%08x", + "CE", pinf->row, pinf->col, pinf->bank, + pinf->bankgrpnr, pinf->bitpos, pinf->data); } else { snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, "DDR ECC error type:%s Row %d Bank %d Col %d Bit Position: %d Data: 0x%08x", @@ -500,9 +497,9 @@ static void handle_error(struct mem_ctl_info *mci, struct synps_ecc_status *p) pinf = &p->ueinfo; if (priv->p_data->quirks & DDR_ECC_INTR_SUPPORT) { snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, - "DDR ECC error type :%s Row %d Bank %d BankGroup Number %d Block Number %d", - "UE", pinf->row, pinf->bank, - pinf->bankgrpnr, pinf->blknr); + "DDR ECC error type :%s Row %d Col %d Bank %d BankGroup Number %d", + "UE", pinf->row, pinf->col, pinf->bank, + pinf->bankgrpnr); } else { snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, "DDR ECC error type :%s Row %d Bank %d Col %d ",