aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2011-08-18 15:14:00 -0400
committerRichard Weinberger <richard@nod.at>2011-11-02 09:15:34 -0400
commita34978cbd977ab62c744f63daacd9dc1474482be (patch)
tree0d1ec8a6a1efb5fe18d3afbbe8ca187d2db30b6b /arch
parentb8c655d727ebfe78769b62a0349227d5a656e967 (diff)
um: kill system-um.h
most of it belonged in irqflags.h, actually Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch')
-rw-r--r--arch/um/include/asm/irqflags.h38
-rw-r--r--arch/um/include/asm/system-um.h45
-rw-r--r--arch/x86/um/asm/system.h4
3 files changed, 40 insertions, 47 deletions
diff --git a/arch/um/include/asm/irqflags.h b/arch/um/include/asm/irqflags.h
index 659b9abdfdb..c780d8a1677 100644
--- a/arch/um/include/asm/irqflags.h
+++ b/arch/um/include/asm/irqflags.h
@@ -1,6 +1,42 @@
1#ifndef __UM_IRQFLAGS_H 1#ifndef __UM_IRQFLAGS_H
2#define __UM_IRQFLAGS_H 2#define __UM_IRQFLAGS_H
3 3
4/* Empty for now */ 4extern int get_signals(void);
5extern int set_signals(int enable);
6extern void block_signals(void);
7extern void unblock_signals(void);
8
9static inline unsigned long arch_local_save_flags(void)
10{
11 return get_signals();
12}
13
14static inline void arch_local_irq_restore(unsigned long flags)
15{
16 set_signals(flags);
17}
18
19static inline void arch_local_irq_enable(void)
20{
21 unblock_signals();
22}
23
24static inline void arch_local_irq_disable(void)
25{
26 block_signals();
27}
28
29static inline unsigned long arch_local_irq_save(void)
30{
31 unsigned long flags;
32 flags = arch_local_save_flags();
33 arch_local_irq_disable();
34 return flags;
35}
36
37static inline bool arch_irqs_disabled(void)
38{
39 return arch_local_save_flags() == 0;
40}
5 41
6#endif 42#endif
diff --git a/arch/um/include/asm/system-um.h b/arch/um/include/asm/system-um.h
deleted file mode 100644
index 0eec2457928..00000000000
--- a/arch/um/include/asm/system-um.h
+++ /dev/null
@@ -1,45 +0,0 @@
1#ifndef __UM_SYSTEM_GENERIC_H
2#define __UM_SYSTEM_GENERIC_H
3
4extern int get_signals(void);
5extern int set_signals(int enable);
6extern void block_signals(void);
7extern void unblock_signals(void);
8
9static inline unsigned long arch_local_save_flags(void)
10{
11 return get_signals();
12}
13
14static inline void arch_local_irq_restore(unsigned long flags)
15{
16 set_signals(flags);
17}
18
19static inline void arch_local_irq_enable(void)
20{
21 unblock_signals();
22}
23
24static inline void arch_local_irq_disable(void)
25{
26 block_signals();
27}
28
29static inline unsigned long arch_local_irq_save(void)
30{
31 unsigned long flags;
32 flags = arch_local_save_flags();
33 arch_local_irq_disable();
34 return flags;
35}
36
37static inline bool arch_irqs_disabled(void)
38{
39 return arch_local_save_flags() == 0;
40}
41
42extern void *_switch_to(void *prev, void *next, void *last);
43#define switch_to(prev, next, last) prev = _switch_to(prev, next, last)
44
45#endif
diff --git a/arch/x86/um/asm/system.h b/arch/x86/um/asm/system.h
index a89113bc74f..a459fd9b759 100644
--- a/arch/x86/um/asm/system.h
+++ b/arch/x86/um/asm/system.h
@@ -6,7 +6,6 @@
6#include <asm/cpufeature.h> 6#include <asm/cpufeature.h>
7#include <asm/cmpxchg.h> 7#include <asm/cmpxchg.h>
8#include <asm/nops.h> 8#include <asm/nops.h>
9#include <asm/system-um.h>
10 9
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/irqflags.h> 11#include <linux/irqflags.h>
@@ -130,4 +129,7 @@ static inline void rdtsc_barrier(void)
130 alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC); 129 alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC);
131} 130}
132 131
132extern void *_switch_to(void *prev, void *next, void *last);
133#define switch_to(prev, next, last) prev = _switch_to(prev, next, last)
134
133#endif 135#endif