Commit 5181e790 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Benjamin Herrenschmidt

powerpc: Convert beatic_irq_mask_lock to raw_spinlock

beatic_irq_mask_lock needs to be a real spinlock in RT. Convert it to
raw_spinlock.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 7d725bdc
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "beat_wrapper.h" #include "beat_wrapper.h"
#define MAX_IRQS NR_IRQS #define MAX_IRQS NR_IRQS
static DEFINE_SPINLOCK(beatic_irq_mask_lock); static DEFINE_RAW_SPINLOCK(beatic_irq_mask_lock);
static uint64_t beatic_irq_mask_enable[(MAX_IRQS+255)/64]; static uint64_t beatic_irq_mask_enable[(MAX_IRQS+255)/64];
static uint64_t beatic_irq_mask_ack[(MAX_IRQS+255)/64]; static uint64_t beatic_irq_mask_ack[(MAX_IRQS+255)/64];
...@@ -65,30 +65,30 @@ static void beatic_mask_irq(unsigned int irq_plug) ...@@ -65,30 +65,30 @@ static void beatic_mask_irq(unsigned int irq_plug)
{ {
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&beatic_irq_mask_lock, flags); raw_spin_lock_irqsave(&beatic_irq_mask_lock, flags);
beatic_irq_mask_enable[irq_plug/64] &= ~(1UL << (63 - (irq_plug%64))); beatic_irq_mask_enable[irq_plug/64] &= ~(1UL << (63 - (irq_plug%64)));
beatic_update_irq_mask(irq_plug); beatic_update_irq_mask(irq_plug);
spin_unlock_irqrestore(&beatic_irq_mask_lock, flags); raw_spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
} }
static void beatic_unmask_irq(unsigned int irq_plug) static void beatic_unmask_irq(unsigned int irq_plug)
{ {
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&beatic_irq_mask_lock, flags); raw_spin_lock_irqsave(&beatic_irq_mask_lock, flags);
beatic_irq_mask_enable[irq_plug/64] |= 1UL << (63 - (irq_plug%64)); beatic_irq_mask_enable[irq_plug/64] |= 1UL << (63 - (irq_plug%64));
beatic_update_irq_mask(irq_plug); beatic_update_irq_mask(irq_plug);
spin_unlock_irqrestore(&beatic_irq_mask_lock, flags); raw_spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
} }
static void beatic_ack_irq(unsigned int irq_plug) static void beatic_ack_irq(unsigned int irq_plug)
{ {
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&beatic_irq_mask_lock, flags); raw_spin_lock_irqsave(&beatic_irq_mask_lock, flags);
beatic_irq_mask_ack[irq_plug/64] &= ~(1UL << (63 - (irq_plug%64))); beatic_irq_mask_ack[irq_plug/64] &= ~(1UL << (63 - (irq_plug%64)));
beatic_update_irq_mask(irq_plug); beatic_update_irq_mask(irq_plug);
spin_unlock_irqrestore(&beatic_irq_mask_lock, flags); raw_spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
} }
static void beatic_end_irq(unsigned int irq_plug) static void beatic_end_irq(unsigned int irq_plug)
...@@ -103,10 +103,10 @@ static void beatic_end_irq(unsigned int irq_plug) ...@@ -103,10 +103,10 @@ static void beatic_end_irq(unsigned int irq_plug)
printk(KERN_ERR "IRQ over-downcounted, plug %d\n", irq_plug); printk(KERN_ERR "IRQ over-downcounted, plug %d\n", irq_plug);
} }
spin_lock_irqsave(&beatic_irq_mask_lock, flags); raw_spin_lock_irqsave(&beatic_irq_mask_lock, flags);
beatic_irq_mask_ack[irq_plug/64] |= 1UL << (63 - (irq_plug%64)); beatic_irq_mask_ack[irq_plug/64] |= 1UL << (63 - (irq_plug%64));
beatic_update_irq_mask(irq_plug); beatic_update_irq_mask(irq_plug);
spin_unlock_irqrestore(&beatic_irq_mask_lock, flags); raw_spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
} }
static struct irq_chip beatic_pic = { static struct irq_chip beatic_pic = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment