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/arm/kernel/traps.c | |
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/arm/kernel/traps.c')
-rw-r--r-- | arch/arm/kernel/traps.c | 20 |
1 files changed, 10 insertions, 10 deletions
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 | } |