* [PATCH] EDAC, altera: Disable IRQ while injecting SDRAM errors
@ 2016-10-19 19:53 tthayer
2016-10-22 18:14 ` Borislav Petkov
0 siblings, 1 reply; 2+ messages in thread
From: tthayer @ 2016-10-19 19:53 UTC (permalink / raw)
To: bp, dougthompson, mchehab; +Cc: linux-edac, linux-kernel, tthayer
From: Thor Thayer <tthayer@opensource.altera.com>
Disable IRQs while injecting SDRAM errors. The RT patches exposed
a spinlock deadlock where the spinlock taken for the regmap write
deadlocked with the IRQ clear regmap write.
Error injection is not normally enabled for ECC but only for
testing.
Signed-off-by: Thor Thayer <tthayer@opensource.altera.com>
---
drivers/edac/altera_edac.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
index 58d3e2b..6421cc3 100644
--- a/drivers/edac/altera_edac.c
+++ b/drivers/edac/altera_edac.c
@@ -153,13 +153,17 @@ static ssize_t altr_sdr_mc_err_inject_write(struct file *file,
if (count == 3) {
edac_printk(KERN_ALERT, EDAC_MC,
"Inject Double bit error\n");
+ local_irq_disable();
regmap_write(drvdata->mc_vbase, priv->ce_ue_trgr_offset,
(read_reg | priv->ue_set_mask));
+ local_irq_enable();
} else {
edac_printk(KERN_ALERT, EDAC_MC,
"Inject Single bit error\n");
+ local_irq_disable();
regmap_write(drvdata->mc_vbase, priv->ce_ue_trgr_offset,
(read_reg | priv->ce_set_mask));
+ local_irq_enable();
}
ptemp[0] = 0x5A5A5A5A;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] EDAC, altera: Disable IRQ while injecting SDRAM errors
2016-10-19 19:53 [PATCH] EDAC, altera: Disable IRQ while injecting SDRAM errors tthayer
@ 2016-10-22 18:14 ` Borislav Petkov
0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2016-10-22 18:14 UTC (permalink / raw)
To: tthayer; +Cc: dougthompson, mchehab, linux-edac, linux-kernel
On Wed, Oct 19, 2016 at 02:53:47PM -0500, tthayer@opensource.altera.com wrote:
> From: Thor Thayer <tthayer@opensource.altera.com>
>
> Disable IRQs while injecting SDRAM errors. The RT patches exposed
> a spinlock deadlock where the spinlock taken for the regmap write
> deadlocked with the IRQ clear regmap write.
> Error injection is not normally enabled for ECC but only for
> testing.
>
> Signed-off-by: Thor Thayer <tthayer@opensource.altera.com>
> ---
> drivers/edac/altera_edac.c | 4 ++++
> 1 file changed, 4 insertions(+)
Applied, thanks.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-22 18:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-19 19:53 [PATCH] EDAC, altera: Disable IRQ while injecting SDRAM errors tthayer
2016-10-22 18:14 ` Borislav Petkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).