mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
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: Helge Deller <deller@gmx.de>
This commit is contained in:
parent
2255234460
commit
40c9c62c85
1 changed files with 5 additions and 0 deletions
|
@ -31,6 +31,11 @@ static inline unsigned long arch_local_irq_save(void)
|
|||
|
||||
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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue