aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/irqflags.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/include/asm/irqflags.h')
-rw-r--r--arch/s390/include/asm/irqflags.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/s390/include/asm/irqflags.h b/arch/s390/include/asm/irqflags.h
index 16aa0c779e07..595a275c36f8 100644
--- a/arch/s390/include/asm/irqflags.h
+++ b/arch/s390/include/asm/irqflags.h
@@ -8,6 +8,8 @@
8 8
9#include <linux/types.h> 9#include <linux/types.h>
10 10
11#define ARCH_IRQ_ENABLED (3UL << (BITS_PER_LONG - 8))
12
11/* store then OR system mask. */ 13/* store then OR system mask. */
12#define __arch_local_irq_stosm(__or) \ 14#define __arch_local_irq_stosm(__or) \
13({ \ 15({ \
@@ -54,14 +56,17 @@ static inline notrace void arch_local_irq_enable(void)
54 __arch_local_irq_stosm(0x03); 56 __arch_local_irq_stosm(0x03);
55} 57}
56 58
59/* This only restores external and I/O interrupt state */
57static inline notrace void arch_local_irq_restore(unsigned long flags) 60static inline notrace void arch_local_irq_restore(unsigned long flags)
58{ 61{
59 __arch_local_irq_ssm(flags); 62 /* only disabled->disabled and disabled->enabled is valid */
63 if (flags & ARCH_IRQ_ENABLED)
64 arch_local_irq_enable();
60} 65}
61 66
62static inline notrace bool arch_irqs_disabled_flags(unsigned long flags) 67static inline notrace bool arch_irqs_disabled_flags(unsigned long flags)
63{ 68{
64 return !(flags & (3UL << (BITS_PER_LONG - 8))); 69 return !(flags & ARCH_IRQ_ENABLED);
65} 70}
66 71
67static inline notrace bool arch_irqs_disabled(void) 72static inline notrace bool arch_irqs_disabled(void)