Commit 109d89ca authored by Russell King's avatar Russell King Committed by Russell King

[PATCH] ARM: Allow register_undef_hook to be called with IRQs off

Preserve the interrupt status across a call to register_undef_hook.
This allows it to be called while interrupts are disabled.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 54ea06f6
...@@ -248,16 +248,20 @@ static DEFINE_SPINLOCK(undef_lock); ...@@ -248,16 +248,20 @@ static DEFINE_SPINLOCK(undef_lock);
void register_undef_hook(struct undef_hook *hook) void register_undef_hook(struct undef_hook *hook)
{ {
spin_lock_irq(&undef_lock); unsigned long flags;
spin_lock_irqsave(&undef_lock, flags);
list_add(&hook->node, &undef_hook); list_add(&hook->node, &undef_hook);
spin_unlock_irq(&undef_lock); spin_unlock_irqrestore(&undef_lock, flags);
} }
void unregister_undef_hook(struct undef_hook *hook) void unregister_undef_hook(struct undef_hook *hook)
{ {
spin_lock_irq(&undef_lock); unsigned long flags;
spin_lock_irqsave(&undef_lock, flags);
list_del(&hook->node); list_del(&hook->node);
spin_unlock_irq(&undef_lock); spin_unlock_irqrestore(&undef_lock, flags);
} }
asmlinkage void do_undefinstr(struct pt_regs *regs) asmlinkage void do_undefinstr(struct pt_regs *regs)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment