public inbox for linux-edac@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] EDAC/altera: Use correct width with writes to INTTEST register.
@ 2025-05-27 14:57 Matthew Gerlach
  2025-05-28 11:06 ` Dinh Nguyen
  2025-05-29 15:41 ` Borislav Petkov
  0 siblings, 2 replies; 4+ messages in thread
From: Matthew Gerlach @ 2025-05-27 14:57 UTC (permalink / raw)
  To: dinguyen, bp, tony.luck, james.morse, mchehab, rric, tthayer,
	linux-edac, linux-kernel
  Cc: Niravkumar L Rabara, stable, Matthew Gerlach

From: Niravkumar L Rabara <niravkumar.l.rabara@intel.com>

On SoCFPGA platform INTTEST register only supports 16-bit write based on
the HW design, writing 32-bit to INTTEST register triggers SError to CPU.
Use 16-bit write for INITTEST register.

Fixes: c7b4be8db8bc ("EDAC, altera: Add Arria10 OCRAM ECC support")
Cc: stable@kernel.org
Signed-off-by: Niravkumar L Rabara <niravkumar.l.rabara@intel.com>
Signed-off-by: Matthew Gerlach <matthew.gerlach@altera.com>
---
 drivers/edac/altera_edac.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
index 20333608b983..cae52c654a15 100644
--- a/drivers/edac/altera_edac.c
+++ b/drivers/edac/altera_edac.c
@@ -1746,9 +1746,9 @@ altr_edac_a10_device_trig(struct file *file, const char __user *user_buf,
 
 	local_irq_save(flags);
 	if (trig_type == ALTR_UE_TRIGGER_CHAR)
-		writel(priv->ue_set_mask, set_addr);
+		writew(priv->ue_set_mask, set_addr);
 	else
-		writel(priv->ce_set_mask, set_addr);
+		writew(priv->ce_set_mask, set_addr);
 
 	/* Ensure the interrupt test bits are set */
 	wmb();
@@ -1778,7 +1778,7 @@ altr_edac_a10_device_trig2(struct file *file, const char __user *user_buf,
 
 	local_irq_save(flags);
 	if (trig_type == ALTR_UE_TRIGGER_CHAR) {
-		writel(priv->ue_set_mask, set_addr);
+		writew(priv->ue_set_mask, set_addr);
 	} else {
 		/* Setup read/write of 4 bytes */
 		writel(ECC_WORD_WRITE, drvdata->base + ECC_BLK_DBYTECTRL_OFST);
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-05-29 16:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-27 14:57 [PATCH] EDAC/altera: Use correct width with writes to INTTEST register Matthew Gerlach
2025-05-28 11:06 ` Dinh Nguyen
2025-05-29 15:41 ` Borislav Petkov
2025-05-29 16:17   ` Matthew Gerlach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox