um: kill system-um.h
authorAl Viro <viro@ftp.linux.org.uk>
Thu, 18 Aug 2011 19:14:00 +0000 (20:14 +0100)
committerRichard Weinberger <richard@nod.at>
Wed, 2 Nov 2011 13:15:34 +0000 (14:15 +0100)
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>
arch/um/include/asm/irqflags.h
arch/um/include/asm/system-um.h [deleted file]
arch/x86/um/asm/system.h

index 659b9abdfdba6f0f968c5f81b6dc993223e1ecdb..c780d8a1677351ab99cd4bdf643e5d363ac4e9e5 100644 (file)
@@ -1,6 +1,42 @@
 #ifndef __UM_IRQFLAGS_H
 #define __UM_IRQFLAGS_H
 
-/* Empty for now */
+extern int get_signals(void);
+extern int set_signals(int enable);
+extern void block_signals(void);
+extern void unblock_signals(void);
+
+static inline unsigned long arch_local_save_flags(void)
+{
+       return get_signals();
+}
+
+static inline void arch_local_irq_restore(unsigned long flags)
+{
+       set_signals(flags);
+}
+
+static inline void arch_local_irq_enable(void)
+{
+       unblock_signals();
+}
+
+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;
+}
+
+static inline bool arch_irqs_disabled(void)
+{
+       return arch_local_save_flags() == 0;
+}
 
 #endif
diff --git a/arch/um/include/asm/system-um.h b/arch/um/include/asm/system-um.h
deleted file mode 100644 (file)
index 0eec245..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#ifndef __UM_SYSTEM_GENERIC_H
-#define __UM_SYSTEM_GENERIC_H
-
-extern int get_signals(void);
-extern int set_signals(int enable);
-extern void block_signals(void);
-extern void unblock_signals(void);
-
-static inline unsigned long arch_local_save_flags(void)
-{
-       return get_signals();
-}
-
-static inline void arch_local_irq_restore(unsigned long flags)
-{
-       set_signals(flags);
-}
-
-static inline void arch_local_irq_enable(void)
-{
-       unblock_signals();
-}
-
-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;
-}
-
-static inline bool arch_irqs_disabled(void)
-{
-       return arch_local_save_flags() == 0;
-}
-
-extern void *_switch_to(void *prev, void *next, void *last);
-#define switch_to(prev, next, last) prev = _switch_to(prev, next, last)
-
-#endif
index a89113bc74f2e3f7924c76cfbc3d0f9be7633434..a459fd9b7598e48c658fce8f32d84c276fdb838e 100644 (file)
@@ -6,7 +6,6 @@
 #include <asm/cpufeature.h>
 #include <asm/cmpxchg.h>
 #include <asm/nops.h>
-#include <asm/system-um.h>
 
 #include <linux/kernel.h>
 #include <linux/irqflags.h>
@@ -130,4 +129,7 @@ static inline void rdtsc_barrier(void)
        alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC);
 }
 
+extern void *_switch_to(void *prev, void *next, void *last);
+#define switch_to(prev, next, last) prev = _switch_to(prev, next, last)
+
 #endif