Linux EDAC development
 help / color / mirror / Atom feed
From: Rounak Das <rounakdas2025@gmail.com>
To: dinguyen@kernel.org
Cc: bp@alien8.de, rounakdas2025@gmail.com, tony.luck@intel.com,
	linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v5 2/2] EDAC/altera: remove remaining CONFIG_64BIT ifdefs in the DB-error path
Date: Wed,  8 Jul 2026 13:11:35 +0400	[thread overview]
Message-ID: <20260708091135.94114-3-rounakdas2025@gmail.com> (raw)
In-Reply-To: <20260708091135.94114-1-rounakdas2025@gmail.com>

Convert the last two CONFIG_64BIT ifdefs to the is_s10 flag, so the
whole driver selects behaviour from the ECC manager compatible.

s10_edac_dberr_handler() is now built on 32-bit too; the symbols it
uses are all available there. It only runs when is_s10 is true, so
Arria10 behaviour is unchanged.

Signed-off-by: Rounak Das <rounakdas2025@gmail.com>
---
 drivers/edac/altera_edac.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
index 24bdf7f5bac63..1d1e2b5ca14c8 100644
--- a/drivers/edac/altera_edac.c
+++ b/drivers/edac/altera_edac.c
@@ -2058,7 +2058,6 @@ static const struct irq_domain_ops a10_eccmgr_ic_ops = {
 /************** Stratix 10 EDAC Double Bit Error Handler ************/
 #define to_a10edac(p, m) container_of(p, struct altr_arria10_edac, m)
 
-#ifdef CONFIG_64BIT
 /* panic routine issues reboot on non-zero panic_timeout */
 extern int panic_timeout;
 
@@ -2105,7 +2104,6 @@ static int s10_edac_dberr_handler(struct notifier_block *this,
 
 	return NOTIFY_DONE;
 }
-#endif
 
 /****************** Arria 10 EDAC Probe Function *********************/
 static int altr_edac_a10_probe(struct platform_device *pdev)
@@ -2154,8 +2152,7 @@ static int altr_edac_a10_probe(struct platform_device *pdev)
 	irq_set_chained_handler_and_data(edac->sb_irq,
 					 altr_edac_a10_irq_handler,
 					 edac);
-
-#ifdef CONFIG_64BIT
+	if (edac->is_s10)
 	{
 		int dberror, err_addr;
 
@@ -2178,15 +2175,14 @@ static int altr_edac_a10_probe(struct platform_device *pdev)
 			regmap_write(edac->ecc_mgr_map,
 				     S10_SYSMGR_UE_ADDR_OFST, 0);
 		}
-	}
-#else
-	edac->db_irq = platform_get_irq(pdev, 1);
-	if (edac->db_irq < 0)
-		return edac->db_irq;
+	} else {
+		edac->db_irq = platform_get_irq(pdev, 1);
+		if (edac->db_irq < 0)
+			return edac->db_irq;
 
-	irq_set_chained_handler_and_data(edac->db_irq,
-					 altr_edac_a10_irq_handler, edac);
-#endif
+		irq_set_chained_handler_and_data(edac->db_irq,
+						 altr_edac_a10_irq_handler, edac);
+	}
 
 	for_each_child_of_node(pdev->dev.of_node, child) {
 		if (!of_device_is_available(child))
-- 
2.50.1 (Apple Git-155)


  parent reply	other threads:[~2026-07-08  9:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-27  6:17 [PATCH v4] EDAC/altera: use ECC manager compatible to select A10/S10 IRQ layout Rounak Das
2026-07-01 22:07 ` Dinh Nguyen
2026-07-02 15:53   ` Rounak Das
2026-07-06 12:34     ` Dinh Nguyen
2026-07-08  9:11       ` [PATCH v5 0/2] EDAC/altera: select A10/S10 behaviour by ECC manager compatible Rounak Das
2026-07-08  9:11         ` [PATCH v5 1/2] EDAC/altera: use ECC manager compatible to select A10/S10 IRQ layout Rounak Das
2026-07-08 20:48           ` Dinh Nguyen
2026-07-08  9:11         ` Rounak Das [this message]
2026-07-08 20:48           ` [PATCH v5 2/2] EDAC/altera: remove remaining CONFIG_64BIT ifdefs in the DB-error path Dinh Nguyen
2026-07-10  3:07         ` [PATCH v5 0/2] EDAC/altera: select A10/S10 behaviour by ECC manager compatible Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260708091135.94114-3-rounakdas2025@gmail.com \
    --to=rounakdas2025@gmail.com \
    --cc=bp@alien8.de \
    --cc=dinguyen@kernel.org \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox