Skip to content

Commit

Permalink
powerpc/82xx: Convert pci_pic_lock to raw_spinlock
Browse files Browse the repository at this point in the history
Interrupt controllers' hooks are executed in the atomic context, so
they are not permitted to sleep (with RT kernels non-raw spinlocks are
sleepable). So, pci_pic_lock has to be a real (non-sleepable) spinlock.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
  • Loading branch information
Anton Vorontsov authored and Kumar Gala committed Mar 4, 2010
1 parent 7e026f7 commit 0e5d359
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include "pq2.h"

static DEFINE_SPINLOCK(pci_pic_lock);
static DEFINE_RAW_SPINLOCK(pci_pic_lock);

struct pq2ads_pci_pic {
struct device_node *node;
Expand All @@ -45,12 +45,12 @@ static void pq2ads_pci_mask_irq(unsigned int virq)

if (irq != -1) {
unsigned long flags;
spin_lock_irqsave(&pci_pic_lock, flags);
raw_spin_lock_irqsave(&pci_pic_lock, flags);

setbits32(&priv->regs->mask, 1 << irq);
mb();

spin_unlock_irqrestore(&pci_pic_lock, flags);
raw_spin_unlock_irqrestore(&pci_pic_lock, flags);
}
}

Expand All @@ -62,9 +62,9 @@ static void pq2ads_pci_unmask_irq(unsigned int virq)
if (irq != -1) {
unsigned long flags;

spin_lock_irqsave(&pci_pic_lock, flags);
raw_spin_lock_irqsave(&pci_pic_lock, flags);
clrbits32(&priv->regs->mask, 1 << irq);
spin_unlock_irqrestore(&pci_pic_lock, flags);
raw_spin_unlock_irqrestore(&pci_pic_lock, flags);
}
}

Expand Down

0 comments on commit 0e5d359

Please sign in to comment.