diff options
Diffstat (limited to 'arch/m68k/include/asm/system_no.h')
-rw-r--r-- | arch/m68k/include/asm/system_no.h | 57 |
1 files changed, 1 insertions, 56 deletions
diff --git a/arch/m68k/include/asm/system_no.h b/arch/m68k/include/asm/system_no.h index 3c0718d74398..20126c09794e 100644 --- a/arch/m68k/include/asm/system_no.h +++ b/arch/m68k/include/asm/system_no.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _M68KNOMMU_SYSTEM_H | 2 | #define _M68KNOMMU_SYSTEM_H |
3 | 3 | ||
4 | #include <linux/linkage.h> | 4 | #include <linux/linkage.h> |
5 | #include <linux/irqflags.h> | ||
5 | #include <asm/segment.h> | 6 | #include <asm/segment.h> |
6 | #include <asm/entry.h> | 7 | #include <asm/entry.h> |
7 | 8 | ||
@@ -46,54 +47,6 @@ asmlinkage void resume(void); | |||
46 | (last) = _last; \ | 47 | (last) = _last; \ |
47 | } | 48 | } |
48 | 49 | ||
49 | #ifdef CONFIG_COLDFIRE | ||
50 | #define local_irq_enable() __asm__ __volatile__ ( \ | ||
51 | "move %/sr,%%d0\n\t" \ | ||
52 | "andi.l #0xf8ff,%%d0\n\t" \ | ||
53 | "move %%d0,%/sr\n" \ | ||
54 | : /* no outputs */ \ | ||
55 | : \ | ||
56 | : "cc", "%d0", "memory") | ||
57 | #define local_irq_disable() __asm__ __volatile__ ( \ | ||
58 | "move %/sr,%%d0\n\t" \ | ||
59 | "ori.l #0x0700,%%d0\n\t" \ | ||
60 | "move %%d0,%/sr\n" \ | ||
61 | : /* no outputs */ \ | ||
62 | : \ | ||
63 | : "cc", "%d0", "memory") | ||
64 | /* For spinlocks etc */ | ||
65 | #define local_irq_save(x) __asm__ __volatile__ ( \ | ||
66 | "movew %%sr,%0\n\t" \ | ||
67 | "movew #0x0700,%%d0\n\t" \ | ||
68 | "or.l %0,%%d0\n\t" \ | ||
69 | "movew %%d0,%/sr" \ | ||
70 | : "=d" (x) \ | ||
71 | : \ | ||
72 | : "cc", "%d0", "memory") | ||
73 | #else | ||
74 | |||
75 | /* portable version */ /* FIXME - see entry.h*/ | ||
76 | #define ALLOWINT 0xf8ff | ||
77 | |||
78 | #define local_irq_enable() asm volatile ("andiw %0,%%sr": : "i" (ALLOWINT) : "memory") | ||
79 | #define local_irq_disable() asm volatile ("oriw #0x0700,%%sr": : : "memory") | ||
80 | #endif | ||
81 | |||
82 | #define local_save_flags(x) asm volatile ("movew %%sr,%0":"=d" (x) : : "memory") | ||
83 | #define local_irq_restore(x) asm volatile ("movew %0,%%sr": :"d" (x) : "memory") | ||
84 | |||
85 | /* For spinlocks etc */ | ||
86 | #ifndef local_irq_save | ||
87 | #define local_irq_save(x) do { local_save_flags(x); local_irq_disable(); } while (0) | ||
88 | #endif | ||
89 | |||
90 | #define irqs_disabled() \ | ||
91 | ({ \ | ||
92 | unsigned long flags; \ | ||
93 | local_save_flags(flags); \ | ||
94 | ((flags & 0x0700) == 0x0700); \ | ||
95 | }) | ||
96 | |||
97 | #define iret() __asm__ __volatile__ ("rte": : :"memory", "sp", "cc") | 50 | #define iret() __asm__ __volatile__ ("rte": : :"memory", "sp", "cc") |
98 | 51 | ||
99 | /* | 52 | /* |
@@ -206,12 +159,4 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz | |||
206 | #define arch_align_stack(x) (x) | 159 | #define arch_align_stack(x) (x) |
207 | 160 | ||
208 | 161 | ||
209 | static inline int irqs_disabled_flags(unsigned long flags) | ||
210 | { | ||
211 | if (flags & 0x0700) | ||
212 | return 0; | ||
213 | else | ||
214 | return 1; | ||
215 | } | ||
216 | |||
217 | #endif /* _M68KNOMMU_SYSTEM_H */ | 162 | #endif /* _M68KNOMMU_SYSTEM_H */ |