diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2016-06-12 22:04:53 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2016-08-04 00:18:04 +0200 |
commit | 3e93895735745916756122d58941be89a17c42b4 (patch) | |
tree | a8d67b2723be8b8e3c2289e0174fcaad04647131 /arch/um | |
parent | 57a05d83b16710aff30510c33768df7ab17e0b4a (diff) | |
download | op-kernel-dev-3e93895735745916756122d58941be89a17c42b4.zip op-kernel-dev-3e93895735745916756122d58941be89a17c42b4.tar.gz |
um: Use asm-generic/irqflags.h
Instead proving its own arch_local_irq_save() and arch_irqs_disabled()
version use the generic version from asm-generic/irqflags.h.
A nice side effect is that um gets a few additional arch_ functions
as well.
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
[rw: Massaged commit message]
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/include/asm/irqflags.h | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/arch/um/include/asm/irqflags.h b/arch/um/include/asm/irqflags.h index c780d8a..3bb221e 100644 --- a/arch/um/include/asm/irqflags.h +++ b/arch/um/include/asm/irqflags.h @@ -6,37 +6,33 @@ extern int set_signals(int enable); extern void block_signals(void); extern void unblock_signals(void); +#define arch_local_save_flags arch_local_save_flags static inline unsigned long arch_local_save_flags(void) { return get_signals(); } +#define arch_local_irq_restore arch_local_irq_restore static inline void arch_local_irq_restore(unsigned long flags) { set_signals(flags); } +#define arch_local_irq_enable arch_local_irq_enable static inline void arch_local_irq_enable(void) { unblock_signals(); } +#define arch_local_irq_disable arch_local_irq_disable static inline void arch_local_irq_disable(void) { block_signals(); } -static inline unsigned long arch_local_irq_save(void) -{ - unsigned long flags; - flags = arch_local_save_flags(); - arch_local_irq_disable(); - return flags; -} +#define ARCH_IRQ_DISABLED 0 +#define ARCh_IRQ_ENABLED (SIGIO|SIGVTALRM) -static inline bool arch_irqs_disabled(void) -{ - return arch_local_save_flags() == 0; -} +#include <asm-generic/irqflags.h> #endif |