diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-11-17 10:46:45 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-12-14 17:55:33 -0500 |
commit | 239007b8440abff689632f50cdf0f2b9e895b534 (patch) | |
tree | 569cab843af4a999d6d868ec9a824530d2bfa733 /arch/powerpc | |
parent | 9f5a5621e78cf48d86682a71ceb3fcdbde38b222 (diff) |
genirq: Convert irq_desc.lock to raw_spinlock
Convert locks which cannot be sleeping locks in preempt-rt to
raw_spinlocks.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/irq.c | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/52xx/media5200.c | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/interrupt.c | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/irq.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/xics.c | 4 | ||||
-rw-r--r-- | arch/powerpc/sysdev/fsl_msi.c | 4 | ||||
-rw-r--r-- | arch/powerpc/sysdev/uic.c | 8 |
7 files changed, 22 insertions, 22 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index f6dca4f4b295..9040330b0530 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -210,7 +210,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
210 | if (!desc) | 210 | if (!desc) |
211 | return 0; | 211 | return 0; |
212 | 212 | ||
213 | spin_lock_irqsave(&desc->lock, flags); | 213 | raw_spin_lock_irqsave(&desc->lock, flags); |
214 | 214 | ||
215 | action = desc->action; | 215 | action = desc->action; |
216 | if (!action || !action->handler) | 216 | if (!action || !action->handler) |
@@ -237,7 +237,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
237 | seq_putc(p, '\n'); | 237 | seq_putc(p, '\n'); |
238 | 238 | ||
239 | skip: | 239 | skip: |
240 | spin_unlock_irqrestore(&desc->lock, flags); | 240 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
241 | 241 | ||
242 | return 0; | 242 | return 0; |
243 | } | 243 | } |
@@ -1112,7 +1112,7 @@ static int virq_debug_show(struct seq_file *m, void *private) | |||
1112 | if (!desc) | 1112 | if (!desc) |
1113 | continue; | 1113 | continue; |
1114 | 1114 | ||
1115 | spin_lock_irqsave(&desc->lock, flags); | 1115 | raw_spin_lock_irqsave(&desc->lock, flags); |
1116 | 1116 | ||
1117 | if (desc->action && desc->action->handler) { | 1117 | if (desc->action && desc->action->handler) { |
1118 | seq_printf(m, "%5d ", i); | 1118 | seq_printf(m, "%5d ", i); |
@@ -1131,7 +1131,7 @@ static int virq_debug_show(struct seq_file *m, void *private) | |||
1131 | seq_printf(m, "%s\n", p); | 1131 | seq_printf(m, "%s\n", p); |
1132 | } | 1132 | } |
1133 | 1133 | ||
1134 | spin_unlock_irqrestore(&desc->lock, flags); | 1134 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
1135 | } | 1135 | } |
1136 | 1136 | ||
1137 | return 0; | 1137 | return 0; |
diff --git a/arch/powerpc/platforms/52xx/media5200.c b/arch/powerpc/platforms/52xx/media5200.c index cc0c854291d7..0bac3a3dbecf 100644 --- a/arch/powerpc/platforms/52xx/media5200.c +++ b/arch/powerpc/platforms/52xx/media5200.c | |||
@@ -86,9 +86,9 @@ void media5200_irq_cascade(unsigned int virq, struct irq_desc *desc) | |||
86 | u32 status, enable; | 86 | u32 status, enable; |
87 | 87 | ||
88 | /* Mask off the cascaded IRQ */ | 88 | /* Mask off the cascaded IRQ */ |
89 | spin_lock(&desc->lock); | 89 | raw_spin_lock(&desc->lock); |
90 | desc->chip->mask(virq); | 90 | desc->chip->mask(virq); |
91 | spin_unlock(&desc->lock); | 91 | raw_spin_unlock(&desc->lock); |
92 | 92 | ||
93 | /* Ask the FPGA for IRQ status. If 'val' is 0, then no irqs | 93 | /* Ask the FPGA for IRQ status. If 'val' is 0, then no irqs |
94 | * are pending. 'ffs()' is 1 based */ | 94 | * are pending. 'ffs()' is 1 based */ |
@@ -104,11 +104,11 @@ void media5200_irq_cascade(unsigned int virq, struct irq_desc *desc) | |||
104 | } | 104 | } |
105 | 105 | ||
106 | /* Processing done; can reenable the cascade now */ | 106 | /* Processing done; can reenable the cascade now */ |
107 | spin_lock(&desc->lock); | 107 | raw_spin_lock(&desc->lock); |
108 | desc->chip->ack(virq); | 108 | desc->chip->ack(virq); |
109 | if (!(desc->status & IRQ_DISABLED)) | 109 | if (!(desc->status & IRQ_DISABLED)) |
110 | desc->chip->unmask(virq); | 110 | desc->chip->unmask(virq); |
111 | spin_unlock(&desc->lock); | 111 | raw_spin_unlock(&desc->lock); |
112 | } | 112 | } |
113 | 113 | ||
114 | static int media5200_irq_map(struct irq_host *h, unsigned int virq, | 114 | static int media5200_irq_map(struct irq_host *h, unsigned int virq, |
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c index 7267effc8078..6829cf7e2bda 100644 --- a/arch/powerpc/platforms/cell/interrupt.c +++ b/arch/powerpc/platforms/cell/interrupt.c | |||
@@ -237,7 +237,7 @@ extern int noirqdebug; | |||
237 | 237 | ||
238 | static void handle_iic_irq(unsigned int irq, struct irq_desc *desc) | 238 | static void handle_iic_irq(unsigned int irq, struct irq_desc *desc) |
239 | { | 239 | { |
240 | spin_lock(&desc->lock); | 240 | raw_spin_lock(&desc->lock); |
241 | 241 | ||
242 | desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); | 242 | desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); |
243 | 243 | ||
@@ -265,18 +265,18 @@ static void handle_iic_irq(unsigned int irq, struct irq_desc *desc) | |||
265 | goto out_eoi; | 265 | goto out_eoi; |
266 | 266 | ||
267 | desc->status &= ~IRQ_PENDING; | 267 | desc->status &= ~IRQ_PENDING; |
268 | spin_unlock(&desc->lock); | 268 | raw_spin_unlock(&desc->lock); |
269 | action_ret = handle_IRQ_event(irq, action); | 269 | action_ret = handle_IRQ_event(irq, action); |
270 | if (!noirqdebug) | 270 | if (!noirqdebug) |
271 | note_interrupt(irq, desc, action_ret); | 271 | note_interrupt(irq, desc, action_ret); |
272 | spin_lock(&desc->lock); | 272 | raw_spin_lock(&desc->lock); |
273 | 273 | ||
274 | } while ((desc->status & (IRQ_PENDING | IRQ_DISABLED)) == IRQ_PENDING); | 274 | } while ((desc->status & (IRQ_PENDING | IRQ_DISABLED)) == IRQ_PENDING); |
275 | 275 | ||
276 | desc->status &= ~IRQ_INPROGRESS; | 276 | desc->status &= ~IRQ_INPROGRESS; |
277 | out_eoi: | 277 | out_eoi: |
278 | desc->chip->eoi(irq); | 278 | desc->chip->eoi(irq); |
279 | spin_unlock(&desc->lock); | 279 | raw_spin_unlock(&desc->lock); |
280 | } | 280 | } |
281 | 281 | ||
282 | static int iic_host_map(struct irq_host *h, unsigned int virq, | 282 | static int iic_host_map(struct irq_host *h, unsigned int virq, |
diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platforms/iseries/irq.c index 07762259c60a..86c4b29eea89 100644 --- a/arch/powerpc/platforms/iseries/irq.c +++ b/arch/powerpc/platforms/iseries/irq.c | |||
@@ -217,9 +217,9 @@ void __init iSeries_activate_IRQs() | |||
217 | struct irq_desc *desc = irq_to_desc(irq); | 217 | struct irq_desc *desc = irq_to_desc(irq); |
218 | 218 | ||
219 | if (desc && desc->chip && desc->chip->startup) { | 219 | if (desc && desc->chip && desc->chip->startup) { |
220 | spin_lock_irqsave(&desc->lock, flags); | 220 | raw_spin_lock_irqsave(&desc->lock, flags); |
221 | desc->chip->startup(irq); | 221 | desc->chip->startup(irq); |
222 | spin_unlock_irqrestore(&desc->lock, flags); | 222 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
223 | } | 223 | } |
224 | } | 224 | } |
225 | } | 225 | } |
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index 7d01b58f3989..b9b9e11609ec 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c | |||
@@ -906,7 +906,7 @@ void xics_migrate_irqs_away(void) | |||
906 | || desc->chip->set_affinity == NULL) | 906 | || desc->chip->set_affinity == NULL) |
907 | continue; | 907 | continue; |
908 | 908 | ||
909 | spin_lock_irqsave(&desc->lock, flags); | 909 | raw_spin_lock_irqsave(&desc->lock, flags); |
910 | 910 | ||
911 | status = rtas_call(ibm_get_xive, 1, 3, xics_status, irq); | 911 | status = rtas_call(ibm_get_xive, 1, 3, xics_status, irq); |
912 | if (status) { | 912 | if (status) { |
@@ -930,7 +930,7 @@ void xics_migrate_irqs_away(void) | |||
930 | cpumask_setall(irq_to_desc(virq)->affinity); | 930 | cpumask_setall(irq_to_desc(virq)->affinity); |
931 | desc->chip->set_affinity(virq, cpu_all_mask); | 931 | desc->chip->set_affinity(virq, cpu_all_mask); |
932 | unlock: | 932 | unlock: |
933 | spin_unlock_irqrestore(&desc->lock, flags); | 933 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
934 | } | 934 | } |
935 | } | 935 | } |
936 | #endif | 936 | #endif |
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c index 62e50258cdef..c6e11b077108 100644 --- a/arch/powerpc/sysdev/fsl_msi.c +++ b/arch/powerpc/sysdev/fsl_msi.c | |||
@@ -173,7 +173,7 @@ static void fsl_msi_cascade(unsigned int irq, struct irq_desc *desc) | |||
173 | u32 intr_index; | 173 | u32 intr_index; |
174 | u32 have_shift = 0; | 174 | u32 have_shift = 0; |
175 | 175 | ||
176 | spin_lock(&desc->lock); | 176 | raw_spin_lock(&desc->lock); |
177 | if ((msi_data->feature & FSL_PIC_IP_MASK) == FSL_PIC_IP_IPIC) { | 177 | if ((msi_data->feature & FSL_PIC_IP_MASK) == FSL_PIC_IP_IPIC) { |
178 | if (desc->chip->mask_ack) | 178 | if (desc->chip->mask_ack) |
179 | desc->chip->mask_ack(irq); | 179 | desc->chip->mask_ack(irq); |
@@ -225,7 +225,7 @@ static void fsl_msi_cascade(unsigned int irq, struct irq_desc *desc) | |||
225 | break; | 225 | break; |
226 | } | 226 | } |
227 | unlock: | 227 | unlock: |
228 | spin_unlock(&desc->lock); | 228 | raw_spin_unlock(&desc->lock); |
229 | } | 229 | } |
230 | 230 | ||
231 | static int __devinit fsl_of_msi_probe(struct of_device *dev, | 231 | static int __devinit fsl_of_msi_probe(struct of_device *dev, |
diff --git a/arch/powerpc/sysdev/uic.c b/arch/powerpc/sysdev/uic.c index 7d10074b3304..6f220a913e42 100644 --- a/arch/powerpc/sysdev/uic.c +++ b/arch/powerpc/sysdev/uic.c | |||
@@ -225,12 +225,12 @@ void uic_irq_cascade(unsigned int virq, struct irq_desc *desc) | |||
225 | int src; | 225 | int src; |
226 | int subvirq; | 226 | int subvirq; |
227 | 227 | ||
228 | spin_lock(&desc->lock); | 228 | raw_spin_lock(&desc->lock); |
229 | if (desc->status & IRQ_LEVEL) | 229 | if (desc->status & IRQ_LEVEL) |
230 | desc->chip->mask(virq); | 230 | desc->chip->mask(virq); |
231 | else | 231 | else |
232 | desc->chip->mask_ack(virq); | 232 | desc->chip->mask_ack(virq); |
233 | spin_unlock(&desc->lock); | 233 | raw_spin_unlock(&desc->lock); |
234 | 234 | ||
235 | msr = mfdcr(uic->dcrbase + UIC_MSR); | 235 | msr = mfdcr(uic->dcrbase + UIC_MSR); |
236 | if (!msr) /* spurious interrupt */ | 236 | if (!msr) /* spurious interrupt */ |
@@ -242,12 +242,12 @@ void uic_irq_cascade(unsigned int virq, struct irq_desc *desc) | |||
242 | generic_handle_irq(subvirq); | 242 | generic_handle_irq(subvirq); |
243 | 243 | ||
244 | uic_irq_ret: | 244 | uic_irq_ret: |
245 | spin_lock(&desc->lock); | 245 | raw_spin_lock(&desc->lock); |
246 | if (desc->status & IRQ_LEVEL) | 246 | if (desc->status & IRQ_LEVEL) |
247 | desc->chip->ack(virq); | 247 | desc->chip->ack(virq); |
248 | if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask) | 248 | if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask) |
249 | desc->chip->unmask(virq); | 249 | desc->chip->unmask(virq); |
250 | spin_unlock(&desc->lock); | 250 | raw_spin_unlock(&desc->lock); |
251 | } | 251 | } |
252 | 252 | ||
253 | static struct uic * __init uic_init_one(struct device_node *node) | 253 | static struct uic * __init uic_init_one(struct device_node *node) |