diff options
author | Thor Thayer <tthayer@opensource.altera.com> | 2016-10-19 14:53:47 -0500 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2016-10-22 20:14:03 +0200 |
commit | 90e493d7d51c791a2adc2de962cbd5000f1b7460 (patch) | |
tree | ed9242e35ccf6c932f8353744b0818615148d243 /drivers/edac/altera_edac.c | |
parent | 240ea9214a6042f3807fd09f149d74ae5700e117 (diff) | |
download | linux-90e493d7d51c791a2adc2de962cbd5000f1b7460.tar.gz linux-90e493d7d51c791a2adc2de962cbd5000f1b7460.tar.bz2 linux-90e493d7d51c791a2adc2de962cbd5000f1b7460.zip |
EDAC, altera: Disable IRQs while injecting SDRAM errors
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>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/1476906827-9412-1-git-send-email-tthayer@opensource.altera.com
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/edac/altera_edac.c')
-rw-r--r-- | drivers/edac/altera_edac.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c index 58d3e2b39b5b..6421cc3c7dc1 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; |