diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-26 10:17:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-26 10:17:32 -0400 |
commit | 3cfef9524677a4ecb392d6fbffe6ebce6302f1d4 (patch) | |
tree | 88647d9dc50d634dee9cfeb7f354d620977a2f33 /arch | |
parent | 982653009b883ef1529089e3e6f1ae2fee41cbe2 (diff) | |
parent | 68cc3990a545dc0da221b4844dd8b9c06623a6c5 (diff) |
Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits)
rtmutex: Add missing rcu_read_unlock() in debug_rt_mutex_print_deadlock()
lockdep: Comment all warnings
lib: atomic64: Change the type of local lock to raw_spinlock_t
locking, lib/atomic64: Annotate atomic64_lock::lock as raw
locking, x86, iommu: Annotate qi->q_lock as raw
locking, x86, iommu: Annotate irq_2_ir_lock as raw
locking, x86, iommu: Annotate iommu->register_lock as raw
locking, dma, ipu: Annotate bank_lock as raw
locking, ARM: Annotate low level hw locks as raw
locking, drivers/dca: Annotate dca_lock as raw
locking, powerpc: Annotate uic->lock as raw
locking, x86: mce: Annotate cmci_discover_lock as raw
locking, ACPI: Annotate c3_lock as raw
locking, oprofile: Annotate oprofilefs lock as raw
locking, video: Annotate vga console lock as raw
locking, latencytop: Annotate latency_lock as raw
locking, timer_stats: Annotate table_lock as raw
locking, rwsem: Annotate inner lock as raw
locking, semaphores: Annotate inner lock as raw
locking, sched: Annotate thread_group_cputimer as raw
...
Fix up conflicts in kernel/posix-cpu-timers.c manually: making
cputimer->cputime a raw lock conflicted with the ABBA fix in commit
bcd5cff7216f ("cputimer: Cure lock inversion").
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/common/gic.c | 26 | ||||
-rw-r--r-- | arch/arm/include/asm/dma.h | 6 | ||||
-rw-r--r-- | arch/arm/include/asm/mmu.h | 4 | ||||
-rw-r--r-- | arch/arm/kernel/dma.c | 2 | ||||
-rw-r--r-- | arch/arm/kernel/smp.c | 6 | ||||
-rw-r--r-- | arch/arm/kernel/traps.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-footbridge/include/mach/hardware.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-footbridge/netwinder-hw.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-footbridge/netwinder-leds.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-integrator/core.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-integrator/pci_v3.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-ixp4xx/common-pci.c | 22 | ||||
-rw-r--r-- | arch/arm/mach-shark/leds.c | 6 | ||||
-rw-r--r-- | arch/arm/mm/cache-l2x0.c | 46 | ||||
-rw-r--r-- | arch/arm/mm/context.c | 14 | ||||
-rw-r--r-- | arch/arm/mm/copypage-v4mc.c | 6 | ||||
-rw-r--r-- | arch/arm/mm/copypage-v6.c | 10 | ||||
-rw-r--r-- | arch/arm/mm/copypage-xscale.c | 6 | ||||
-rw-r--r-- | arch/powerpc/sysdev/uic.c | 24 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_intel.c | 10 | ||||
-rw-r--r-- | arch/x86/oprofile/nmi_int.c | 4 |
21 files changed, 129 insertions, 129 deletions
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index 666b278e56d7..bdbb3f74f0fe 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <asm/mach/irq.h> | 33 | #include <asm/mach/irq.h> |
34 | #include <asm/hardware/gic.h> | 34 | #include <asm/hardware/gic.h> |
35 | 35 | ||
36 | static DEFINE_SPINLOCK(irq_controller_lock); | 36 | static DEFINE_RAW_SPINLOCK(irq_controller_lock); |
37 | 37 | ||
38 | /* Address of GIC 0 CPU interface */ | 38 | /* Address of GIC 0 CPU interface */ |
39 | void __iomem *gic_cpu_base_addr __read_mostly; | 39 | void __iomem *gic_cpu_base_addr __read_mostly; |
@@ -82,30 +82,30 @@ static void gic_mask_irq(struct irq_data *d) | |||
82 | { | 82 | { |
83 | u32 mask = 1 << (d->irq % 32); | 83 | u32 mask = 1 << (d->irq % 32); |
84 | 84 | ||
85 | spin_lock(&irq_controller_lock); | 85 | raw_spin_lock(&irq_controller_lock); |
86 | writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4); | 86 | writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4); |
87 | if (gic_arch_extn.irq_mask) | 87 | if (gic_arch_extn.irq_mask) |
88 | gic_arch_extn.irq_mask(d); | 88 | gic_arch_extn.irq_mask(d); |
89 | spin_unlock(&irq_controller_lock); | 89 | raw_spin_unlock(&irq_controller_lock); |
90 | } | 90 | } |
91 | 91 | ||
92 | static void gic_unmask_irq(struct irq_data *d) | 92 | static void gic_unmask_irq(struct irq_data *d) |
93 | { | 93 | { |
94 | u32 mask = 1 << (d->irq % 32); | 94 | u32 mask = 1 << (d->irq % 32); |
95 | 95 | ||
96 | spin_lock(&irq_controller_lock); | 96 | raw_spin_lock(&irq_controller_lock); |
97 | if (gic_arch_extn.irq_unmask) | 97 | if (gic_arch_extn.irq_unmask) |
98 | gic_arch_extn.irq_unmask(d); | 98 | gic_arch_extn.irq_unmask(d); |
99 | writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_SET + (gic_irq(d) / 32) * 4); | 99 | writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_SET + (gic_irq(d) / 32) * 4); |
100 | spin_unlock(&irq_controller_lock); | 100 | raw_spin_unlock(&irq_controller_lock); |
101 | } | 101 | } |
102 | 102 | ||
103 | static void gic_eoi_irq(struct irq_data *d) | 103 | static void gic_eoi_irq(struct irq_data *d) |
104 | { | 104 | { |
105 | if (gic_arch_extn.irq_eoi) { | 105 | if (gic_arch_extn.irq_eoi) { |
106 | spin_lock(&irq_controller_lock); | 106 | raw_spin_lock(&irq_controller_lock); |
107 | gic_arch_extn.irq_eoi(d); | 107 | gic_arch_extn.irq_eoi(d); |
108 | spin_unlock(&irq_controller_lock); | 108 | raw_spin_unlock(&irq_controller_lock); |
109 | } | 109 | } |
110 | 110 | ||
111 | writel_relaxed(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI); | 111 | writel_relaxed(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI); |
@@ -129,7 +129,7 @@ static int gic_set_type(struct irq_data *d, unsigned int type) | |||
129 | if (type != IRQ_TYPE_LEVEL_HIGH && type != IRQ_TYPE_EDGE_RISING) | 129 | if (type != IRQ_TYPE_LEVEL_HIGH && type != IRQ_TYPE_EDGE_RISING) |
130 | return -EINVAL; | 130 | return -EINVAL; |
131 | 131 | ||
132 | spin_lock(&irq_controller_lock); | 132 | raw_spin_lock(&irq_controller_lock); |
133 | 133 | ||
134 | if (gic_arch_extn.irq_set_type) | 134 | if (gic_arch_extn.irq_set_type) |
135 | gic_arch_extn.irq_set_type(d, type); | 135 | gic_arch_extn.irq_set_type(d, type); |
@@ -154,7 +154,7 @@ static int gic_set_type(struct irq_data *d, unsigned int type) | |||
154 | if (enabled) | 154 | if (enabled) |
155 | writel_relaxed(enablemask, base + GIC_DIST_ENABLE_SET + enableoff); | 155 | writel_relaxed(enablemask, base + GIC_DIST_ENABLE_SET + enableoff); |
156 | 156 | ||
157 | spin_unlock(&irq_controller_lock); | 157 | raw_spin_unlock(&irq_controller_lock); |
158 | 158 | ||
159 | return 0; | 159 | return 0; |
160 | } | 160 | } |
@@ -182,10 +182,10 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val, | |||
182 | mask = 0xff << shift; | 182 | mask = 0xff << shift; |
183 | bit = 1 << (cpu_logical_map(cpu) + shift); | 183 | bit = 1 << (cpu_logical_map(cpu) + shift); |
184 | 184 | ||
185 | spin_lock(&irq_controller_lock); | 185 | raw_spin_lock(&irq_controller_lock); |
186 | val = readl_relaxed(reg) & ~mask; | 186 | val = readl_relaxed(reg) & ~mask; |
187 | writel_relaxed(val | bit, reg); | 187 | writel_relaxed(val | bit, reg); |
188 | spin_unlock(&irq_controller_lock); | 188 | raw_spin_unlock(&irq_controller_lock); |
189 | 189 | ||
190 | return IRQ_SET_MASK_OK; | 190 | return IRQ_SET_MASK_OK; |
191 | } | 191 | } |
@@ -215,9 +215,9 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) | |||
215 | 215 | ||
216 | chained_irq_enter(chip, desc); | 216 | chained_irq_enter(chip, desc); |
217 | 217 | ||
218 | spin_lock(&irq_controller_lock); | 218 | raw_spin_lock(&irq_controller_lock); |
219 | status = readl_relaxed(chip_data->cpu_base + GIC_CPU_INTACK); | 219 | status = readl_relaxed(chip_data->cpu_base + GIC_CPU_INTACK); |
220 | spin_unlock(&irq_controller_lock); | 220 | raw_spin_unlock(&irq_controller_lock); |
221 | 221 | ||
222 | gic_irq = (status & 0x3ff); | 222 | gic_irq = (status & 0x3ff); |
223 | if (gic_irq == 1023) | 223 | if (gic_irq == 1023) |
diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h index 628670e9d7c9..69a5b0b6455c 100644 --- a/arch/arm/include/asm/dma.h +++ b/arch/arm/include/asm/dma.h | |||
@@ -34,18 +34,18 @@ | |||
34 | #define DMA_MODE_CASCADE 0xc0 | 34 | #define DMA_MODE_CASCADE 0xc0 |
35 | #define DMA_AUTOINIT 0x10 | 35 | #define DMA_AUTOINIT 0x10 |
36 | 36 | ||
37 | extern spinlock_t dma_spin_lock; | 37 | extern raw_spinlock_t dma_spin_lock; |
38 | 38 | ||
39 | static inline unsigned long claim_dma_lock(void) | 39 | static inline unsigned long claim_dma_lock(void) |
40 | { | 40 | { |
41 | unsigned long flags; | 41 | unsigned long flags; |
42 | spin_lock_irqsave(&dma_spin_lock, flags); | 42 | raw_spin_lock_irqsave(&dma_spin_lock, flags); |
43 | return flags; | 43 | return flags; |
44 | } | 44 | } |
45 | 45 | ||
46 | static inline void release_dma_lock(unsigned long flags) | 46 | static inline void release_dma_lock(unsigned long flags) |
47 | { | 47 | { |
48 | spin_unlock_irqrestore(&dma_spin_lock, flags); | 48 | raw_spin_unlock_irqrestore(&dma_spin_lock, flags); |
49 | } | 49 | } |
50 | 50 | ||
51 | /* Clear the 'DMA Pointer Flip Flop'. | 51 | /* Clear the 'DMA Pointer Flip Flop'. |
diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h index b4ffe9d5b526..14965658a923 100644 --- a/arch/arm/include/asm/mmu.h +++ b/arch/arm/include/asm/mmu.h | |||
@@ -6,7 +6,7 @@ | |||
6 | typedef struct { | 6 | typedef struct { |
7 | #ifdef CONFIG_CPU_HAS_ASID | 7 | #ifdef CONFIG_CPU_HAS_ASID |
8 | unsigned int id; | 8 | unsigned int id; |
9 | spinlock_t id_lock; | 9 | raw_spinlock_t id_lock; |
10 | #endif | 10 | #endif |
11 | unsigned int kvm_seq; | 11 | unsigned int kvm_seq; |
12 | } mm_context_t; | 12 | } mm_context_t; |
@@ -16,7 +16,7 @@ typedef struct { | |||
16 | 16 | ||
17 | /* init_mm.context.id_lock should be initialized. */ | 17 | /* init_mm.context.id_lock should be initialized. */ |
18 | #define INIT_MM_CONTEXT(name) \ | 18 | #define INIT_MM_CONTEXT(name) \ |
19 | .context.id_lock = __SPIN_LOCK_UNLOCKED(name.context.id_lock), | 19 | .context.id_lock = __RAW_SPIN_LOCK_UNLOCKED(name.context.id_lock), |
20 | #else | 20 | #else |
21 | #define ASID(mm) (0) | 21 | #define ASID(mm) (0) |
22 | #endif | 22 | #endif |
diff --git a/arch/arm/kernel/dma.c b/arch/arm/kernel/dma.c index 2c4a185f92cd..7b829d9663b1 100644 --- a/arch/arm/kernel/dma.c +++ b/arch/arm/kernel/dma.c | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | #include <asm/mach/dma.h> | 24 | #include <asm/mach/dma.h> |
25 | 25 | ||
26 | DEFINE_SPINLOCK(dma_spin_lock); | 26 | DEFINE_RAW_SPINLOCK(dma_spin_lock); |
27 | EXPORT_SYMBOL(dma_spin_lock); | 27 | EXPORT_SYMBOL(dma_spin_lock); |
28 | 28 | ||
29 | static dma_t *dma_chan[MAX_DMA_CHANNELS]; | 29 | static dma_t *dma_chan[MAX_DMA_CHANNELS]; |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 854ce33715f4..94f34a6c8610 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -566,7 +566,7 @@ static void percpu_timer_stop(void) | |||
566 | } | 566 | } |
567 | #endif | 567 | #endif |
568 | 568 | ||
569 | static DEFINE_SPINLOCK(stop_lock); | 569 | static DEFINE_RAW_SPINLOCK(stop_lock); |
570 | 570 | ||
571 | /* | 571 | /* |
572 | * ipi_cpu_stop - handle IPI from smp_send_stop() | 572 | * ipi_cpu_stop - handle IPI from smp_send_stop() |
@@ -575,10 +575,10 @@ static void ipi_cpu_stop(unsigned int cpu) | |||
575 | { | 575 | { |
576 | if (system_state == SYSTEM_BOOTING || | 576 | if (system_state == SYSTEM_BOOTING || |
577 | system_state == SYSTEM_RUNNING) { | 577 | system_state == SYSTEM_RUNNING) { |
578 | spin_lock(&stop_lock); | 578 | raw_spin_lock(&stop_lock); |
579 | printk(KERN_CRIT "CPU%u: stopping\n", cpu); | 579 | printk(KERN_CRIT "CPU%u: stopping\n", cpu); |
580 | dump_stack(); | 580 | dump_stack(); |
581 | spin_unlock(&stop_lock); | 581 | raw_spin_unlock(&stop_lock); |
582 | } | 582 | } |
583 | 583 | ||
584 | set_cpu_online(cpu, false); | 584 | set_cpu_online(cpu, false); |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 7f5b99eb2c50..99a572702509 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -257,7 +257,7 @@ static int __die(const char *str, int err, struct thread_info *thread, struct pt | |||
257 | return ret; | 257 | return ret; |
258 | } | 258 | } |
259 | 259 | ||
260 | static DEFINE_SPINLOCK(die_lock); | 260 | static DEFINE_RAW_SPINLOCK(die_lock); |
261 | 261 | ||
262 | /* | 262 | /* |
263 | * This function is protected against re-entrancy. | 263 | * This function is protected against re-entrancy. |
@@ -269,7 +269,7 @@ void die(const char *str, struct pt_regs *regs, int err) | |||
269 | 269 | ||
270 | oops_enter(); | 270 | oops_enter(); |
271 | 271 | ||
272 | spin_lock_irq(&die_lock); | 272 | raw_spin_lock_irq(&die_lock); |
273 | console_verbose(); | 273 | console_verbose(); |
274 | bust_spinlocks(1); | 274 | bust_spinlocks(1); |
275 | if (!user_mode(regs)) | 275 | if (!user_mode(regs)) |
@@ -281,7 +281,7 @@ void die(const char *str, struct pt_regs *regs, int err) | |||
281 | 281 | ||
282 | bust_spinlocks(0); | 282 | bust_spinlocks(0); |
283 | add_taint(TAINT_DIE); | 283 | add_taint(TAINT_DIE); |
284 | spin_unlock_irq(&die_lock); | 284 | raw_spin_unlock_irq(&die_lock); |
285 | oops_exit(); | 285 | oops_exit(); |
286 | 286 | ||
287 | if (in_interrupt()) | 287 | if (in_interrupt()) |
@@ -324,24 +324,24 @@ int is_valid_bugaddr(unsigned long pc) | |||
324 | #endif | 324 | #endif |
325 | 325 | ||
326 | static LIST_HEAD(undef_hook); | 326 | static LIST_HEAD(undef_hook); |
327 | static DEFINE_SPINLOCK(undef_lock); | 327 | static DEFINE_RAW_SPINLOCK(undef_lock); |
328 | 328 | ||
329 | void register_undef_hook(struct undef_hook *hook) | 329 | void register_undef_hook(struct undef_hook *hook) |
330 | { | 330 | { |
331 | unsigned long flags; | 331 | unsigned long flags; |
332 | 332 | ||
333 | spin_lock_irqsave(&undef_lock, flags); | 333 | raw_spin_lock_irqsave(&undef_lock, flags); |
334 | list_add(&hook->node, &undef_hook); | 334 | list_add(&hook->node, &undef_hook); |
335 | spin_unlock_irqrestore(&undef_lock, flags); | 335 | raw_spin_unlock_irqrestore(&undef_lock, flags); |
336 | } | 336 | } |
337 | 337 | ||
338 | void unregister_undef_hook(struct undef_hook *hook) | 338 | void unregister_undef_hook(struct undef_hook *hook) |
339 | { | 339 | { |
340 | unsigned long flags; | 340 | unsigned long flags; |
341 | 341 | ||
342 | spin_lock_irqsave(&undef_lock, flags); | 342 | raw_spin_lock_irqsave(&undef_lock, flags); |
343 | list_del(&hook->node); | 343 | list_del(&hook->node); |
344 | spin_unlock_irqrestore(&undef_lock, flags); | 344 | raw_spin_unlock_irqrestore(&undef_lock, flags); |
345 | } | 345 | } |
346 | 346 | ||
347 | static int call_undef_hook(struct pt_regs *regs, unsigned int instr) | 347 | static int call_undef_hook(struct pt_regs *regs, unsigned int instr) |
@@ -350,12 +350,12 @@ static int call_undef_hook(struct pt_regs *regs, unsigned int instr) | |||
350 | unsigned long flags; | 350 | unsigned long flags; |
351 | int (*fn)(struct pt_regs *regs, unsigned int instr) = NULL; | 351 | int (*fn)(struct pt_regs *regs, unsigned int instr) = NULL; |
352 | 352 | ||
353 | spin_lock_irqsave(&undef_lock, flags); | 353 | raw_spin_lock_irqsave(&undef_lock, flags); |
354 | list_for_each_entry(hook, &undef_hook, node) | 354 | list_for_each_entry(hook, &undef_hook, node) |
355 | if ((instr & hook->instr_mask) == hook->instr_val && | 355 | if ((instr & hook->instr_mask) == hook->instr_val && |
356 | (regs->ARM_cpsr & hook->cpsr_mask) == hook->cpsr_val) | 356 | (regs->ARM_cpsr & hook->cpsr_mask) == hook->cpsr_val) |
357 | fn = hook->fn; | 357 | fn = hook->fn; |
358 | spin_unlock_irqrestore(&undef_lock, flags); | 358 | raw_spin_unlock_irqrestore(&undef_lock, flags); |
359 | 359 | ||
360 | return fn ? fn(regs, instr) : 1; | 360 | return fn ? fn(regs, instr) : 1; |
361 | } | 361 | } |
diff --git a/arch/arm/mach-footbridge/include/mach/hardware.h b/arch/arm/mach-footbridge/include/mach/hardware.h index 15d54981674c..e3d6ccac2162 100644 --- a/arch/arm/mach-footbridge/include/mach/hardware.h +++ b/arch/arm/mach-footbridge/include/mach/hardware.h | |||
@@ -93,7 +93,7 @@ | |||
93 | #define CPLD_FLASH_WR_ENABLE 1 | 93 | #define CPLD_FLASH_WR_ENABLE 1 |
94 | 94 | ||
95 | #ifndef __ASSEMBLY__ | 95 | #ifndef __ASSEMBLY__ |
96 | extern spinlock_t nw_gpio_lock; | 96 | extern raw_spinlock_t nw_gpio_lock; |
97 | extern void nw_gpio_modify_op(unsigned int mask, unsigned int set); | 97 | extern void nw_gpio_modify_op(unsigned int mask, unsigned int set); |
98 | extern void nw_gpio_modify_io(unsigned int mask, unsigned int in); | 98 | extern void nw_gpio_modify_io(unsigned int mask, unsigned int in); |
99 | extern unsigned int nw_gpio_read(void); | 99 | extern unsigned int nw_gpio_read(void); |
diff --git a/arch/arm/mach-footbridge/netwinder-hw.c b/arch/arm/mach-footbridge/netwinder-hw.c index 4cbc2e65ce3a..0f7aeff486c9 100644 --- a/arch/arm/mach-footbridge/netwinder-hw.c +++ b/arch/arm/mach-footbridge/netwinder-hw.c | |||
@@ -68,7 +68,7 @@ static inline void wb977_ww(int reg, int val) | |||
68 | /* | 68 | /* |
69 | * This is a lock for accessing ports GP1_IO_BASE and GP2_IO_BASE | 69 | * This is a lock for accessing ports GP1_IO_BASE and GP2_IO_BASE |
70 | */ | 70 | */ |
71 | DEFINE_SPINLOCK(nw_gpio_lock); | 71 | DEFINE_RAW_SPINLOCK(nw_gpio_lock); |
72 | EXPORT_SYMBOL(nw_gpio_lock); | 72 | EXPORT_SYMBOL(nw_gpio_lock); |
73 | 73 | ||
74 | static unsigned int current_gpio_op; | 74 | static unsigned int current_gpio_op; |
@@ -327,9 +327,9 @@ static inline void wb977_init_gpio(void) | |||
327 | /* | 327 | /* |
328 | * Set Group1/Group2 outputs | 328 | * Set Group1/Group2 outputs |
329 | */ | 329 | */ |
330 | spin_lock_irqsave(&nw_gpio_lock, flags); | 330 | raw_spin_lock_irqsave(&nw_gpio_lock, flags); |
331 | nw_gpio_modify_op(-1, GPIO_RED_LED | GPIO_FAN); | 331 | nw_gpio_modify_op(-1, GPIO_RED_LED | GPIO_FAN); |
332 | spin_unlock_irqrestore(&nw_gpio_lock, flags); | 332 | raw_spin_unlock_irqrestore(&nw_gpio_lock, flags); |
333 | } | 333 | } |
334 | 334 | ||
335 | /* | 335 | /* |
@@ -390,9 +390,9 @@ static void __init cpld_init(void) | |||
390 | { | 390 | { |
391 | unsigned long flags; | 391 | unsigned long flags; |
392 | 392 | ||
393 | spin_lock_irqsave(&nw_gpio_lock, flags); | 393 | raw_spin_lock_irqsave(&nw_gpio_lock, flags); |
394 | nw_cpld_modify(-1, CPLD_UNMUTE | CPLD_7111_DISABLE); | 394 | nw_cpld_modify(-1, CPLD_UNMUTE | CPLD_7111_DISABLE); |
395 | spin_unlock_irqrestore(&nw_gpio_lock, flags); | 395 | raw_spin_unlock_irqrestore(&nw_gpio_lock, flags); |
396 | } | 396 | } |
397 | 397 | ||
398 | static unsigned char rwa_unlock[] __initdata = | 398 | static unsigned char rwa_unlock[] __initdata = |
@@ -616,9 +616,9 @@ static int __init nw_hw_init(void) | |||
616 | cpld_init(); | 616 | cpld_init(); |
617 | rwa010_init(); | 617 | rwa010_init(); |
618 | 618 | ||
619 | spin_lock_irqsave(&nw_gpio_lock, flags); | 619 | raw_spin_lock_irqsave(&nw_gpio_lock, flags); |
620 | nw_gpio_modify_op(GPIO_RED_LED|GPIO_GREEN_LED, DEFAULT_LEDS); | 620 | nw_gpio_modify_op(GPIO_RED_LED|GPIO_GREEN_LED, DEFAULT_LEDS); |
621 | spin_unlock_irqrestore(&nw_gpio_lock, flags); | 621 | raw_spin_unlock_irqrestore(&nw_gpio_lock, flags); |
622 | } | 622 | } |
623 | return 0; | 623 | return 0; |
624 | } | 624 | } |
diff --git a/arch/arm/mach-footbridge/netwinder-leds.c b/arch/arm/mach-footbridge/netwinder-leds.c index 00269fe0be8a..e57102e871fc 100644 --- a/arch/arm/mach-footbridge/netwinder-leds.c +++ b/arch/arm/mach-footbridge/netwinder-leds.c | |||
@@ -31,13 +31,13 @@ | |||
31 | static char led_state; | 31 | static char led_state; |
32 | static char hw_led_state; | 32 | static char hw_led_state; |
33 | 33 | ||
34 | static DEFINE_SPINLOCK(leds_lock); | 34 | static DEFINE_RAW_SPINLOCK(leds_lock); |
35 | 35 | ||
36 | static void netwinder_leds_event(led_event_t evt) | 36 | static void netwinder_leds_event(led_event_t evt) |
37 | { | 37 | { |
38 | unsigned long flags; | 38 | unsigned long flags; |
39 | 39 | ||
40 | spin_lock_irqsave(&leds_lock, flags); | 40 | raw_spin_lock_irqsave(&leds_lock, flags); |
41 | 41 | ||
42 | switch (evt) { | 42 | switch (evt) { |
43 | case led_start: | 43 | case led_start: |
@@ -117,12 +117,12 @@ static void netwinder_leds_event(led_event_t evt) | |||
117 | break; | 117 | break; |
118 | } | 118 | } |
119 | 119 | ||
120 | spin_unlock_irqrestore(&leds_lock, flags); | 120 | raw_spin_unlock_irqrestore(&leds_lock, flags); |
121 | 121 | ||
122 | if (led_state & LED_STATE_ENABLED) { | 122 | if (led_state & LED_STATE_ENABLED) { |
123 | spin_lock_irqsave(&nw_gpio_lock, flags); | 123 | raw_spin_lock_irqsave(&nw_gpio_lock, flags); |
124 | nw_gpio_modify_op(GPIO_RED_LED | GPIO_GREEN_LED, hw_led_state); | 124 | nw_gpio_modify_op(GPIO_RED_LED | GPIO_GREEN_LED, hw_led_state); |
125 | spin_unlock_irqrestore(&nw_gpio_lock, flags); | 125 | raw_spin_unlock_irqrestore(&nw_gpio_lock, flags); |
126 | } | 126 | } |
127 | } | 127 | } |
128 | 128 | ||
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index 82ebc8d772d3..4b38e13667ac 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c | |||
@@ -209,7 +209,7 @@ static struct amba_pl010_data integrator_uart_data = { | |||
209 | 209 | ||
210 | #define CM_CTRL IO_ADDRESS(INTEGRATOR_HDR_CTRL) | 210 | #define CM_CTRL IO_ADDRESS(INTEGRATOR_HDR_CTRL) |
211 | 211 | ||
212 | static DEFINE_SPINLOCK(cm_lock); | 212 | static DEFINE_RAW_SPINLOCK(cm_lock); |
213 | 213 | ||
214 | /** | 214 | /** |
215 | * cm_control - update the CM_CTRL register. | 215 | * cm_control - update the CM_CTRL register. |
@@ -221,10 +221,10 @@ void cm_control(u32 mask, u32 set) | |||
221 | unsigned long flags; | 221 | unsigned long flags; |
222 | u32 val; | 222 | u32 val; |
223 | 223 | ||
224 | spin_lock_irqsave(&cm_lock, flags); | 224 | raw_spin_lock_irqsave(&cm_lock, flags); |
225 | val = readl(CM_CTRL) & ~mask; | 225 | val = readl(CM_CTRL) & ~mask; |
226 | writel(val | set, CM_CTRL); | 226 | writel(val | set, CM_CTRL); |
227 | spin_unlock_irqrestore(&cm_lock, flags); | 227 | raw_spin_unlock_irqrestore(&cm_lock, flags); |
228 | } | 228 | } |
229 | 229 | ||
230 | EXPORT_SYMBOL(cm_control); | 230 | EXPORT_SYMBOL(cm_control); |
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index 11b86e5b71c2..b4d8f8b8a085 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c | |||
@@ -163,7 +163,7 @@ | |||
163 | * 7:2 register number | 163 | * 7:2 register number |
164 | * | 164 | * |
165 | */ | 165 | */ |
166 | static DEFINE_SPINLOCK(v3_lock); | 166 | static DEFINE_RAW_SPINLOCK(v3_lock); |
167 | 167 | ||
168 | #define PCI_BUS_NONMEM_START 0x00000000 | 168 | #define PCI_BUS_NONMEM_START 0x00000000 |
169 | #define PCI_BUS_NONMEM_SIZE SZ_256M | 169 | #define PCI_BUS_NONMEM_SIZE SZ_256M |
@@ -284,7 +284,7 @@ static int v3_read_config(struct pci_bus *bus, unsigned int devfn, int where, | |||
284 | unsigned long flags; | 284 | unsigned long flags; |
285 | u32 v; | 285 | u32 v; |
286 | 286 | ||
287 | spin_lock_irqsave(&v3_lock, flags); | 287 | raw_spin_lock_irqsave(&v3_lock, flags); |
288 | addr = v3_open_config_window(bus, devfn, where); | 288 | addr = v3_open_config_window(bus, devfn, where); |
289 | 289 | ||
290 | switch (size) { | 290 | switch (size) { |
@@ -302,7 +302,7 @@ static int v3_read_config(struct pci_bus *bus, unsigned int devfn, int where, | |||
302 | } | 302 | } |
303 | 303 | ||
304 | v3_close_config_window(); | 304 | v3_close_config_window(); |
305 | spin_unlock_irqrestore(&v3_lock, flags); | 305 | raw_spin_unlock_irqrestore(&v3_lock, flags); |
306 | 306 | ||
307 | *val = v; | 307 | *val = v; |
308 | return PCIBIOS_SUCCESSFUL; | 308 | return PCIBIOS_SUCCESSFUL; |
@@ -314,7 +314,7 @@ static int v3_write_config(struct pci_bus *bus, unsigned int devfn, int where, | |||
314 | unsigned long addr; | 314 | unsigned long addr; |
315 | unsigned long flags; | 315 | unsigned long flags; |
316 | 316 | ||
317 | spin_lock_irqsave(&v3_lock, flags); | 317 | raw_spin_lock_irqsave(&v3_lock, flags); |
318 | addr = v3_open_config_window(bus, devfn, where); | 318 | addr = v3_open_config_window(bus, devfn, where); |
319 | 319 | ||
320 | switch (size) { | 320 | switch (size) { |
@@ -335,7 +335,7 @@ static int v3_write_config(struct pci_bus *bus, unsigned int devfn, int where, | |||
335 | } | 335 | } |
336 | 336 | ||
337 | v3_close_config_window(); | 337 | v3_close_config_window(); |
338 | spin_unlock_irqrestore(&v3_lock, flags); | 338 | raw_spin_unlock_irqrestore(&v3_lock, flags); |
339 | 339 | ||
340 | return PCIBIOS_SUCCESSFUL; | 340 | return PCIBIOS_SUCCESSFUL; |
341 | } | 341 | } |
@@ -513,7 +513,7 @@ void __init pci_v3_preinit(void) | |||
513 | hook_fault_code(8, v3_pci_fault, SIGBUS, 0, "external abort on non-linefetch"); | 513 | hook_fault_code(8, v3_pci_fault, SIGBUS, 0, "external abort on non-linefetch"); |
514 | hook_fault_code(10, v3_pci_fault, SIGBUS, 0, "external abort on non-linefetch"); | 514 | hook_fault_code(10, v3_pci_fault, SIGBUS, 0, "external abort on non-linefetch"); |
515 | 515 | ||
516 | spin_lock_irqsave(&v3_lock, flags); | 516 | raw_spin_lock_irqsave(&v3_lock, flags); |
517 | 517 | ||
518 | /* | 518 | /* |
519 | * Unlock V3 registers, but only if they were previously locked. | 519 | * Unlock V3 registers, but only if they were previously locked. |
@@ -586,7 +586,7 @@ void __init pci_v3_preinit(void) | |||
586 | printk(KERN_ERR "PCI: unable to grab PCI error " | 586 | printk(KERN_ERR "PCI: unable to grab PCI error " |
587 | "interrupt: %d\n", ret); | 587 | "interrupt: %d\n", ret); |
588 | 588 | ||
589 | spin_unlock_irqrestore(&v3_lock, flags); | 589 | raw_spin_unlock_irqrestore(&v3_lock, flags); |
590 | } | 590 | } |
591 | 591 | ||
592 | void __init pci_v3_postinit(void) | 592 | void __init pci_v3_postinit(void) |
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c index 85245e48099c..f72a3a893c47 100644 --- a/arch/arm/mach-ixp4xx/common-pci.c +++ b/arch/arm/mach-ixp4xx/common-pci.c | |||
@@ -54,7 +54,7 @@ unsigned long ixp4xx_pci_reg_base = 0; | |||
54 | * these transactions are atomic or we will end up | 54 | * these transactions are atomic or we will end up |
55 | * with corrupt data on the bus or in a driver. | 55 | * with corrupt data on the bus or in a driver. |
56 | */ | 56 | */ |
57 | static DEFINE_SPINLOCK(ixp4xx_pci_lock); | 57 | static DEFINE_RAW_SPINLOCK(ixp4xx_pci_lock); |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * Read from PCI config space | 60 | * Read from PCI config space |
@@ -62,10 +62,10 @@ static DEFINE_SPINLOCK(ixp4xx_pci_lock); | |||
62 | static void crp_read(u32 ad_cbe, u32 *data) | 62 | static void crp_read(u32 ad_cbe, u32 *data) |
63 | { | 63 | { |
64 | unsigned long flags; | 64 | unsigned long flags; |
65 | spin_lock_irqsave(&ixp4xx_pci_lock, flags); | 65 | raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags); |
66 | *PCI_CRP_AD_CBE = ad_cbe; | 66 | *PCI_CRP_AD_CBE = ad_cbe; |
67 | *data = *PCI_CRP_RDATA; | 67 | *data = *PCI_CRP_RDATA; |
68 | spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); | 68 | raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); |
69 | } | 69 | } |
70 | 70 | ||
71 | /* | 71 | /* |
@@ -74,10 +74,10 @@ static void crp_read(u32 ad_cbe, u32 *data) | |||
74 | static void crp_write(u32 ad_cbe, u32 data) | 74 | static void crp_write(u32 ad_cbe, u32 data) |
75 | { | 75 | { |
76 | unsigned long flags; | 76 | unsigned long flags; |
77 | spin_lock_irqsave(&ixp4xx_pci_lock, flags); | 77 | raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags); |
78 | *PCI_CRP_AD_CBE = CRP_AD_CBE_WRITE | ad_cbe; | 78 | *PCI_CRP_AD_CBE = CRP_AD_CBE_WRITE | ad_cbe; |
79 | *PCI_CRP_WDATA = data; | 79 | *PCI_CRP_WDATA = data; |
80 | spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); | 80 | raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); |
81 | } | 81 | } |
82 | 82 | ||
83 | static inline int check_master_abort(void) | 83 | static inline int check_master_abort(void) |
@@ -101,7 +101,7 @@ int ixp4xx_pci_read_errata(u32 addr, u32 cmd, u32* data) | |||
101 | int retval = 0; | 101 | int retval = 0; |
102 | int i; | 102 | int i; |
103 | 103 | ||
104 | spin_lock_irqsave(&ixp4xx_pci_lock, flags); | 104 | raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags); |
105 | 105 | ||
106 | *PCI_NP_AD = addr; | 106 | *PCI_NP_AD = addr; |
107 | 107 | ||
@@ -118,7 +118,7 @@ int ixp4xx_pci_read_errata(u32 addr, u32 cmd, u32* data) | |||
118 | if(check_master_abort()) | 118 | if(check_master_abort()) |
119 | retval = 1; | 119 | retval = 1; |
120 | 120 | ||
121 | spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); | 121 | raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); |
122 | return retval; | 122 | return retval; |
123 | } | 123 | } |
124 | 124 | ||
@@ -127,7 +127,7 @@ int ixp4xx_pci_read_no_errata(u32 addr, u32 cmd, u32* data) | |||
127 | unsigned long flags; | 127 | unsigned long flags; |
128 | int retval = 0; | 128 | int retval = 0; |
129 | 129 | ||
130 | spin_lock_irqsave(&ixp4xx_pci_lock, flags); | 130 | raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags); |
131 | 131 | ||
132 | *PCI_NP_AD = addr; | 132 | *PCI_NP_AD = addr; |
133 | 133 | ||
@@ -140,7 +140,7 @@ int ixp4xx_pci_read_no_errata(u32 addr, u32 cmd, u32* data) | |||
140 | if(check_master_abort()) | 140 | if(check_master_abort()) |
141 | retval = 1; | 141 | retval = 1; |
142 | 142 | ||
143 | spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); | 143 | raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); |
144 | return retval; | 144 | return retval; |
145 | } | 145 | } |
146 | 146 | ||
@@ -149,7 +149,7 @@ int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data) | |||
149 | unsigned long flags; | 149 | unsigned long flags; |
150 | int retval = 0; | 150 | int retval = 0; |
151 | 151 | ||
152 | spin_lock_irqsave(&ixp4xx_pci_lock, flags); | 152 | raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags); |
153 | 153 | ||
154 | *PCI_NP_AD = addr; | 154 | *PCI_NP_AD = addr; |
155 | 155 | ||
@@ -162,7 +162,7 @@ int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data) | |||
162 | if(check_master_abort()) | 162 | if(check_master_abort()) |
163 | retval = 1; | 163 | retval = 1; |
164 | 164 | ||
165 | spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); | 165 | raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); |
166 | return retval; | 166 | return retval; |
167 | } | 167 | } |
168 | 168 | ||
diff --git a/arch/arm/mach-shark/leds.c b/arch/arm/mach-shark/leds.c index c9e32de4adf9..ccd49189bbd0 100644 --- a/arch/arm/mach-shark/leds.c +++ b/arch/arm/mach-shark/leds.c | |||
@@ -36,7 +36,7 @@ static char led_state; | |||
36 | static short hw_led_state; | 36 | static short hw_led_state; |
37 | static short saved_state; | 37 | static short saved_state; |
38 | 38 | ||
39 | static DEFINE_SPINLOCK(leds_lock); | 39 | static DEFINE_RAW_SPINLOCK(leds_lock); |
40 | 40 | ||
41 | short sequoia_read(int addr) { | 41 | short sequoia_read(int addr) { |
42 | outw(addr,0x24); | 42 | outw(addr,0x24); |
@@ -52,7 +52,7 @@ static void sequoia_leds_event(led_event_t evt) | |||
52 | { | 52 | { |
53 | unsigned long flags; | 53 | unsigned long flags; |
54 | 54 | ||
55 | spin_lock_irqsave(&leds_lock, flags); | 55 | raw_spin_lock_irqsave(&leds_lock, flags); |
56 | 56 | ||
57 | hw_led_state = sequoia_read(0x09); | 57 | hw_led_state = sequoia_read(0x09); |
58 | 58 | ||
@@ -144,7 +144,7 @@ static void sequoia_leds_event(led_event_t evt) | |||
144 | if (led_state & LED_STATE_ENABLED) | 144 | if (led_state & LED_STATE_ENABLED) |
145 | sequoia_write(hw_led_state,0x09); | 145 | sequoia_write(hw_led_state,0x09); |
146 | 146 | ||
147 | spin_unlock_irqrestore(&leds_lock, flags); | 147 | raw_spin_unlock_irqrestore(&leds_lock, flags); |
148 | } | 148 | } |
149 | 149 | ||
150 | static int __init leds_init(void) | 150 | static int __init leds_init(void) |
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 3f9b9980478e..8ac9e9f84790 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #define CACHE_LINE_SIZE 32 | 29 | #define CACHE_LINE_SIZE 32 |
30 | 30 | ||
31 | static void __iomem *l2x0_base; | 31 | static void __iomem *l2x0_base; |
32 | static DEFINE_SPINLOCK(l2x0_lock); | 32 | static DEFINE_RAW_SPINLOCK(l2x0_lock); |
33 | static uint32_t l2x0_way_mask; /* Bitmask of active ways */ | 33 | static uint32_t l2x0_way_mask; /* Bitmask of active ways */ |
34 | static uint32_t l2x0_size; | 34 | static uint32_t l2x0_size; |
35 | 35 | ||
@@ -126,9 +126,9 @@ static void l2x0_cache_sync(void) | |||
126 | { | 126 | { |
127 | unsigned long flags; | 127 | unsigned long flags; |
128 | 128 | ||
129 | spin_lock_irqsave(&l2x0_lock, flags); | 129 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
130 | cache_sync(); | 130 | cache_sync(); |
131 | spin_unlock_irqrestore(&l2x0_lock, flags); | 131 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
132 | } | 132 | } |
133 | 133 | ||
134 | static void __l2x0_flush_all(void) | 134 | static void __l2x0_flush_all(void) |
@@ -145,9 +145,9 @@ static void l2x0_flush_all(void) | |||
145 | unsigned long flags; | 145 | unsigned long flags; |
146 | 146 | ||
147 | /* clean all ways */ | 147 | /* clean all ways */ |
148 | spin_lock_irqsave(&l2x0_lock, flags); | 148 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
149 | __l2x0_flush_all(); | 149 | __l2x0_flush_all(); |
150 | spin_unlock_irqrestore(&l2x0_lock, flags); | 150 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
151 | } | 151 | } |
152 | 152 | ||
153 | static void l2x0_clean_all(void) | 153 | static void l2x0_clean_all(void) |
@@ -155,11 +155,11 @@ static void l2x0_clean_all(void) | |||
155 | unsigned long flags; | 155 | unsigned long flags; |
156 | 156 | ||
157 | /* clean all ways */ | 157 | /* clean all ways */ |
158 | spin_lock_irqsave(&l2x0_lock, flags); | 158 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
159 | writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_CLEAN_WAY); | 159 | writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_CLEAN_WAY); |
160 | cache_wait_way(l2x0_base + L2X0_CLEAN_WAY, l2x0_way_mask); | 160 | cache_wait_way(l2x0_base + L2X0_CLEAN_WAY, l2x0_way_mask); |
161 | cache_sync(); | 161 | cache_sync(); |
162 | spin_unlock_irqrestore(&l2x0_lock, flags); | 162 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
163 | } | 163 | } |
164 | 164 | ||
165 | static void l2x0_inv_all(void) | 165 | static void l2x0_inv_all(void) |
@@ -167,13 +167,13 @@ static void l2x0_inv_all(void) | |||
167 | unsigned long flags; | 167 | unsigned long flags; |
168 | 168 | ||
169 | /* invalidate all ways */ | 169 | /* invalidate all ways */ |
170 | spin_lock_irqsave(&l2x0_lock, flags); | 170 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
171 | /* Invalidating when L2 is enabled is a nono */ | 171 | /* Invalidating when L2 is enabled is a nono */ |
172 | BUG_ON(readl(l2x0_base + L2X0_CTRL) & 1); | 172 | BUG_ON(readl(l2x0_base + L2X0_CTRL) & 1); |
173 | writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_INV_WAY); | 173 | writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_INV_WAY); |
174 | cache_wait_way(l2x0_base + L2X0_INV_WAY, l2x0_way_mask); | 174 | cache_wait_way(l2x0_base + L2X0_INV_WAY, l2x0_way_mask); |
175 | cache_sync(); | 175 | cache_sync(); |
176 | spin_unlock_irqrestore(&l2x0_lock, flags); | 176 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
177 | } | 177 | } |
178 | 178 | ||
179 | static void l2x0_inv_range(unsigned long start, unsigned long end) | 179 | static void l2x0_inv_range(unsigned long start, unsigned long end) |
@@ -181,7 +181,7 @@ static void l2x0_inv_range(unsigned long start, unsigned long end) | |||
181 | void __iomem *base = l2x0_base; | 181 | void __iomem *base = l2x0_base; |
182 | unsigned long flags; | 182 | unsigned long flags; |
183 | 183 | ||
184 | spin_lock_irqsave(&l2x0_lock, flags); | 184 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
185 | if (start & (CACHE_LINE_SIZE - 1)) { | 185 | if (start & (CACHE_LINE_SIZE - 1)) { |
186 | start &= ~(CACHE_LINE_SIZE - 1); | 186 | start &= ~(CACHE_LINE_SIZE - 1); |
187 | debug_writel(0x03); | 187 | debug_writel(0x03); |
@@ -206,13 +206,13 @@ static void l2x0_inv_range(unsigned long start, unsigned long end) | |||
206 | } | 206 | } |
207 | 207 | ||
208 | if (blk_end < end) { | 208 | if (blk_end < end) { |
209 | spin_unlock_irqrestore(&l2x0_lock, flags); | 209 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
210 | spin_lock_irqsave(&l2x0_lock, flags); | 210 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
211 | } | 211 | } |
212 | } | 212 | } |
213 | cache_wait(base + L2X0_INV_LINE_PA, 1); | 213 | cache_wait(base + L2X0_INV_LINE_PA, 1); |
214 | cache_sync(); | 214 | cache_sync(); |
215 | spin_unlock_irqrestore(&l2x0_lock, flags); | 215 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
216 | } | 216 | } |
217 | 217 | ||
218 | static void l2x0_clean_range(unsigned long start, unsigned long end) | 218 | static void l2x0_clean_range(unsigned long start, unsigned long end) |
@@ -225,7 +225,7 @@ static void l2x0_clean_range(unsigned long start, unsigned long end) | |||
225 | return; | 225 | return; |
226 | } | 226 | } |
227 | 227 | ||
228 | spin_lock_irqsave(&l2x0_lock, flags); | 228 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
229 | start &= ~(CACHE_LINE_SIZE - 1); | 229 | start &= ~(CACHE_LINE_SIZE - 1); |
230 | while (start < end) { | 230 | while (start < end) { |
231 | unsigned long blk_end = start + min(end - start, 4096UL); | 231 | unsigned long blk_end = start + min(end - start, 4096UL); |
@@ -236,13 +236,13 @@ static void l2x0_clean_range(unsigned long start, unsigned long end) | |||
236 | } | 236 | } |
237 | 237 | ||
238 | if (blk_end < end) { | 238 | if (blk_end < end) { |
239 | spin_unlock_irqrestore(&l2x0_lock, flags); | 239 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
240 | spin_lock_irqsave(&l2x0_lock, flags); | 240 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
241 | } | 241 | } |
242 | } | 242 | } |
243 | cache_wait(base + L2X0_CLEAN_LINE_PA, 1); | 243 | cache_wait(base + L2X0_CLEAN_LINE_PA, 1); |
244 | cache_sync(); | 244 | cache_sync(); |
245 | spin_unlock_irqrestore(&l2x0_lock, flags); | 245 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
246 | } | 246 | } |
247 | 247 | ||
248 | static void l2x0_flush_range(unsigned long start, unsigned long end) | 248 | static void l2x0_flush_range(unsigned long start, unsigned long end) |
@@ -255,7 +255,7 @@ static void l2x0_flush_range(unsigned long start, unsigned long end) | |||
255 | return; | 255 | return; |
256 | } | 256 | } |
257 | 257 | ||
258 | spin_lock_irqsave(&l2x0_lock, flags); | 258 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
259 | start &= ~(CACHE_LINE_SIZE - 1); | 259 | start &= ~(CACHE_LINE_SIZE - 1); |
260 | while (start < end) { | 260 | while (start < end) { |
261 | unsigned long blk_end = start + min(end - start, 4096UL); | 261 | unsigned long blk_end = start + min(end - start, 4096UL); |
@@ -268,24 +268,24 @@ static void l2x0_flush_range(unsigned long start, unsigned long end) | |||
268 | debug_writel(0x00); | 268 | debug_writel(0x00); |
269 | 269 | ||
270 | if (blk_end < end) { | 270 | if (blk_end < end) { |
271 | spin_unlock_irqrestore(&l2x0_lock, flags); | 271 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
272 | spin_lock_irqsave(&l2x0_lock, flags); | 272 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
273 | } | 273 | } |
274 | } | 274 | } |
275 | cache_wait(base + L2X0_CLEAN_INV_LINE_PA, 1); | 275 | cache_wait(base + L2X0_CLEAN_INV_LINE_PA, 1); |
276 | cache_sync(); | 276 | cache_sync(); |
277 | spin_unlock_irqrestore(&l2x0_lock, flags); | 277 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
278 | } | 278 | } |
279 | 279 | ||
280 | static void l2x0_disable(void) | 280 | static void l2x0_disable(void) |
281 | { | 281 | { |
282 | unsigned long flags; | 282 | unsigned long flags; |
283 | 283 | ||
284 | spin_lock_irqsave(&l2x0_lock, flags); | 284 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
285 | __l2x0_flush_all(); | 285 | __l2x0_flush_all(); |
286 | writel_relaxed(0, l2x0_base + L2X0_CTRL); | 286 | writel_relaxed(0, l2x0_base + L2X0_CTRL); |
287 | dsb(); | 287 | dsb(); |
288 | spin_unlock_irqrestore(&l2x0_lock, flags); | 288 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
289 | } | 289 | } |
290 | 290 | ||
291 | static void l2x0_unlock(__u32 cache_id) | 291 | static void l2x0_unlock(__u32 cache_id) |
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c index b0ee9ba3cfab..93aac068da94 100644 --- a/arch/arm/mm/context.c +++ b/arch/arm/mm/context.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <asm/mmu_context.h> | 16 | #include <asm/mmu_context.h> |
17 | #include <asm/tlbflush.h> | 17 | #include <asm/tlbflush.h> |
18 | 18 | ||
19 | static DEFINE_SPINLOCK(cpu_asid_lock); | 19 | static DEFINE_RAW_SPINLOCK(cpu_asid_lock); |
20 | unsigned int cpu_last_asid = ASID_FIRST_VERSION; | 20 | unsigned int cpu_last_asid = ASID_FIRST_VERSION; |
21 | #ifdef CONFIG_SMP | 21 | #ifdef CONFIG_SMP |
22 | DEFINE_PER_CPU(struct mm_struct *, current_mm); | 22 | DEFINE_PER_CPU(struct mm_struct *, current_mm); |
@@ -31,7 +31,7 @@ DEFINE_PER_CPU(struct mm_struct *, current_mm); | |||
31 | void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) | 31 | void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) |
32 | { | 32 | { |
33 | mm->context.id = 0; | 33 | mm->context.id = 0; |
34 | spin_lock_init(&mm->context.id_lock); | 34 | raw_spin_lock_init(&mm->context.id_lock); |
35 | } | 35 | } |
36 | 36 | ||
37 | static void flush_context(void) | 37 | static void flush_context(void) |
@@ -58,7 +58,7 @@ static void set_mm_context(struct mm_struct *mm, unsigned int asid) | |||
58 | * the broadcast. This function is also called via IPI so the | 58 | * the broadcast. This function is also called via IPI so the |
59 | * mm->context.id_lock has to be IRQ-safe. | 59 | * mm->context.id_lock has to be IRQ-safe. |
60 | */ | 60 | */ |
61 | spin_lock_irqsave(&mm->context.id_lock, flags); | 61 | raw_spin_lock_irqsave(&mm->context.id_lock, flags); |
62 | if (likely((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) { | 62 | if (likely((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) { |
63 | /* | 63 | /* |
64 | * Old version of ASID found. Set the new one and | 64 | * Old version of ASID found. Set the new one and |
@@ -67,7 +67,7 @@ static void set_mm_context(struct mm_struct *mm, unsigned int asid) | |||
67 | mm->context.id = asid; | 67 | mm->context.id = asid; |
68 | cpumask_clear(mm_cpumask(mm)); | 68 | cpumask_clear(mm_cpumask(mm)); |
69 | } | 69 | } |
70 | spin_unlock_irqrestore(&mm->context.id_lock, flags); | 70 | raw_spin_unlock_irqrestore(&mm->context.id_lock, flags); |
71 | 71 | ||
72 | /* | 72 | /* |
73 | * Set the mm_cpumask(mm) bit for the current CPU. | 73 | * Set the mm_cpumask(mm) bit for the current CPU. |
@@ -117,7 +117,7 @@ void __new_context(struct mm_struct *mm) | |||
117 | { | 117 | { |
118 | unsigned int asid; | 118 | unsigned int asid; |
119 | 119 | ||
120 | spin_lock(&cpu_asid_lock); | 120 | raw_spin_lock(&cpu_asid_lock); |
121 | #ifdef CONFIG_SMP | 121 | #ifdef CONFIG_SMP |
122 | /* | 122 | /* |
123 | * Check the ASID again, in case the change was broadcast from | 123 | * Check the ASID again, in case the change was broadcast from |
@@ -125,7 +125,7 @@ void __new_context(struct mm_struct *mm) | |||
125 | */ | 125 | */ |
126 | if (unlikely(((mm->context.id ^ cpu_last_asid) >> ASID_BITS) == 0)) { | 126 | if (unlikely(((mm->context.id ^ cpu_last_asid) >> ASID_BITS) == 0)) { |
127 | cpumask_set_cpu(smp_processor_id(), mm_cpumask(mm)); | 127 | cpumask_set_cpu(smp_processor_id(), mm_cpumask(mm)); |
128 | spin_unlock(&cpu_asid_lock); | 128 | raw_spin_unlock(&cpu_asid_lock); |
129 | return; | 129 | return; |
130 | } | 130 | } |
131 | #endif | 131 | #endif |
@@ -153,5 +153,5 @@ void __new_context(struct mm_struct *mm) | |||
153 | } | 153 | } |
154 | 154 | ||
155 | set_mm_context(mm, asid); | 155 | set_mm_context(mm, asid); |
156 | spin_unlock(&cpu_asid_lock); | 156 | raw_spin_unlock(&cpu_asid_lock); |
157 | } | 157 | } |
diff --git a/arch/arm/mm/copypage-v4mc.c b/arch/arm/mm/copypage-v4mc.c index b8061519ce77..7d0a8c230342 100644 --- a/arch/arm/mm/copypage-v4mc.c +++ b/arch/arm/mm/copypage-v4mc.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \ | 30 | #define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \ |
31 | L_PTE_MT_MINICACHE) | 31 | L_PTE_MT_MINICACHE) |
32 | 32 | ||
33 | static DEFINE_SPINLOCK(minicache_lock); | 33 | static DEFINE_RAW_SPINLOCK(minicache_lock); |
34 | 34 | ||
35 | /* | 35 | /* |
36 | * ARMv4 mini-dcache optimised copy_user_highpage | 36 | * ARMv4 mini-dcache optimised copy_user_highpage |
@@ -76,14 +76,14 @@ void v4_mc_copy_user_highpage(struct page *to, struct page *from, | |||
76 | if (!test_and_set_bit(PG_dcache_clean, &from->flags)) | 76 | if (!test_and_set_bit(PG_dcache_clean, &from->flags)) |
77 | __flush_dcache_page(page_mapping(from), from); | 77 | __flush_dcache_page(page_mapping(from), from); |
78 | 78 | ||
79 | spin_lock(&minicache_lock); | 79 | raw_spin_lock(&minicache_lock); |
80 | 80 | ||
81 | set_pte_ext(TOP_PTE(0xffff8000), pfn_pte(page_to_pfn(from), minicache_pgprot), 0); | 81 | set_pte_ext(TOP_PTE(0xffff8000), pfn_pte(page_to_pfn(from), minicache_pgprot), 0); |
82 | flush_tlb_kernel_page(0xffff8000); | 82 | flush_tlb_kernel_page(0xffff8000); |
83 | 83 | ||
84 | mc_copy_user_page((void *)0xffff8000, kto); | 84 | mc_copy_user_page((void *)0xffff8000, kto); |
85 | 85 | ||
86 | spin_unlock(&minicache_lock); | 86 | raw_spin_unlock(&minicache_lock); |
87 | 87 | ||
88 | kunmap_atomic(kto, KM_USER1); | 88 | kunmap_atomic(kto, KM_USER1); |
89 | } | 89 | } |
diff --git a/arch/arm/mm/copypage-v6.c b/arch/arm/mm/copypage-v6.c index 63cca0097130..3d9a1552cef6 100644 --- a/arch/arm/mm/copypage-v6.c +++ b/arch/arm/mm/copypage-v6.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #define from_address (0xffff8000) | 27 | #define from_address (0xffff8000) |
28 | #define to_address (0xffffc000) | 28 | #define to_address (0xffffc000) |
29 | 29 | ||
30 | static DEFINE_SPINLOCK(v6_lock); | 30 | static DEFINE_RAW_SPINLOCK(v6_lock); |
31 | 31 | ||
32 | /* | 32 | /* |
33 | * Copy the user page. No aliasing to deal with so we can just | 33 | * Copy the user page. No aliasing to deal with so we can just |
@@ -88,7 +88,7 @@ static void v6_copy_user_highpage_aliasing(struct page *to, | |||
88 | * Now copy the page using the same cache colour as the | 88 | * Now copy the page using the same cache colour as the |
89 | * pages ultimate destination. | 89 | * pages ultimate destination. |
90 | */ | 90 | */ |
91 | spin_lock(&v6_lock); | 91 | raw_spin_lock(&v6_lock); |
92 | 92 | ||
93 | set_pte_ext(TOP_PTE(from_address) + offset, pfn_pte(page_to_pfn(from), PAGE_KERNEL), 0); | 93 | set_pte_ext(TOP_PTE(from_address) + offset, pfn_pte(page_to_pfn(from), PAGE_KERNEL), 0); |
94 | set_pte_ext(TOP_PTE(to_address) + offset, pfn_pte(page_to_pfn(to), PAGE_KERNEL), 0); | 94 | set_pte_ext(TOP_PTE(to_address) + offset, pfn_pte(page_to_pfn(to), PAGE_KERNEL), 0); |
@@ -101,7 +101,7 @@ static void v6_copy_user_highpage_aliasing(struct page *to, | |||
101 | 101 | ||
102 | copy_page((void *)kto, (void *)kfrom); | 102 | copy_page((void *)kto, (void *)kfrom); |
103 | 103 | ||
104 | spin_unlock(&v6_lock); | 104 | raw_spin_unlock(&v6_lock); |
105 | } | 105 | } |
106 | 106 | ||
107 | /* | 107 | /* |
@@ -121,13 +121,13 @@ static void v6_clear_user_highpage_aliasing(struct page *page, unsigned long vad | |||
121 | * Now clear the page using the same cache colour as | 121 | * Now clear the page using the same cache colour as |
122 | * the pages ultimate destination. | 122 | * the pages ultimate destination. |
123 | */ | 123 | */ |
124 | spin_lock(&v6_lock); | 124 | raw_spin_lock(&v6_lock); |
125 | 125 | ||
126 | set_pte_ext(TOP_PTE(to_address) + offset, pfn_pte(page_to_pfn(page), PAGE_KERNEL), 0); | 126 | set_pte_ext(TOP_PTE(to_address) + offset, pfn_pte(page_to_pfn(page), PAGE_KERNEL), 0); |
127 | flush_tlb_kernel_page(to); | 127 | flush_tlb_kernel_page(to); |
128 | clear_page((void *)to); | 128 | clear_page((void *)to); |
129 | 129 | ||
130 | spin_unlock(&v6_lock); | 130 | raw_spin_unlock(&v6_lock); |
131 | } | 131 | } |
132 | 132 | ||
133 | struct cpu_user_fns v6_user_fns __initdata = { | 133 | struct cpu_user_fns v6_user_fns __initdata = { |
diff --git a/arch/arm/mm/copypage-xscale.c b/arch/arm/mm/copypage-xscale.c index 649bbcd325bf..610c24ced310 100644 --- a/arch/arm/mm/copypage-xscale.c +++ b/arch/arm/mm/copypage-xscale.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \ | 32 | #define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \ |
33 | L_PTE_MT_MINICACHE) | 33 | L_PTE_MT_MINICACHE) |
34 | 34 | ||
35 | static DEFINE_SPINLOCK(minicache_lock); | 35 | static DEFINE_RAW_SPINLOCK(minicache_lock); |
36 | 36 | ||
37 | /* | 37 | /* |
38 | * XScale mini-dcache optimised copy_user_highpage | 38 | * XScale mini-dcache optimised copy_user_highpage |
@@ -98,14 +98,14 @@ void xscale_mc_copy_user_highpage(struct page *to, struct page *from, | |||
98 | if (!test_and_set_bit(PG_dcache_clean, &from->flags)) | 98 | if (!test_and_set_bit(PG_dcache_clean, &from->flags)) |
99 | __flush_dcache_page(page_mapping(from), from); | 99 | __flush_dcache_page(page_mapping(from), from); |
100 | 100 | ||
101 | spin_lock(&minicache_lock); | 101 | raw_spin_lock(&minicache_lock); |
102 | 102 | ||
103 | set_pte_ext(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(page_to_pfn(from), minicache_pgprot), 0); | 103 | set_pte_ext(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(page_to_pfn(from), minicache_pgprot), 0); |
104 | flush_tlb_kernel_page(COPYPAGE_MINICACHE); | 104 | flush_tlb_kernel_page(COPYPAGE_MINICACHE); |
105 | 105 | ||
106 | mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto); | 106 | mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto); |
107 | 107 | ||
108 | spin_unlock(&minicache_lock); | 108 | raw_spin_unlock(&minicache_lock); |
109 | 109 | ||
110 | kunmap_atomic(kto, KM_USER1); | 110 | kunmap_atomic(kto, KM_USER1); |
111 | } | 111 | } |
diff --git a/arch/powerpc/sysdev/uic.c b/arch/powerpc/sysdev/uic.c index 984cd2029158..3330feca7502 100644 --- a/arch/powerpc/sysdev/uic.c +++ b/arch/powerpc/sysdev/uic.c | |||
@@ -47,7 +47,7 @@ struct uic { | |||
47 | int index; | 47 | int index; |
48 | int dcrbase; | 48 | int dcrbase; |
49 | 49 | ||
50 | spinlock_t lock; | 50 | raw_spinlock_t lock; |
51 | 51 | ||
52 | /* The remapper for this UIC */ | 52 | /* The remapper for this UIC */ |
53 | struct irq_host *irqhost; | 53 | struct irq_host *irqhost; |
@@ -61,14 +61,14 @@ static void uic_unmask_irq(struct irq_data *d) | |||
61 | u32 er, sr; | 61 | u32 er, sr; |
62 | 62 | ||
63 | sr = 1 << (31-src); | 63 | sr = 1 << (31-src); |
64 | spin_lock_irqsave(&uic->lock, flags); | 64 | raw_spin_lock_irqsave(&uic->lock, flags); |
65 | /* ack level-triggered interrupts here */ | 65 | /* ack level-triggered interrupts here */ |
66 | if (irqd_is_level_type(d)) | 66 | if (irqd_is_level_type(d)) |
67 | mtdcr(uic->dcrbase + UIC_SR, sr); | 67 | mtdcr(uic->dcrbase + UIC_SR, sr); |
68 | er = mfdcr(uic->dcrbase + UIC_ER); | 68 | er = mfdcr(uic->dcrbase + UIC_ER); |
69 | er |= sr; | 69 | er |= sr; |
70 | mtdcr(uic->dcrbase + UIC_ER, er); | 70 | mtdcr(uic->dcrbase + UIC_ER, er); |
71 | spin_unlock_irqrestore(&uic->lock, flags); | 71 | raw_spin_unlock_irqrestore(&uic->lock, flags); |
72 | } | 72 | } |
73 | 73 | ||
74 | static void uic_mask_irq(struct irq_data *d) | 74 | static void uic_mask_irq(struct irq_data *d) |
@@ -78,11 +78,11 @@ static void uic_mask_irq(struct irq_data *d) | |||
78 | unsigned long flags; | 78 | unsigned long flags; |
79 | u32 er; | 79 | u32 er; |
80 | 80 | ||
81 | spin_lock_irqsave(&uic->lock, flags); | 81 | raw_spin_lock_irqsave(&uic->lock, flags); |
82 | er = mfdcr(uic->dcrbase + UIC_ER); | 82 | er = mfdcr(uic->dcrbase + UIC_ER); |
83 | er &= ~(1 << (31 - src)); | 83 | er &= ~(1 << (31 - src)); |
84 | mtdcr(uic->dcrbase + UIC_ER, er); | 84 | mtdcr(uic->dcrbase + UIC_ER, er); |
85 | spin_unlock_irqrestore(&uic->lock, flags); | 85 | raw_spin_unlock_irqrestore(&uic->lock, flags); |
86 | } | 86 | } |
87 | 87 | ||
88 | static void uic_ack_irq(struct irq_data *d) | 88 | static void uic_ack_irq(struct irq_data *d) |
@@ -91,9 +91,9 @@ static void uic_ack_irq(struct irq_data *d) | |||
91 | unsigned int src = irqd_to_hwirq(d); | 91 | unsigned int src = irqd_to_hwirq(d); |
92 | unsigned long flags; | 92 | unsigned long flags; |
93 | 93 | ||
94 | spin_lock_irqsave(&uic->lock, flags); | 94 | raw_spin_lock_irqsave(&uic->lock, flags); |
95 | mtdcr(uic->dcrbase + UIC_SR, 1 << (31-src)); | 95 | mtdcr(uic->dcrbase + UIC_SR, 1 << (31-src)); |
96 | spin_unlock_irqrestore(&uic->lock, flags); | 96 | raw_spin_unlock_irqrestore(&uic->lock, flags); |
97 | } | 97 | } |
98 | 98 | ||
99 | static void uic_mask_ack_irq(struct irq_data *d) | 99 | static void uic_mask_ack_irq(struct irq_data *d) |
@@ -104,7 +104,7 @@ static void uic_mask_ack_irq(struct irq_data *d) | |||
104 | u32 er, sr; | 104 | u32 er, sr; |
105 | 105 | ||
106 | sr = 1 << (31-src); | 106 | sr = 1 << (31-src); |
107 | spin_lock_irqsave(&uic->lock, flags); | 107 | raw_spin_lock_irqsave(&uic->lock, flags); |
108 | er = mfdcr(uic->dcrbase + UIC_ER); | 108 | er = mfdcr(uic->dcrbase + UIC_ER); |
109 | er &= ~sr; | 109 | er &= ~sr; |
110 | mtdcr(uic->dcrbase + UIC_ER, er); | 110 | mtdcr(uic->dcrbase + UIC_ER, er); |
@@ -118,7 +118,7 @@ static void uic_mask_ack_irq(struct irq_data *d) | |||
118 | */ | 118 | */ |
119 | if (!irqd_is_level_type(d)) | 119 | if (!irqd_is_level_type(d)) |
120 | mtdcr(uic->dcrbase + UIC_SR, sr); | 120 | mtdcr(uic->dcrbase + UIC_SR, sr); |
121 | spin_unlock_irqrestore(&uic->lock, flags); | 121 | raw_spin_unlock_irqrestore(&uic->lock, flags); |
122 | } | 122 | } |
123 | 123 | ||
124 | static int uic_set_irq_type(struct irq_data *d, unsigned int flow_type) | 124 | static int uic_set_irq_type(struct irq_data *d, unsigned int flow_type) |
@@ -152,7 +152,7 @@ static int uic_set_irq_type(struct irq_data *d, unsigned int flow_type) | |||
152 | 152 | ||
153 | mask = ~(1 << (31 - src)); | 153 | mask = ~(1 << (31 - src)); |
154 | 154 | ||
155 | spin_lock_irqsave(&uic->lock, flags); | 155 | raw_spin_lock_irqsave(&uic->lock, flags); |
156 | tr = mfdcr(uic->dcrbase + UIC_TR); | 156 | tr = mfdcr(uic->dcrbase + UIC_TR); |
157 | pr = mfdcr(uic->dcrbase + UIC_PR); | 157 | pr = mfdcr(uic->dcrbase + UIC_PR); |
158 | tr = (tr & mask) | (trigger << (31-src)); | 158 | tr = (tr & mask) | (trigger << (31-src)); |
@@ -161,7 +161,7 @@ static int uic_set_irq_type(struct irq_data *d, unsigned int flow_type) | |||
161 | mtdcr(uic->dcrbase + UIC_PR, pr); | 161 | mtdcr(uic->dcrbase + UIC_PR, pr); |
162 | mtdcr(uic->dcrbase + UIC_TR, tr); | 162 | mtdcr(uic->dcrbase + UIC_TR, tr); |
163 | 163 | ||
164 | spin_unlock_irqrestore(&uic->lock, flags); | 164 | raw_spin_unlock_irqrestore(&uic->lock, flags); |
165 | 165 | ||
166 | return 0; | 166 | return 0; |
167 | } | 167 | } |
@@ -254,7 +254,7 @@ static struct uic * __init uic_init_one(struct device_node *node) | |||
254 | if (! uic) | 254 | if (! uic) |
255 | return NULL; /* FIXME: panic? */ | 255 | return NULL; /* FIXME: panic? */ |
256 | 256 | ||
257 | spin_lock_init(&uic->lock); | 257 | raw_spin_lock_init(&uic->lock); |
258 | indexp = of_get_property(node, "cell-index", &len); | 258 | indexp = of_get_property(node, "cell-index", &len); |
259 | if (!indexp || (len != sizeof(u32))) { | 259 | if (!indexp || (len != sizeof(u32))) { |
260 | printk(KERN_ERR "uic: Device node %s has missing or invalid " | 260 | printk(KERN_ERR "uic: Device node %s has missing or invalid " |
diff --git a/arch/x86/kernel/cpu/mcheck/mce_intel.c b/arch/x86/kernel/cpu/mcheck/mce_intel.c index 8694ef56459d..38e49bc95ffc 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_intel.c +++ b/arch/x86/kernel/cpu/mcheck/mce_intel.c | |||
@@ -28,7 +28,7 @@ static DEFINE_PER_CPU(mce_banks_t, mce_banks_owned); | |||
28 | * cmci_discover_lock protects against parallel discovery attempts | 28 | * cmci_discover_lock protects against parallel discovery attempts |
29 | * which could race against each other. | 29 | * which could race against each other. |
30 | */ | 30 | */ |
31 | static DEFINE_SPINLOCK(cmci_discover_lock); | 31 | static DEFINE_RAW_SPINLOCK(cmci_discover_lock); |
32 | 32 | ||
33 | #define CMCI_THRESHOLD 1 | 33 | #define CMCI_THRESHOLD 1 |
34 | 34 | ||
@@ -85,7 +85,7 @@ static void cmci_discover(int banks, int boot) | |||
85 | int hdr = 0; | 85 | int hdr = 0; |
86 | int i; | 86 | int i; |
87 | 87 | ||
88 | spin_lock_irqsave(&cmci_discover_lock, flags); | 88 | raw_spin_lock_irqsave(&cmci_discover_lock, flags); |
89 | for (i = 0; i < banks; i++) { | 89 | for (i = 0; i < banks; i++) { |
90 | u64 val; | 90 | u64 val; |
91 | 91 | ||
@@ -116,7 +116,7 @@ static void cmci_discover(int banks, int boot) | |||
116 | WARN_ON(!test_bit(i, __get_cpu_var(mce_poll_banks))); | 116 | WARN_ON(!test_bit(i, __get_cpu_var(mce_poll_banks))); |
117 | } | 117 | } |
118 | } | 118 | } |
119 | spin_unlock_irqrestore(&cmci_discover_lock, flags); | 119 | raw_spin_unlock_irqrestore(&cmci_discover_lock, flags); |
120 | if (hdr) | 120 | if (hdr) |
121 | printk(KERN_CONT "\n"); | 121 | printk(KERN_CONT "\n"); |
122 | } | 122 | } |
@@ -150,7 +150,7 @@ void cmci_clear(void) | |||
150 | 150 | ||
151 | if (!cmci_supported(&banks)) | 151 | if (!cmci_supported(&banks)) |
152 | return; | 152 | return; |
153 | spin_lock_irqsave(&cmci_discover_lock, flags); | 153 | raw_spin_lock_irqsave(&cmci_discover_lock, flags); |
154 | for (i = 0; i < banks; i++) { | 154 | for (i = 0; i < banks; i++) { |
155 | if (!test_bit(i, __get_cpu_var(mce_banks_owned))) | 155 | if (!test_bit(i, __get_cpu_var(mce_banks_owned))) |
156 | continue; | 156 | continue; |
@@ -160,7 +160,7 @@ void cmci_clear(void) | |||
160 | wrmsrl(MSR_IA32_MCx_CTL2(i), val); | 160 | wrmsrl(MSR_IA32_MCx_CTL2(i), val); |
161 | __clear_bit(i, __get_cpu_var(mce_banks_owned)); | 161 | __clear_bit(i, __get_cpu_var(mce_banks_owned)); |
162 | } | 162 | } |
163 | spin_unlock_irqrestore(&cmci_discover_lock, flags); | 163 | raw_spin_unlock_irqrestore(&cmci_discover_lock, flags); |
164 | } | 164 | } |
165 | 165 | ||
166 | /* | 166 | /* |
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index 68894fdc034b..96646b3aeca8 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c | |||
@@ -355,10 +355,10 @@ static void nmi_cpu_setup(void *dummy) | |||
355 | int cpu = smp_processor_id(); | 355 | int cpu = smp_processor_id(); |
356 | struct op_msrs *msrs = &per_cpu(cpu_msrs, cpu); | 356 | struct op_msrs *msrs = &per_cpu(cpu_msrs, cpu); |
357 | nmi_cpu_save_registers(msrs); | 357 | nmi_cpu_save_registers(msrs); |
358 | spin_lock(&oprofilefs_lock); | 358 | raw_spin_lock(&oprofilefs_lock); |
359 | model->setup_ctrs(model, msrs); | 359 | model->setup_ctrs(model, msrs); |
360 | nmi_cpu_setup_mux(cpu, msrs); | 360 | nmi_cpu_setup_mux(cpu, msrs); |
361 | spin_unlock(&oprofilefs_lock); | 361 | raw_spin_unlock(&oprofilefs_lock); |
362 | per_cpu(saved_lvtpc, cpu) = apic_read(APIC_LVTPC); | 362 | per_cpu(saved_lvtpc, cpu) = apic_read(APIC_LVTPC); |
363 | apic_write(APIC_LVTPC, APIC_DM_NMI); | 363 | apic_write(APIC_LVTPC, APIC_DM_NMI); |
364 | } | 364 | } |