blob: dab5744e9253da95b017a06c4ab4f82fc5e76979 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Jeff Dike65e62972006-06-04 02:51:43 -07002#ifndef __UM_IRQFLAGS_H
3#define __UM_IRQFLAGS_H
4
Johannes Bergfbb42e7f2021-03-05 13:19:54 +01005extern int signals_enabled;
6int set_signals(int enable);
7void block_signals(void);
8void unblock_signals(void);
Al Viroa34978c2011-08-18 20:14:00 +01009
Daniel Wagner3e938952016-06-12 22:04:53 +020010#define arch_local_save_flags arch_local_save_flags
Al Viroa34978c2011-08-18 20:14:00 +010011static inline unsigned long arch_local_save_flags(void)
12{
Johannes Bergfbb42e7f2021-03-05 13:19:54 +010013 return signals_enabled;
Al Viroa34978c2011-08-18 20:14:00 +010014}
15
Daniel Wagner3e938952016-06-12 22:04:53 +020016#define arch_local_irq_restore arch_local_irq_restore
Al Viroa34978c2011-08-18 20:14:00 +010017static inline void arch_local_irq_restore(unsigned long flags)
18{
19 set_signals(flags);
20}
21
Daniel Wagner3e938952016-06-12 22:04:53 +020022#define arch_local_irq_enable arch_local_irq_enable
Al Viroa34978c2011-08-18 20:14:00 +010023static inline void arch_local_irq_enable(void)
24{
25 unblock_signals();
26}
27
Daniel Wagner3e938952016-06-12 22:04:53 +020028#define arch_local_irq_disable arch_local_irq_disable
Al Viroa34978c2011-08-18 20:14:00 +010029static inline void arch_local_irq_disable(void)
30{
31 block_signals();
32}
33
Daniel Wagner3e938952016-06-12 22:04:53 +020034#define ARCH_IRQ_DISABLED 0
Al Viroa34978c2011-08-18 20:14:00 +010035
Daniel Wagner3e938952016-06-12 22:04:53 +020036#include <asm-generic/irqflags.h>
Jeff Dike65e62972006-06-04 02:51:43 -070037
38#endif