Commit 96031b31 authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Thomas Gleixner
Browse files

irqchip/exynos-combiner: Switch to raw_spinlock



The exynos-combiner driver uses a regular spinlock to protect access to
the combiner interrupt status register in combiner_handle_cascade_irq(),
which is invoked in hard interrupt context as a chained interrupt handler.

When PREEMPT_RT is enabled on ARM, regular spinlock is converted to a
sleeping lock (mutex-based), which must not be used in atomic context
such as hard interrupt handlers.

Switch the irq_controller_lock to raw_spinlock, which remains a true
non-sleeping spinlock even under PREEMPT_RT.

Fixes: a900e5d9 ("ARM: exynos: move exynos4210-combiner to drivers/irqchip")
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarThomas Gleixner <tglx@kernel.org>
parent 91840be8
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@

#define IRQ_IN_COMBINER		8

static DEFINE_SPINLOCK(irq_controller_lock);
static DEFINE_RAW_SPINLOCK(irq_controller_lock);

struct combiner_chip_data {
	unsigned int hwirq_offset;
@@ -72,9 +72,9 @@ static void combiner_handle_cascade_irq(struct irq_desc *desc)

	chained_irq_enter(chip, desc);

	spin_lock(&irq_controller_lock);
	raw_spin_lock(&irq_controller_lock);
	status = readl_relaxed(chip_data->base + COMBINER_INT_STATUS);
	spin_unlock(&irq_controller_lock);
	raw_spin_unlock(&irq_controller_lock);
	status &= chip_data->irq_mask;

	if (status == 0)