diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-11-24 02:32:11 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-11-24 02:32:11 -0500 |
commit | 49fb2cd2571e0134e5a12c5abab227696e4940c7 (patch) | |
tree | 9a77364e988ef3f3af24feee3f5bb91bd0c34129 /arch/sh/include/asm/irqflags.h | |
parent | dfc349402de8e95f6a42e8341e9ea193b718eee3 (diff) | |
parent | 260af56271f79da0e37faa5a99b1786b221297e5 (diff) |
Merge branch 'master' into sh/st-integration
Diffstat (limited to 'arch/sh/include/asm/irqflags.h')
-rw-r--r-- | arch/sh/include/asm/irqflags.h | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/arch/sh/include/asm/irqflags.h b/arch/sh/include/asm/irqflags.h index 46e71da5be6b..a741153b41c2 100644 --- a/arch/sh/include/asm/irqflags.h +++ b/arch/sh/include/asm/irqflags.h | |||
@@ -1,34 +1,9 @@ | |||
1 | #ifndef __ASM_SH_IRQFLAGS_H | 1 | #ifndef __ASM_SH_IRQFLAGS_H |
2 | #define __ASM_SH_IRQFLAGS_H | 2 | #define __ASM_SH_IRQFLAGS_H |
3 | 3 | ||
4 | #ifdef CONFIG_SUPERH32 | 4 | #define RAW_IRQ_DISABLED 0xf0 |
5 | #include "irqflags_32.h" | 5 | #define RAW_IRQ_ENABLED 0x00 |
6 | #else | ||
7 | #include "irqflags_64.h" | ||
8 | #endif | ||
9 | 6 | ||
10 | #define raw_local_save_flags(flags) \ | 7 | #include <asm-generic/irqflags.h> |
11 | do { (flags) = __raw_local_save_flags(); } while (0) | ||
12 | |||
13 | static inline int raw_irqs_disabled_flags(unsigned long flags) | ||
14 | { | ||
15 | return (flags != 0); | ||
16 | } | ||
17 | |||
18 | static inline int raw_irqs_disabled(void) | ||
19 | { | ||
20 | unsigned long flags = __raw_local_save_flags(); | ||
21 | |||
22 | return raw_irqs_disabled_flags(flags); | ||
23 | } | ||
24 | |||
25 | #define raw_local_irq_save(flags) \ | ||
26 | do { (flags) = __raw_local_irq_save(); } while (0) | ||
27 | |||
28 | static inline void raw_local_irq_restore(unsigned long flags) | ||
29 | { | ||
30 | if ((flags & 0xf0) != 0xf0) | ||
31 | raw_local_irq_enable(); | ||
32 | } | ||
33 | 8 | ||
34 | #endif /* __ASM_SH_IRQFLAGS_H */ | 9 | #endif /* __ASM_SH_IRQFLAGS_H */ |