From mboxrd@z Thu Jan 1 00:00:00 1970 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 2BA78C5B56A for ; Wed, 12 Aug 2026 05:49:14 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hKcxJ14wVz3brD; Wed, 12 Aug 2026 15:48:52 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=211.20.114.72 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1786513732; cv=none; b=i7dsbMJ0TwhQB0ODvAEOJHQGgb9JU6DrKj7IWNhtfVC3fKfVh6Xdhp3dVVwrHQ5zUqrHzLr+C1lszmEiTwpC/Rt189s74gJC0+RyUemHASYaiqtBSzR2Ag64dmucH9KWqvY/HVrhLIU9MFE+JC0g+WqnJD4sx5lMSkbV4VhNX8uR9FACndkiVJakwcx9h1qHG1lKMiomdNrc+Yb+TyCppzrwBOxvnOk2NfLxN3CNR8hZR9PmREvzt1UvrW74kLAXWWFadRgQgo4oMh5t9VKMnyU2aFtzTihatipX13bW8J8Doq8Pc1Z71ePfi6ctYS1EcaMxhLUy5tl5cPkCTv87GA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1786513732; c=relaxed/relaxed; bh=a3NwGJoxjsOQfXneqpDh4SaW5RBEezGe2ajLiNDyPjM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=IOcffGgydpL7rLHiDq1Jx1IDhtQ2HrDiHqdl05gpuw68VL87wTpTqX4djDq3FRjVkAkSxGKCOHqiJGjsHofcZxDakWtzxRHouWAkjk8URPYkGURNeGQwoPU1bXjAjUP3hQWdythgsVP5PvU9KamqLqPZQ4X8tTY3jxn6oUN/OoE42iMFXrng3VHYm7/7qriudNNLfFAKnsGL0J4EVZDKiRJWlnCpkkiERnlbG7RbsZLf9fF0nf8kuYH9Xe1I3vUjP1v70Znhk1Vn5dwHIGDBS1gmOQRopC9AJ7j9inrwfpBNXTH20irfMNbaDxYU8+GGEahzx+BDwd5Bw0PB6l7TQg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass (client-ip=211.20.114.72; helo=twmbx01.aspeedtech.com; envelope-from=ryan_chen@aspeedtech.com; receiver=lists.ozlabs.org) smtp.mailfrom=aspeedtech.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=aspeedtech.com (client-ip=211.20.114.72; helo=twmbx01.aspeedtech.com; envelope-from=ryan_chen@aspeedtech.com; receiver=lists.ozlabs.org) Received: from twmbx01.aspeedtech.com (mail.aspeedtech.com [211.20.114.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hKcxH30nsz3br7 for ; Wed, 12 Aug 2026 15:48:51 +1000 (AEST) Received: from TWMBX01.aspeed.com (192.168.0.62) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Wed, 12 Aug 2026 13:48:26 +0800 Received: from [127.0.1.1] (192.168.10.13) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1748.10 via Frontend Transport; Wed, 12 Aug 2026 13:48:26 +0800 From: Ryan Chen Date: Wed, 12 Aug 2026 13:48:26 +0800 Subject: [PATCH 2/7] EDAC/aspeed: Set the DIMM grain X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20260812-edac-v1-2-03992edea297@aspeedtech.com> References: <20260812-edac-v1-0-03992edea297@aspeedtech.com> In-Reply-To: <20260812-edac-v1-0-03992edea297@aspeedtech.com> To: Stefan Schaeckeler , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joel Stanley , Andrew Jeffery , Borislav Petkov , Tony Luck , "Sebastian Andrzej Siewior" , Clark Williams , Steven Rostedt CC: , , , , , Borislav Petkov , , Ryan Chen , X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786513706; l=1310; i=ryan_chen@aspeedtech.com; s=20251126; h=from:subject:message-id; bh=ghwuXIUkCe0r9jImgksJuGTgCehdPwUB1sU47hl7ksA=; b=ta3t3OOxlRiWkwMAqIK/N+WRybGbaOUJqQg0PEnxU+ucrYPyhNHsveCEa50qfJPjIFuCdvrvB JKdn2wbwYSlD5+7XNJ8o56qPVH+USWyAHMRG3mZ0zzsDkqhJppHYiDM X-Developer-Key: i=ryan_chen@aspeedtech.com; a=ed25519; pk=Xe73xY6tcnkuRjjbVAB/oU30KdB3FvG4nuJuILj7ZVc= The driver never sets dimm->grain, leaving it zero. Since commit 3724ace582d9 ("EDAC/mc: Fix grain_bits calculation") edac_raw_mc_handle_error() runs WARN_ON_ONCE(!e->grain) and forces the grain to 1, so the first ECC error reported on any Aspeed BMC SoC emits a warning splat, e.g. on the AST2600: WARNING: CPU: 0 PID: 0 at drivers/edac/edac_mc.c:924 edac_raw_mc_handle_error+0x4b4/0x604 ... edac_raw_mc_handle_error from edac_mc_handle_error+0x364/0x4a8 edac_mc_handle_error from count_rec+0xdc/0x124 count_rec from mcr_isr+0x110/0x1e8 Fixes: 9b7e6242ee4e ("EDAC, aspeed: Add an Aspeed AST2500 EDAC driver") Cc: stable@vger.kernel.org Signed-off-by: Ryan Chen --- drivers/edac/aspeed_edac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c index 6e069b255595..83d60414f89a 100644 --- a/drivers/edac/aspeed_edac.c +++ b/drivers/edac/aspeed_edac.c @@ -266,6 +266,7 @@ static int init_csrows(struct mem_ctl_info *mci) dimm->mtype = dram_type; dimm->edac_mode = EDAC_SECDED; dimm->nr_pages = nr_pages / csrow->nr_channels; + dimm->grain = 16; dev_dbg(mci->pdev, "initialized dimm with first_page=0x%lx and nr_pages=0x%x\n", csrow->first_page, nr_pages); -- 2.34.1