From patchwork Wed Aug 18 07:23:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhrajyoti Datta X-Patchwork-Id: 12443481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BAFAC4338F for ; Wed, 18 Aug 2021 07:23:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5778D61075 for ; Wed, 18 Aug 2021 07:23:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238597AbhHRHX7 (ORCPT ); Wed, 18 Aug 2021 03:23:59 -0400 Received: from mail-bn8nam12on2085.outbound.protection.outlook.com ([40.107.237.85]:60640 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238080AbhHRHX7 (ORCPT ); Wed, 18 Aug 2021 03:23:59 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y9/zgNQXBhRQJl70ZbcP/uB86M2sq5mVo1tbryvWQhoxS3gWcDyIE/Hfz9x1u8DR4dQrANFoB6YrE+s0JeHD8OF5dGOvIzF22JEXnvqnzdM+wskqdFv3hVQVyjixcMgn4OQ64L/8NkbLMxKFSxd+sungNmqzSoAUaeKkl9gK6HhGAo4qadGEBc4umHfFCGnz0iDie2SDLe1M9273ztGYzhabRo06YjSSrfVyzUXWi+ZykZEUIKalYCZyem1T7ZQ13Iw9aJ2ROaMTqiMY49XVeqP0LNFpk5M0n8driRnOnMcn6FF92UDDuUY/nx6vzA4h0mApILcs+IoYx1aPN2mFew== 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-SenderADCheck; bh=2DLkY+HIFdd1zaj02aLAf52MtQBue5ONmhbO/RvWC8k=; b=hPEMmTh7rcrsz+J6ZdrgiH8OCQqIjKcvcr6QGlH80zCA1k8+wneHzv2kV7UEbXrhUG/mZ7s3hDc/TJRNMqqzlN4UP2fxkJMaGErHsiSuEAvtChYGhWXBtKC5tIk4NgU9LNqgV+mkAW9igjIB7jwyOd1usvmzLd9GvuL+HO858h6asIC5qEJUvHIN9/hU0guTB5qj3Ll8ixRAG/QRZCY3pqtjN9tfUkX0nuHNxAU5rQNgM1pDFjBTBFFCSuohMzlQwfozISasa0VXVJekjR8KumRdVyZ6mXKY7iImsHibj/9ncTczZS5eYjvqDzy+ilr0lGt71+aQSKJynW3DhNdfBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2DLkY+HIFdd1zaj02aLAf52MtQBue5ONmhbO/RvWC8k=; b=WnGlW0oi/Re3knJcmaPAR12Dv4EIYWYsxNQJy+64ssfj/+RnyROKqDB/U0sZklvvDcSR60TBJ5xGZmlzGe7fINfjYwPogK6EVdKWDbLLwPZQrjktbVOKB4omG09pDSyXXi6PGgW6/lXO0i3dzwUZ2kW8uRj2bOhXI6SC0GBrlh8= Received: from BN9PR03CA0342.namprd03.prod.outlook.com (2603:10b6:408:f6::17) by DM5PR02MB2892.namprd02.prod.outlook.com (2603:10b6:3:113::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.18; Wed, 18 Aug 2021 07:23:22 +0000 Received: from BN1NAM02FT020.eop-nam02.prod.protection.outlook.com (2603:10b6:408:f6:cafe::b) by BN9PR03CA0342.outlook.office365.com (2603:10b6:408:f6::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19 via Frontend Transport; Wed, 18 Aug 2021 07:23:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch02.xlnx.xilinx.com; Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by BN1NAM02FT020.mail.protection.outlook.com (10.13.2.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4436.19 via Frontend Transport; Wed, 18 Aug 2021 07:23:22 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Wed, 18 Aug 2021 00:23:21 -0700 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Wed, 18 Aug 2021 00:23:21 -0700 Envelope-to: git@xilinx.com, linux-edac@vger.kernel.org, bp@alien8.de, mchehab@kernel.org Received: from [10.140.6.59] (port=53052 helo=xhdshubhraj40.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1mGFux-0001xW-RC; Wed, 18 Aug 2021 00:23:20 -0700 From: Shubhrajyoti Datta To: CC: , , , , Sai Krishna Potthuri , Shubhrajyoti Datta Subject: [PATCH 1/2] edac: synopsys: Fix the wrong value assignment for edac_mode Date: Wed, 18 Aug 2021 12:53:14 +0530 Message-ID: <20210818072315.15149-1-shubhrajyoti.datta@xilinx.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 85feafcd-a48d-4973-d246-08d962190fca X-MS-TrafficTypeDiagnostic: DM5PR02MB2892: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:2657; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nKS2cPOcwoIiNaS0SqPaNlaVjxEtkakzJXULDOBnJV7ILQhI5UqBA5cxBEFNj0aXJll8y3kV7nuY9iYO21NJkFl9zTH61Sga+1mY07CVv4BcV4Jxukq3aFprbGyIOpS/Y0rlqSpzdE84zzamKca0CaCBzZRMU6dLautd6PAC5kxQ1AxGRYPvIJmsQsexLytMWqeraU783d5Di2h/T8mHaY69wB28MmV+cxpOhZRenL92a75cvfDgsaXZ2NoQ34KNJELgOVcsoBc1NZsNnu+xGSnwkqUpO2a+fluIUZJrFnVdPtzxN8qMVcxqyOowOMgihU0tSPzWvO9+NlsLVBgeHVN21y9v4MSqpj9fmnt0FGFv19rt++JnAlhj5aY09K1/7KFLbzOXUcwRKKbDqvrviHWkum33bm/1tZHYB5VR4eRPH6qSb30fMechn0Anq/rPxJNiFtn3YQGSyWXeaq5KNUKP8OzN/P76ODH1H+v9LL/cXWE3AKqqXtrp8FnXz8WxVHIVc6usw8TP5nAB4/LG4EiJmS/le3HSuO2BSt0dFd1vSjBgvQ+Apz+QZ37vjY3a+Yjw8DIJ7Bb3O0YV8aHsblDq/OHB2SvtVXfWCvR71yyKEafTd7oKgYIBxyr2nOUskDs/vvEixY2BiljNjvvrcxJR3hAcP6gxyZ4JHI2tKPvmfwR/d62DcfKeHjfT2+7KtFH6eUm36raMsXvSSKheRugb8elJgeZLobhU8F8UhLE= X-Forefront-Antispam-Report: CIP:149.199.62.198;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapexch02.xlnx.xilinx.com;PTR:unknown-62-198.xilinx.com;CAT:NONE;SFS:(4636009)(136003)(396003)(376002)(39860400002)(346002)(46966006)(36840700001)(2616005)(4326008)(54906003)(70586007)(1076003)(2906002)(44832011)(36860700001)(8676002)(6916009)(316002)(336012)(356005)(426003)(7636003)(36756003)(82310400003)(8936002)(83380400001)(82740400003)(36906005)(478600001)(70206006)(7696005)(9786002)(186003)(47076005)(107886003)(26005)(4744005)(5660300002)(6666004)(102446001);DIR:OUT;SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Aug 2021 07:23:22.6961 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 85feafcd-a48d-4973-d246-08d962190fca X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.62.198];Helo=[xsj-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BN1NAM02FT020.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR02MB2892 Precedence: bulk List-ID: X-Mailing-List: linux-edac@vger.kernel.org From: Sai Krishna Potthuri This patch corrected the edac_mode value by using enum instead of bitmask. Addresses-coverity: enumerated type mixed with another type. Signed-off-by: Sai Krishna Potthuri Signed-off-by: Shubhrajyoti Datta --- drivers/edac/synopsys_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c index 7e7146b22c16..7d08627e738b 100644 --- a/drivers/edac/synopsys_edac.c +++ b/drivers/edac/synopsys_edac.c @@ -782,7 +782,7 @@ static void init_csrows(struct mem_ctl_info *mci) for (j = 0; j < csi->nr_channels; j++) { dimm = csi->channels[j]->dimm; - dimm->edac_mode = EDAC_FLAG_SECDED; + dimm->edac_mode = EDAC_SECDED; dimm->mtype = p_data->get_mtype(priv->baseaddr); dimm->nr_pages = (size >> PAGE_SHIFT) / csi->nr_channels; dimm->grain = SYNPS_EDAC_ERR_GRAIN; From patchwork Wed Aug 18 07:23:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhrajyoti Datta X-Patchwork-Id: 12443483 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08EB4C4338F for ; Wed, 18 Aug 2021 07:23:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D7FB861076 for ; Wed, 18 Aug 2021 07:23:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238925AbhHRHYM (ORCPT ); Wed, 18 Aug 2021 03:24:12 -0400 Received: from mail-bn8nam12on2049.outbound.protection.outlook.com ([40.107.237.49]:9503 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238952AbhHRHYM (ORCPT ); Wed, 18 Aug 2021 03:24:12 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HzuzK+b1beDOJZ4b+xSbuhGvRnSyBBXt/rTCZW7C3wRoc+N5Tc7NHbM655/ObbDD7IZBqzaV31bxEhKYttDT6FanY+hIaIIMVjyLC8HAPXIGfhueYGqVr/CpcDyvsfuzS2CAK85005X24nkynPYhZLSFZsi5fQztTRBhkqlP9oCOiMStvxUiCVG/Qt53xtlrvmTT8OB7bLxuLsCvTLtySLtxumD0gBAHWBsai0NqSsGhb7zrYNba9jc5Loe0vLJCQQv8I2YNXf6by4GLPUMYw2K134xcJ+sr+8u7CuLhMBKaKfuIh7KGVBkw+kolllLWtuUugn46leFJHpn5MxFkOw== 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-SenderADCheck; bh=zYUn4OFEh0hmqUOP5Z+/PjeIRP8d0U4bS7ps+mJb1BM=; b=OvFgZB5ktH2kGCg3bEYukF1tlZsDMwAkZ2cW5bdVc1mZAWmmRU7+ClC84fSKM1nlRbA4Uc1yrsN/DwNDpiNQIWYCaxKb0uYw83cVvo9M5tqVVivDm+b0DdszICg1NIfEs+YO7OplwHPEDh5f4IUOt59VoYO4HJ8Y1mwsgHNH8h5W35ePNTtls8aHGXAdbcFbKKWQu+fAhA2HgxRIyJL5Q151MXgj4rGXdgeEobTPlTa8Bq0vyA3XoBS8R7boTUnX04emuDrbG3r0+Hbe90TUuE+ZT0rPLoadMYhbax7ZO+AkXQ9nWfjSX4LJQXDSu1cpeQH8yXwbkCr+ZwjqHsqooA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zYUn4OFEh0hmqUOP5Z+/PjeIRP8d0U4bS7ps+mJb1BM=; b=jnU3wZRCjhdumcJcldGCxoNKVSh0s6J+eU09mcVHYmVH4U/2KfgTxHbBU2UO2GV7AqzhS9oQQ+R4Q8drRe2cK/wifM2lLex9CojuuRKdjLu44wchwuaifmW8nbv6aKAUyJUjUFpR/Sz2GZtTccRGQmbymMibXLufqBRK2LU7HtY= Received: from BN1PR10CA0018.namprd10.prod.outlook.com (2603:10b6:408:e0::23) by PH0PR02MB8357.namprd02.prod.outlook.com (2603:10b6:510:100::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.14; Wed, 18 Aug 2021 07:23:36 +0000 Received: from BN1NAM02FT028.eop-nam02.prod.protection.outlook.com (2603:10b6:408:e0:cafe::ea) by BN1PR10CA0018.outlook.office365.com (2603:10b6:408:e0::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19 via Frontend Transport; Wed, 18 Aug 2021 07:23:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch01.xlnx.xilinx.com; Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by BN1NAM02FT028.mail.protection.outlook.com (10.13.2.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4436.19 via Frontend Transport; Wed, 18 Aug 2021 07:23:36 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Wed, 18 Aug 2021 00:23:23 -0700 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Wed, 18 Aug 2021 00:23:23 -0700 Envelope-to: git@xilinx.com, linux-edac@vger.kernel.org, bp@alien8.de, mchehab@kernel.org Received: from [10.140.6.59] (port=53052 helo=xhdshubhraj40.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1mGFv0-0001xW-Db; Wed, 18 Aug 2021 00:23:22 -0700 From: Shubhrajyoti Datta To: CC: , , , , Shubhrajyoti Datta Subject: [PATCH 2/2] edac: synopsys: Fix the issue in reporting of the error count Date: Wed, 18 Aug 2021 12:53:15 +0530 Message-ID: <20210818072315.15149-2-shubhrajyoti.datta@xilinx.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210818072315.15149-1-shubhrajyoti.datta@xilinx.com> References: <20210818072315.15149-1-shubhrajyoti.datta@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0c923733-86c9-47da-f8ef-08d9621917e0 X-MS-TrafficTypeDiagnostic: PH0PR02MB8357: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:2887; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W8KA9iprfr+wZv4nYX027jfMd3FkX94zvW3lnDZ9S44dZ5nB4BSTbUL9sGsqPWpwHhV8da84tXCC49zldwFgmpf7BFKsjRmYWTSsKPPWVbmkpdeyi+rbC88eu5kfIKGjoOAMaQWPoVK6CknivKJIJFAvnZJYGAwn/FK0PRikrczQJm38rn1dHKe/9Ue9lTL2hZ3WLnuA9FDF0R6KQUoFEs3YeMWwx++j7UkftZPpVLLvexFwHxyEbM51s6kkWj5TwOQQ8G01P7UYItrwW51bp+5pV49qstPQizfhbynFGYyQFH18H2R9IduvOBYiRIt/KNxf1lAymOO1f2KuO7uShr9uOkFxWT7sOieaFYGv+EugYYHOvlGZsZeftppkDpXcr4npDOQPUxD42jYQPF5/iSGYqm1FuPZwRvAMJs4MOmVgOYt6HrPa7SOymTsDcipaAGm9uxE7+oVTAC4/axozUlzosMMtiuWvk+cg2/BZaz/zwxqOoacneOS0bVemAuHmawl3T8R/f2Z2ZjPTaw89A8Q00abKjmQbk6TTDt9KfJVLYcWLNRxiXAlXb3PL1D3eh4qMcoWRZBLSNOV/ieCPqBozVCIlt3syguA1mgxZSyd7psUOX9wuFtS1V0+CYBnjguaFxoyJETkEEyr5dj5vosaAyG2nzgCAajwOMeP2xw7p+TigE9/guLQ9Y5+M+ov6Oc0Ox7+GtFsVbLDTN6dpdYUb+PMczMfrcllbb75iOQA= X-Forefront-Antispam-Report: CIP:149.199.62.198;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapexch01.xlnx.xilinx.com;PTR:unknown-62-198.xilinx.com;CAT:NONE;SFS:(4636009)(396003)(136003)(346002)(39850400004)(376002)(46966006)(36840700001)(70586007)(1076003)(107886003)(9786002)(36860700001)(336012)(70206006)(44832011)(8676002)(6916009)(26005)(356005)(426003)(4326008)(7696005)(54906003)(7636003)(2616005)(82310400003)(47076005)(186003)(6666004)(83380400001)(36906005)(2906002)(36756003)(5660300002)(82740400003)(8936002)(316002)(478600001)(102446001);DIR:OUT;SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Aug 2021 07:23:36.2640 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0c923733-86c9-47da-f8ef-08d9621917e0 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.62.198];Helo=[xsj-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BN1NAM02FT028.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR02MB8357 Precedence: bulk List-ID: X-Mailing-List: linux-edac@vger.kernel.org Currently we are reading the error count from status register which is not correct, this patch fixes the issue by reading the count from error count register(ERRCNT). Currently we are not reporting the errors cumulatively. Also send the cumulative errors to the edac_mc_handle_error. Signed-off-by: Shubhrajyoti Datta --- drivers/edac/synopsys_edac.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c index 7d08627e738b..38c03bdc2393 100644 --- a/drivers/edac/synopsys_edac.c +++ b/drivers/edac/synopsys_edac.c @@ -163,6 +163,11 @@ #define ECC_STAT_CECNT_SHIFT 8 #define ECC_STAT_BITNUM_MASK 0x7F +/* ECC error count register definitions */ +#define ECC_ERRCNT_UECNT_MASK 0xFFFF0000 +#define ECC_ERRCNT_UECNT_SHIFT 16 +#define ECC_ERRCNT_CECNT_MASK 0xFFFF + /* DDR QOS Interrupt register definitions */ #define DDR_QOS_IRQ_STAT_OFST 0x20200 #define DDR_QOSUE_MASK 0x4 @@ -418,14 +423,16 @@ static int zynqmp_get_error_info(struct synps_edac_priv *priv) base = priv->baseaddr; p = &priv->stat; + regval = readl(base + ECC_ERRCNT_OFST); + p->ce_cnt = regval & ECC_ERRCNT_CECNT_MASK; + p->ue_cnt = (regval & ECC_ERRCNT_UECNT_MASK) >> ECC_ERRCNT_UECNT_SHIFT; + if (!p->ce_cnt) + goto ue_err; + regval = readl(base + ECC_STAT_OFST); if (!regval) return 1; - p->ce_cnt = (regval & ECC_STAT_CECNT_MASK) >> ECC_STAT_CECNT_SHIFT; - p->ue_cnt = (regval & ECC_STAT_UECNT_MASK) >> ECC_STAT_UECNT_SHIFT; - if (!p->ce_cnt) - goto ue_err; p->ceinfo.bitpos = (regval & ECC_STAT_BITNUM_MASK); @@ -491,7 +498,7 @@ static void handle_error(struct mem_ctl_info *mci, struct synps_ecc_status *p) } edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, - p->ce_cnt, 0, 0, 0, 0, 0, -1, + priv->ce_cnt, 0, 0, 0, 0, 0, -1, priv->message, ""); } @@ -509,7 +516,7 @@ static void handle_error(struct mem_ctl_info *mci, struct synps_ecc_status *p) } edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, - p->ue_cnt, 0, 0, 0, 0, 0, -1, + priv->ue_cnt, 0, 0, 0, 0, 0, -1, priv->message, ""); }