All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH] powerpc/86xx: Convert gef_pic_lock to raw_spinlock
Date: Thu, 18 Feb 2010 16:57:27 +0300	[thread overview]
Message-ID: <20100218135727.GA18924@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <20100218121904.620984825@linutronix.de>

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, gef_pic_lock has to be a real (non-sleepable) spinlock.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 arch/powerpc/platforms/86xx/gef_pic.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/powerpc/platforms/86xx/gef_pic.c b/arch/powerpc/platforms/86xx/gef_pic.c
index 0110a87..7ad9c0d 100644
--- a/arch/powerpc/platforms/86xx/gef_pic.c
+++ b/arch/powerpc/platforms/86xx/gef_pic.c
@@ -49,7 +49,7 @@
 #define gef_irq_to_hw(virq)    ((unsigned int)irq_map[virq].hwirq)
 
 
-static DEFINE_SPINLOCK(gef_pic_lock);
+static DEFINE_RAW_SPINLOCK(gef_pic_lock);
 
 static void __iomem *gef_pic_irq_reg_base;
 static struct irq_host *gef_pic_irq_host;
@@ -118,11 +118,11 @@ static void gef_pic_mask(unsigned int virq)
 
 	hwirq = gef_irq_to_hw(virq);
 
-	spin_lock_irqsave(&gef_pic_lock, flags);
+	raw_spin_lock_irqsave(&gef_pic_lock, flags);
 	mask = in_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0));
 	mask &= ~(1 << hwirq);
 	out_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0), mask);
-	spin_unlock_irqrestore(&gef_pic_lock, flags);
+	raw_spin_unlock_irqrestore(&gef_pic_lock, flags);
 }
 
 static void gef_pic_mask_ack(unsigned int virq)
@@ -141,11 +141,11 @@ static void gef_pic_unmask(unsigned int virq)
 
 	hwirq = gef_irq_to_hw(virq);
 
-	spin_lock_irqsave(&gef_pic_lock, flags);
+	raw_spin_lock_irqsave(&gef_pic_lock, flags);
 	mask = in_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0));
 	mask |= (1 << hwirq);
 	out_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0), mask);
-	spin_unlock_irqrestore(&gef_pic_lock, flags);
+	raw_spin_unlock_irqrestore(&gef_pic_lock, flags);
 }
 
 static struct irq_chip gef_pic_chip = {
@@ -199,7 +199,7 @@ void __init gef_pic_init(struct device_node *np)
 	/* Map the devices registers into memory */
 	gef_pic_irq_reg_base = of_iomap(np, 0);
 
-	spin_lock_irqsave(&gef_pic_lock, flags);
+	raw_spin_lock_irqsave(&gef_pic_lock, flags);
 
 	/* Initialise everything as masked. */
 	out_be32(gef_pic_irq_reg_base + GEF_PIC_CPU0_INTR_MASK, 0);
@@ -208,7 +208,7 @@ void __init gef_pic_init(struct device_node *np)
 	out_be32(gef_pic_irq_reg_base + GEF_PIC_CPU0_MCP_MASK, 0);
 	out_be32(gef_pic_irq_reg_base + GEF_PIC_CPU1_MCP_MASK, 0);
 
-	spin_unlock_irqrestore(&gef_pic_lock, flags);
+	raw_spin_unlock_irqrestore(&gef_pic_lock, flags);
 
 	/* Map controller */
 	gef_pic_cascade_irq = irq_of_parse_and_map(np, 0);
-- 
1.6.5.7

  parent reply	other threads:[~2010-02-18 13:57 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-18 12:22 [patch 00/15] powerpc: raw_spinlock conversions Thomas Gleixner
2010-02-18 12:22 ` [patch 01/15] powerpc: Convert big_irq_lock to raw_spinlock Thomas Gleixner
2010-02-18 12:22 ` [patch 02/15] powerpc: Convert pmc_owner_lock " Thomas Gleixner
2010-02-18 12:22 ` [patch 03/15] powerpc: Convert die.lock " Thomas Gleixner
2010-02-18 12:22 ` [patch 04/15] powerpc: Convert native_tlbie_lock " Thomas Gleixner
2010-02-18 12:22 ` [patch 05/15] powerpc: Convert context_lock " Thomas Gleixner
2010-02-18 12:22 ` [patch 06/15] powerpc: Convert tlbivax_lock " Thomas Gleixner
2010-02-18 21:52   ` Kumar Gala
2010-02-18 12:22 ` [patch 07/15] powerpc: Convert beat_htab_lock " Thomas Gleixner
2010-02-18 12:22 ` [patch 08/15] powerpc: Convert beatic_irq_mask_lock " Thomas Gleixner
2010-02-18 12:22 ` [patch 09/15] powerpc: Convert feature_lock " Thomas Gleixner
2010-02-18 12:22 ` [patch 10/15] powerpc: Convert nv_lock " Thomas Gleixner
2010-02-18 12:23 ` [patch 11/15] powerpc: Convert pmac_pic_lock " Thomas Gleixner
2010-02-18 12:23 ` [patch 12/15] powerpc: Convert confirm_error_lock " Thomas Gleixner
2010-02-18 12:23 ` [patch 13/15] powerpc: Convert i8259_lock " Thomas Gleixner
2010-02-18 12:23 ` [patch 14/15] powerpc: Convert ipic_lock " Thomas Gleixner
2010-02-18 12:23 ` [patch 15/15] powerpc: Convert mpic locks " Thomas Gleixner
2010-02-18 12:41 ` [patch 00/15] powerpc: raw_spinlock conversions Geert Uytterhoeven
2010-02-18 15:31   ` Thomas Gleixner
2010-02-18 13:43 ` [PATCH] powerpc/qe: Convert qe_ic_lock to raw_spinlock Anton Vorontsov
2010-02-18 16:32   ` Thomas Gleixner
2010-02-18 22:01   ` Kumar Gala
2010-02-18 13:45 ` [PATCH] powerpc/85xx: Convert socrates_fpga_pic_lock " Anton Vorontsov
2010-02-18 16:33   ` Thomas Gleixner
2010-02-18 22:01   ` Kumar Gala
2010-02-18 13:57 ` Anton Vorontsov [this message]
2010-02-18 16:35   ` [PATCH] powerpc/86xx: Convert gef_pic_lock " Thomas Gleixner
2010-02-18 22:01   ` Kumar Gala
2010-02-18 13:57 ` [PATCH] powerpc/82xx: Convert pci_pic_lock " Anton Vorontsov
2010-02-18 16:35   ` Thomas Gleixner
2010-02-18 22:01   ` Kumar Gala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100218135727.GA18924@oksana.dev.rtsoft.ru \
    --to=avorontsov@ru.mvista.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.