aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/traps.c')
-rw-r--r--arch/arm/kernel/traps.c20
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
260static DEFINE_SPINLOCK(die_lock); 260static 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
326static LIST_HEAD(undef_hook); 326static LIST_HEAD(undef_hook);
327static DEFINE_SPINLOCK(undef_lock); 327static DEFINE_RAW_SPINLOCK(undef_lock);
328 328
329void register_undef_hook(struct undef_hook *hook) 329void 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
338void unregister_undef_hook(struct undef_hook *hook) 338void 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
347static int call_undef_hook(struct pt_regs *regs, unsigned int instr) 347static 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}