@@ -103,11 +103,9 @@ static void __plic_toggle(void __iomem *enable_base, int hwirq, int enable)
static void plic_toggle(struct plic_handler *handler, int hwirq, int enable)
{
- unsigned long flags;
-
- raw_spin_lock_irqsave(&handler->enable_lock, flags);
+ raw_spin_lock(&handler->enable_lock);
__plic_toggle(handler->enable_base, hwirq, enable);
- raw_spin_unlock_irqrestore(&handler->enable_lock, flags);
+ raw_spin_unlock(&handler->enable_lock);
}
static inline void plic_irq_toggle(const struct cpumask *mask,
@@ -244,7 +242,6 @@ static int plic_irq_set_type(struct irq_data *d, unsigned int type)
static int plic_irq_suspend(void)
{
unsigned int i, cpu;
- unsigned long flags;
u32 __iomem *reg;
struct plic_priv *priv;
@@ -262,12 +259,12 @@ static int plic_irq_suspend(void)
if (!handler->present)
continue;
- raw_spin_lock_irqsave(&handler->enable_lock, flags);
+ raw_spin_lock(&handler->enable_lock);
for (i = 0; i < DIV_ROUND_UP(priv->nr_irqs, 32); i++) {
reg = handler->enable_base + i * sizeof(u32);
handler->enable_save[i] = readl(reg);
}
- raw_spin_unlock_irqrestore(&handler->enable_lock, flags);
+ raw_spin_unlock(&handler->enable_lock);
}
return 0;
@@ -276,7 +273,6 @@ static int plic_irq_suspend(void)
static void plic_irq_resume(void)
{
unsigned int i, index, cpu;
- unsigned long flags;
u32 __iomem *reg;
struct plic_priv *priv;
@@ -294,12 +290,12 @@ static void plic_irq_resume(void)
if (!handler->present)
continue;
- raw_spin_lock_irqsave(&handler->enable_lock, flags);
+ raw_spin_lock(&handler->enable_lock);
for (i = 0; i < DIV_ROUND_UP(priv->nr_irqs, 32); i++) {
reg = handler->enable_base + i * sizeof(u32);
writel(handler->enable_save[i], reg);
}
- raw_spin_unlock_irqrestore(&handler->enable_lock, flags);
+ raw_spin_unlock(&handler->enable_lock);
}
}
This reverts commit abb7205794900503d6358ef1fb645373753a794d. This is a prerequisite to reverting the patch converting the PLIC into a platform driver. Unfortunately this breaks booting the Allwinner D1 SoC. Fixes: 8ec99b033147 ("irqchip/sifive-plic: Convert PLIC driver into a platform driver") Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> --- drivers/irqchip/irq-sifive-plic.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)