xref: /linux/arch/um/include/asm/irqflags.h (revision bbe33504d4a7fdab9011211e55e262c869b3f6cc)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
28ede0bdbSAl Viro #ifndef __UM_IRQFLAGS_H
38ede0bdbSAl Viro #define __UM_IRQFLAGS_H
48ede0bdbSAl Viro 
5fbb42e7fSJohannes Berg extern int signals_enabled;
6*bbe33504SJohannes Berg int um_set_signals(int enable);
7fbb42e7fSJohannes Berg void block_signals(void);
8fbb42e7fSJohannes Berg void unblock_signals(void);
9a34978cbSAl Viro 
103e938957SDaniel Wagner #define arch_local_save_flags arch_local_save_flags
11a34978cbSAl Viro static inline unsigned long arch_local_save_flags(void)
12a34978cbSAl Viro {
13fbb42e7fSJohannes Berg 	return signals_enabled;
14a34978cbSAl Viro }
15a34978cbSAl Viro 
163e938957SDaniel Wagner #define arch_local_irq_restore arch_local_irq_restore
17a34978cbSAl Viro static inline void arch_local_irq_restore(unsigned long flags)
18a34978cbSAl Viro {
19*bbe33504SJohannes Berg 	um_set_signals(flags);
20a34978cbSAl Viro }
21a34978cbSAl Viro 
223e938957SDaniel Wagner #define arch_local_irq_enable arch_local_irq_enable
23a34978cbSAl Viro static inline void arch_local_irq_enable(void)
24a34978cbSAl Viro {
25a34978cbSAl Viro 	unblock_signals();
26a34978cbSAl Viro }
27a34978cbSAl Viro 
283e938957SDaniel Wagner #define arch_local_irq_disable arch_local_irq_disable
29a34978cbSAl Viro static inline void arch_local_irq_disable(void)
30a34978cbSAl Viro {
31a34978cbSAl Viro 	block_signals();
32a34978cbSAl Viro }
33a34978cbSAl Viro 
343e938957SDaniel Wagner #define ARCH_IRQ_DISABLED	0
35a34978cbSAl Viro 
363e938957SDaniel Wagner #include <asm-generic/irqflags.h>
378ede0bdbSAl Viro 
388ede0bdbSAl Viro #endif
39