projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2255234
)
parisc: Check if IRQs are disabled when calling arch_local_irq_restore()
author
Helge Deller
<deller@gmx.de>
Fri, 26 May 2023 06:33:02 +0000
(08:33 +0200)
committer
Helge Deller
<deller@gmx.de>
Fri, 30 Jun 2023 15:14:13 +0000
(17:14 +0200)
A trivial check to check if IRQs are on although they should be off.
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/include/asm/irqflags.h
patch
|
blob
|
history
diff --git
a/arch/parisc/include/asm/irqflags.h
b/arch/parisc/include/asm/irqflags.h
index
38a19c0
..
00fd877
100644
(file)
--- a/
arch/parisc/include/asm/irqflags.h
+++ b/
arch/parisc/include/asm/irqflags.h
@@
-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");
}