Commit 40c9c62c authored by Helge Deller's avatar Helge Deller

parisc: Check if IRQs are disabled when calling arch_local_irq_restore()

A trivial check to check if IRQs are on although they should be off.
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 22552344
...@@ -31,6 +31,11 @@ static inline unsigned long arch_local_irq_save(void) ...@@ -31,6 +31,11 @@ static inline unsigned long arch_local_irq_save(void)
static inline void arch_local_irq_restore(unsigned long flags) static inline void arch_local_irq_restore(unsigned long flags)
{ {
/* warn if IRQs are on although they should be off */
if (IS_ENABLED(CONFIG_LIGHTWEIGHT_SPINLOCK_CHECK))
if (arch_local_save_flags() & PSW_I)
asm volatile("break 6,6\n"); /* SPINLOCK_BREAK_INSN */
asm volatile("mtsm %0" : : "r" (flags) : "memory"); asm volatile("mtsm %0" : : "r" (flags) : "memory");
} }
......
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