diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/blackfin/include/asm/ipipe.h | 8 | ||||
-rw-r--r-- | arch/blackfin/include/asm/irqflags.h | 284 | ||||
-rw-r--r-- | arch/blackfin/include/asm/mmu_context.h | 8 | ||||
-rw-r--r-- | arch/blackfin/include/asm/system.h | 4 | ||||
-rw-r--r-- | arch/blackfin/kernel/bfin_gpio.c | 102 | ||||
-rw-r--r-- | arch/blackfin/kernel/cplb-mpu/cplbmgr.c | 8 | ||||
-rw-r--r-- | arch/blackfin/kernel/ipipe.c | 38 | ||||
-rw-r--r-- | arch/blackfin/kernel/process.c | 4 | ||||
-rw-r--r-- | arch/blackfin/mach-bf518/include/mach/pll.h | 8 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/include/mach/pll.h | 8 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/include/mach/fio_flag.h | 8 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/include/mach/pll.h | 8 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/include/mach/pll.h | 8 | ||||
-rw-r--r-- | arch/blackfin/mach-bf538/include/mach/pll.h | 8 | ||||
-rw-r--r-- | arch/blackfin/mach-bf548/include/mach/pll.h | 8 | ||||
-rw-r--r-- | arch/blackfin/mach-bf561/include/mach/pll.h | 8 | ||||
-rw-r--r-- | arch/blackfin/mach-common/cpufreq.c | 4 | ||||
-rw-r--r-- | arch/blackfin/mach-common/ints-priority.c | 24 | ||||
-rw-r--r-- | arch/blackfin/mach-common/pm.c | 10 |
19 files changed, 284 insertions, 274 deletions
diff --git a/arch/blackfin/include/asm/ipipe.h b/arch/blackfin/include/asm/ipipe.h index d3b40449ca0e..40f94a704c02 100644 --- a/arch/blackfin/include/asm/ipipe.h +++ b/arch/blackfin/include/asm/ipipe.h | |||
@@ -49,7 +49,7 @@ | |||
49 | #define prepare_arch_switch(next) \ | 49 | #define prepare_arch_switch(next) \ |
50 | do { \ | 50 | do { \ |
51 | ipipe_schedule_notify(current, next); \ | 51 | ipipe_schedule_notify(current, next); \ |
52 | local_irq_disable_hw(); \ | 52 | hard_local_irq_disable(); \ |
53 | } while (0) | 53 | } while (0) |
54 | 54 | ||
55 | #define task_hijacked(p) \ | 55 | #define task_hijacked(p) \ |
@@ -57,7 +57,7 @@ do { \ | |||
57 | int __x__ = __ipipe_root_domain_p; \ | 57 | int __x__ = __ipipe_root_domain_p; \ |
58 | __clear_bit(IPIPE_SYNC_FLAG, &ipipe_root_cpudom_var(status)); \ | 58 | __clear_bit(IPIPE_SYNC_FLAG, &ipipe_root_cpudom_var(status)); \ |
59 | if (__x__) \ | 59 | if (__x__) \ |
60 | local_irq_enable_hw(); \ | 60 | hard_local_irq_enable(); \ |
61 | !__x__; \ | 61 | !__x__; \ |
62 | }) | 62 | }) |
63 | 63 | ||
@@ -167,7 +167,7 @@ static inline unsigned long __ipipe_ffnz(unsigned long ul) | |||
167 | #define __ipipe_run_isr(ipd, irq) \ | 167 | #define __ipipe_run_isr(ipd, irq) \ |
168 | do { \ | 168 | do { \ |
169 | if (!__ipipe_pipeline_head_p(ipd)) \ | 169 | if (!__ipipe_pipeline_head_p(ipd)) \ |
170 | local_irq_enable_hw(); \ | 170 | hard_local_irq_enable(); \ |
171 | if (ipd == ipipe_root_domain) { \ | 171 | if (ipd == ipipe_root_domain) { \ |
172 | if (unlikely(ipipe_virtual_irq_p(irq))) { \ | 172 | if (unlikely(ipipe_virtual_irq_p(irq))) { \ |
173 | irq_enter(); \ | 173 | irq_enter(); \ |
@@ -183,7 +183,7 @@ static inline unsigned long __ipipe_ffnz(unsigned long ul) | |||
183 | __ipipe_run_irqtail(); \ | 183 | __ipipe_run_irqtail(); \ |
184 | __set_bit(IPIPE_SYNC_FLAG, &ipipe_cpudom_var(ipd, status)); \ | 184 | __set_bit(IPIPE_SYNC_FLAG, &ipipe_cpudom_var(ipd, status)); \ |
185 | } \ | 185 | } \ |
186 | local_irq_disable_hw(); \ | 186 | hard_local_irq_disable(); \ |
187 | } while (0) | 187 | } while (0) |
188 | 188 | ||
189 | #define __ipipe_syscall_watched_p(p, sc) \ | 189 | #define __ipipe_syscall_watched_p(p, sc) \ |
diff --git a/arch/blackfin/include/asm/irqflags.h b/arch/blackfin/include/asm/irqflags.h index f3ed93144e23..994d76791016 100644 --- a/arch/blackfin/include/asm/irqflags.h +++ b/arch/blackfin/include/asm/irqflags.h | |||
@@ -33,191 +33,201 @@ static inline unsigned long bfin_cli(void) | |||
33 | return flags; | 33 | return flags; |
34 | } | 34 | } |
35 | 35 | ||
36 | #ifdef CONFIG_IPIPE | ||
37 | |||
38 | #include <linux/compiler.h> | ||
39 | #include <linux/ipipe_base.h> | ||
40 | #include <linux/ipipe_trace.h> | ||
41 | |||
42 | #ifdef CONFIG_DEBUG_HWERR | 36 | #ifdef CONFIG_DEBUG_HWERR |
43 | # define bfin_no_irqs 0x3f | 37 | # define bfin_no_irqs 0x3f |
44 | #else | 38 | #else |
45 | # define bfin_no_irqs 0x1f | 39 | # define bfin_no_irqs 0x1f |
46 | #endif | 40 | #endif |
47 | 41 | ||
48 | #define raw_local_irq_disable() \ | 42 | /*****************************************************************************/ |
49 | do { \ | 43 | /* |
50 | ipipe_check_context(ipipe_root_domain); \ | 44 | * Hard, untraced CPU interrupt flag manipulation and access. |
51 | __ipipe_stall_root(); \ | 45 | */ |
52 | barrier(); \ | 46 | static inline void __hard_local_irq_disable(void) |
53 | } while (0) | 47 | { |
54 | 48 | bfin_cli(); | |
55 | #define raw_local_irq_enable() \ | 49 | } |
56 | do { \ | ||
57 | barrier(); \ | ||
58 | ipipe_check_context(ipipe_root_domain); \ | ||
59 | __ipipe_unstall_root(); \ | ||
60 | } while (0) | ||
61 | |||
62 | #define raw_local_save_flags_ptr(x) \ | ||
63 | do { \ | ||
64 | *(x) = __ipipe_test_root() ? bfin_no_irqs : bfin_irq_flags; \ | ||
65 | } while (0) | ||
66 | |||
67 | #define raw_local_save_flags(x) raw_local_save_flags_ptr(&(x)) | ||
68 | |||
69 | #define raw_irqs_disabled_flags(x) ((x) == bfin_no_irqs) | ||
70 | |||
71 | #define raw_local_irq_save_ptr(x) \ | ||
72 | do { \ | ||
73 | *(x) = __ipipe_test_and_stall_root() ? bfin_no_irqs : bfin_irq_flags; \ | ||
74 | barrier(); \ | ||
75 | } while (0) | ||
76 | 50 | ||
77 | #define raw_local_irq_save(x) \ | 51 | static inline void __hard_local_irq_enable(void) |
78 | do { \ | 52 | { |
79 | ipipe_check_context(ipipe_root_domain); \ | 53 | bfin_sti(bfin_irq_flags); |
80 | raw_local_irq_save_ptr(&(x)); \ | 54 | } |
81 | } while (0) | ||
82 | 55 | ||
83 | static inline unsigned long raw_mangle_irq_bits(int virt, unsigned long real) | 56 | static inline unsigned long hard_local_save_flags(void) |
84 | { | 57 | { |
85 | /* | 58 | return bfin_read_IMASK(); |
86 | * Merge virtual and real interrupt mask bits into a single | ||
87 | * 32bit word. | ||
88 | */ | ||
89 | return (real & ~(1 << 31)) | ((virt != 0) << 31); | ||
90 | } | 59 | } |
91 | 60 | ||
92 | static inline int raw_demangle_irq_bits(unsigned long *x) | 61 | static inline unsigned long __hard_local_irq_save(void) |
93 | { | 62 | { |
94 | int virt = (*x & (1 << 31)) != 0; | 63 | unsigned long flags; |
95 | *x &= ~(1L << 31); | 64 | flags = bfin_cli(); |
96 | return virt; | 65 | #ifdef CONFIG_DEBUG_HWERR |
66 | bfin_sti(0x3f); | ||
67 | #endif | ||
68 | return flags; | ||
97 | } | 69 | } |
98 | 70 | ||
99 | static inline void local_irq_disable_hw_notrace(void) | 71 | static inline int hard_irqs_disabled_flags(unsigned long flags) |
100 | { | 72 | { |
101 | bfin_cli(); | 73 | return (flags & ~0x3f) == 0; |
102 | } | 74 | } |
103 | 75 | ||
104 | static inline void local_irq_enable_hw_notrace(void) | 76 | static inline int hard_irqs_disabled(void) |
105 | { | 77 | { |
106 | bfin_sti(bfin_irq_flags); | 78 | unsigned long flags = hard_local_save_flags(); |
79 | return hard_irqs_disabled_flags(flags); | ||
107 | } | 80 | } |
108 | 81 | ||
109 | #define local_save_flags_hw(flags) \ | 82 | static inline void __hard_local_irq_restore(unsigned long flags) |
110 | do { \ | 83 | { |
111 | (flags) = bfin_read_IMASK(); \ | 84 | if (!hard_irqs_disabled_flags(flags)) |
112 | } while (0) | 85 | __hard_local_irq_enable(); |
86 | } | ||
113 | 87 | ||
114 | #define irqs_disabled_flags_hw(flags) (((flags) & ~0x3f) == 0) | 88 | /*****************************************************************************/ |
89 | /* | ||
90 | * Interrupt pipe handling. | ||
91 | */ | ||
92 | #ifdef CONFIG_IPIPE | ||
115 | 93 | ||
116 | #define irqs_disabled_hw() \ | 94 | #include <linux/compiler.h> |
117 | ({ \ | 95 | #include <linux/ipipe_base.h> |
118 | unsigned long flags; \ | 96 | #include <linux/ipipe_trace.h> |
119 | local_save_flags_hw(flags); \ | ||
120 | irqs_disabled_flags_hw(flags); \ | ||
121 | }) | ||
122 | 97 | ||
123 | static inline void local_irq_save_ptr_hw(unsigned long *flags) | 98 | /* |
99 | * Interrupt pipe interface to linux/irqflags.h. | ||
100 | */ | ||
101 | static inline void arch_local_irq_disable(void) | ||
124 | { | 102 | { |
125 | *flags = bfin_cli(); | 103 | ipipe_check_context(ipipe_root_domain); |
126 | #ifdef CONFIG_DEBUG_HWERR | 104 | __ipipe_stall_root(); |
127 | bfin_sti(0x3f); | 105 | barrier(); |
128 | #endif | ||
129 | } | 106 | } |
130 | 107 | ||
131 | #define local_irq_save_hw_notrace(flags) \ | 108 | static inline void arch_local_irq_enable(void) |
132 | do { \ | 109 | { |
133 | local_irq_save_ptr_hw(&(flags)); \ | 110 | barrier(); |
134 | } while (0) | 111 | ipipe_check_context(ipipe_root_domain); |
112 | __ipipe_unstall_root(); | ||
113 | } | ||
135 | 114 | ||
136 | static inline void local_irq_restore_hw_notrace(unsigned long flags) | 115 | static inline unsigned long arch_local_save_flags(void) |
137 | { | 116 | { |
138 | if (!irqs_disabled_flags_hw(flags)) | 117 | return __ipipe_test_root() ? bfin_no_irqs : bfin_irq_flags; |
139 | local_irq_enable_hw_notrace(); | ||
140 | } | 118 | } |
141 | 119 | ||
142 | #ifdef CONFIG_IPIPE_TRACE_IRQSOFF | 120 | static inline int arch_irqs_disabled_flags(unsigned long flags) |
143 | # define local_irq_disable_hw() \ | 121 | { |
144 | do { \ | 122 | return flags == bfin_no_irqs; |
145 | if (!irqs_disabled_hw()) { \ | 123 | } |
146 | local_irq_disable_hw_notrace(); \ | ||
147 | ipipe_trace_begin(0x80000000); \ | ||
148 | } \ | ||
149 | } while (0) | ||
150 | # define local_irq_enable_hw() \ | ||
151 | do { \ | ||
152 | if (irqs_disabled_hw()) { \ | ||
153 | ipipe_trace_end(0x80000000); \ | ||
154 | local_irq_enable_hw_notrace(); \ | ||
155 | } \ | ||
156 | } while (0) | ||
157 | # define local_irq_save_hw(flags) \ | ||
158 | do { \ | ||
159 | local_save_flags_hw(flags); \ | ||
160 | if (!irqs_disabled_flags_hw(flags)) { \ | ||
161 | local_irq_disable_hw_notrace(); \ | ||
162 | ipipe_trace_begin(0x80000001); \ | ||
163 | } \ | ||
164 | } while (0) | ||
165 | # define local_irq_restore_hw(flags) \ | ||
166 | do { \ | ||
167 | if (!irqs_disabled_flags_hw(flags)) { \ | ||
168 | ipipe_trace_end(0x80000001); \ | ||
169 | local_irq_enable_hw_notrace(); \ | ||
170 | } \ | ||
171 | } while (0) | ||
172 | #else /* !CONFIG_IPIPE_TRACE_IRQSOFF */ | ||
173 | # define local_irq_disable_hw() local_irq_disable_hw_notrace() | ||
174 | # define local_irq_enable_hw() local_irq_enable_hw_notrace() | ||
175 | # define local_irq_save_hw(flags) local_irq_save_hw_notrace(flags) | ||
176 | # define local_irq_restore_hw(flags) local_irq_restore_hw_notrace(flags) | ||
177 | #endif /* !CONFIG_IPIPE_TRACE_IRQSOFF */ | ||
178 | 124 | ||
179 | #else /* CONFIG_IPIPE */ | 125 | static inline void arch_local_irq_save_ptr(unsigned long *_flags) |
126 | { | ||
127 | x = __ipipe_test_and_stall_root() ? bfin_no_irqs : bfin_irq_flags; | ||
128 | barrier(); | ||
129 | } | ||
180 | 130 | ||
181 | static inline void raw_local_irq_disable(void) | 131 | static inline unsigned long arch_local_irq_save(void) |
182 | { | 132 | { |
183 | bfin_cli(); | 133 | ipipe_check_context(ipipe_root_domain); |
134 | return __hard_local_irq_save(); | ||
184 | } | 135 | } |
185 | static inline void raw_local_irq_enable(void) | 136 | |
137 | static inline unsigned long arch_mangle_irq_bits(int virt, unsigned long real) | ||
186 | { | 138 | { |
187 | bfin_sti(bfin_irq_flags); | 139 | /* |
140 | * Merge virtual and real interrupt mask bits into a single | ||
141 | * 32bit word. | ||
142 | */ | ||
143 | return (real & ~(1 << 31)) | ((virt != 0) << 31); | ||
188 | } | 144 | } |
189 | 145 | ||
190 | static inline unsigned long arch_local_save_flags(void) | 146 | static inline int arch_demangle_irq_bits(unsigned long *x) |
191 | { | 147 | { |
192 | return bfin_read_IMASK(); | 148 | int virt = (*x & (1 << 31)) != 0; |
149 | *x &= ~(1L << 31); | ||
150 | return virt; | ||
193 | } | 151 | } |
194 | 152 | ||
195 | #define raw_local_save_flags(flags) do { (flags) = arch_local_save_flags(); } while (0) | 153 | /* |
154 | * Interface to various arch routines that may be traced. | ||
155 | */ | ||
156 | #ifdef CONFIG_IPIPE_TRACE_IRQSOFF | ||
157 | static inline void hard_local_irq_disable(void) | ||
158 | { | ||
159 | if (!hard_irqs_disabled()) { | ||
160 | __hard_local_irq_disable(); | ||
161 | ipipe_trace_begin(0x80000000); | ||
162 | } | ||
163 | } | ||
196 | 164 | ||
197 | #define raw_irqs_disabled_flags(flags) (((flags) & ~0x3f) == 0) | 165 | static inline void hard_local_irq_enable(void) |
166 | { | ||
167 | if (hard_irqs_disabled()) { | ||
168 | ipipe_trace_end(0x80000000); | ||
169 | __hard_local_irq_enable(); | ||
170 | } | ||
171 | } | ||
198 | 172 | ||
199 | static inline unsigned long __raw_local_irq_save(void) | 173 | static inline unsigned long hard_local_irq_save(void) |
200 | { | 174 | { |
201 | unsigned long flags = bfin_cli(); | 175 | unsigned long flags = hard_local_save_flags(); |
202 | #ifdef CONFIG_DEBUG_HWERR | 176 | if (!hard_irqs_disabled_flags(flags)) { |
203 | bfin_sti(0x3f); | 177 | __hard_local_irq_disable(); |
204 | #endif | 178 | ipipe_trace_begin(0x80000001); |
179 | } | ||
205 | return flags; | 180 | return flags; |
206 | } | 181 | } |
207 | #define raw_local_irq_save(flags) do { (flags) = __raw_local_irq_save(); } while (0) | ||
208 | 182 | ||
209 | #define local_irq_save_hw(flags) raw_local_irq_save(flags) | 183 | static inline void hard_local_irq_restore(unsigned long flags) |
210 | #define local_irq_restore_hw(flags) raw_local_irq_restore(flags) | 184 | { |
211 | #define local_irq_enable_hw() raw_local_irq_enable() | 185 | if (!hard_irqs_disabled_flags(flags)) { |
212 | #define local_irq_disable_hw() raw_local_irq_disable() | 186 | ipipe_trace_end(0x80000001); |
213 | #define irqs_disabled_hw() irqs_disabled() | 187 | __hard_local_irq_enable(); |
188 | } | ||
189 | } | ||
190 | |||
191 | #else /* !CONFIG_IPIPE_TRACE_IRQSOFF */ | ||
192 | # define hard_local_irq_disable() __hard_local_irq_disable() | ||
193 | # define hard_local_irq_enable() __hard_local_irq_enable() | ||
194 | # define hard_local_irq_save() __hard_local_irq_save() | ||
195 | # define hard_local_irq_restore(flags) __hard_local_irq_restore(flags) | ||
196 | #endif /* !CONFIG_IPIPE_TRACE_IRQSOFF */ | ||
197 | |||
198 | #else /* CONFIG_IPIPE */ | ||
199 | |||
200 | /* | ||
201 | * Direct interface to linux/irqflags.h. | ||
202 | */ | ||
203 | #define arch_local_save_flags() hard_local_save_flags() | ||
204 | #define arch_local_irq_save(flags) __hard_local_irq_save() | ||
205 | #define arch_local_irq_restore(flags) __hard_local_irq_restore(flags) | ||
206 | #define arch_local_irq_enable() __hard_local_irq_enable() | ||
207 | #define arch_local_irq_disable() __hard_local_irq_disable() | ||
208 | #define arch_irqs_disabled_flags(flags) hard_irqs_disabled_flags(flags) | ||
209 | #define arch_irqs_disabled() hard_irqs_disabled() | ||
210 | |||
211 | /* | ||
212 | * Interface to various arch routines that may be traced. | ||
213 | */ | ||
214 | #define hard_local_irq_save() __hard_local_irq_save() | ||
215 | #define hard_local_irq_restore(flags) __hard_local_irq_restore(flags) | ||
216 | #define hard_local_irq_enable() __hard_local_irq_enable() | ||
217 | #define hard_local_irq_disable() __hard_local_irq_disable() | ||
218 | |||
214 | 219 | ||
215 | #endif /* !CONFIG_IPIPE */ | 220 | #endif /* !CONFIG_IPIPE */ |
216 | 221 | ||
217 | static inline void raw_local_irq_restore(unsigned long flags) | 222 | /* |
218 | { | 223 | * Raw interface to linux/irqflags.h. |
219 | if (!raw_irqs_disabled_flags(flags)) | 224 | */ |
220 | raw_local_irq_enable(); | 225 | #define raw_local_save_flags(flags) do { (flags) = arch_local_save_flags(); } while (0) |
221 | } | 226 | #define raw_local_irq_save(flags) do { (flags) = arch_local_irq_save(); } while (0) |
227 | #define raw_local_irq_restore(flags) arch_local_irq_restore(flags) | ||
228 | #define raw_local_irq_enable() arch_local_irq_enable() | ||
229 | #define raw_local_irq_disable() arch_local_irq_disable() | ||
230 | #define raw_irqs_disabled_flags(flags) arch_irqs_disabled_flags(flags) | ||
231 | #define raw_irqs_disabled() arch_irqs_disabled() | ||
222 | 232 | ||
223 | #endif | 233 | #endif |
diff --git a/arch/blackfin/include/asm/mmu_context.h b/arch/blackfin/include/asm/mmu_context.h index e1a9b4624f91..3828c70e7a2e 100644 --- a/arch/blackfin/include/asm/mmu_context.h +++ b/arch/blackfin/include/asm/mmu_context.h | |||
@@ -97,8 +97,8 @@ static inline void __switch_mm(struct mm_struct *prev_mm, struct mm_struct *next | |||
97 | } | 97 | } |
98 | 98 | ||
99 | #ifdef CONFIG_IPIPE | 99 | #ifdef CONFIG_IPIPE |
100 | #define lock_mm_switch(flags) local_irq_save_hw_cond(flags) | 100 | #define lock_mm_switch(flags) flags = hard_local_irq_save_cond() |
101 | #define unlock_mm_switch(flags) local_irq_restore_hw_cond(flags) | 101 | #define unlock_mm_switch(flags) hard_local_irq_restore_cond(flags) |
102 | #else | 102 | #else |
103 | #define lock_mm_switch(flags) do { (void)(flags); } while (0) | 103 | #define lock_mm_switch(flags) do { (void)(flags); } while (0) |
104 | #define unlock_mm_switch(flags) do { (void)(flags); } while (0) | 104 | #define unlock_mm_switch(flags) do { (void)(flags); } while (0) |
@@ -205,9 +205,9 @@ static inline void destroy_context(struct mm_struct *mm) | |||
205 | } | 205 | } |
206 | 206 | ||
207 | #define ipipe_mm_switch_protect(flags) \ | 207 | #define ipipe_mm_switch_protect(flags) \ |
208 | local_irq_save_hw_cond(flags) | 208 | flags = hard_local_irq_save_cond() |
209 | 209 | ||
210 | #define ipipe_mm_switch_unprotect(flags) \ | 210 | #define ipipe_mm_switch_unprotect(flags) \ |
211 | local_irq_restore_hw_cond(flags) | 211 | hard_local_irq_restore_cond(flags) |
212 | 212 | ||
213 | #endif | 213 | #endif |
diff --git a/arch/blackfin/include/asm/system.h b/arch/blackfin/include/asm/system.h index dde19b1d25f5..19e2c7c3e63a 100644 --- a/arch/blackfin/include/asm/system.h +++ b/arch/blackfin/include/asm/system.h | |||
@@ -117,7 +117,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, | |||
117 | unsigned long tmp = 0; | 117 | unsigned long tmp = 0; |
118 | unsigned long flags; | 118 | unsigned long flags; |
119 | 119 | ||
120 | local_irq_save_hw(flags); | 120 | flags = hard_local_irq_save(); |
121 | 121 | ||
122 | switch (size) { | 122 | switch (size) { |
123 | case 1: | 123 | case 1: |
@@ -139,7 +139,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, | |||
139 | : "=&d" (tmp) : "d" (x), "m" (*__xg(ptr)) : "memory"); | 139 | : "=&d" (tmp) : "d" (x), "m" (*__xg(ptr)) : "memory"); |
140 | break; | 140 | break; |
141 | } | 141 | } |
142 | local_irq_restore_hw(flags); | 142 | hard_local_irq_restore(flags); |
143 | return tmp; | 143 | return tmp; |
144 | } | 144 | } |
145 | 145 | ||
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c index dc07ed08b37f..ca1c1f9debd6 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c | |||
@@ -349,13 +349,13 @@ inline void portmux_setup(unsigned short per) | |||
349 | void set_gpio_ ## name(unsigned gpio, unsigned short arg) \ | 349 | void set_gpio_ ## name(unsigned gpio, unsigned short arg) \ |
350 | { \ | 350 | { \ |
351 | unsigned long flags; \ | 351 | unsigned long flags; \ |
352 | local_irq_save_hw(flags); \ | 352 | flags = hard_local_irq_save(); \ |
353 | if (arg) \ | 353 | if (arg) \ |
354 | gpio_array[gpio_bank(gpio)]->name |= gpio_bit(gpio); \ | 354 | gpio_array[gpio_bank(gpio)]->name |= gpio_bit(gpio); \ |
355 | else \ | 355 | else \ |
356 | gpio_array[gpio_bank(gpio)]->name &= ~gpio_bit(gpio); \ | 356 | gpio_array[gpio_bank(gpio)]->name &= ~gpio_bit(gpio); \ |
357 | AWA_DUMMY_READ(name); \ | 357 | AWA_DUMMY_READ(name); \ |
358 | local_irq_restore_hw(flags); \ | 358 | hard_local_irq_restore(flags); \ |
359 | } \ | 359 | } \ |
360 | EXPORT_SYMBOL(set_gpio_ ## name); | 360 | EXPORT_SYMBOL(set_gpio_ ## name); |
361 | 361 | ||
@@ -371,14 +371,14 @@ void set_gpio_ ## name(unsigned gpio, unsigned short arg) \ | |||
371 | { \ | 371 | { \ |
372 | unsigned long flags; \ | 372 | unsigned long flags; \ |
373 | if (ANOMALY_05000311 || ANOMALY_05000323) \ | 373 | if (ANOMALY_05000311 || ANOMALY_05000323) \ |
374 | local_irq_save_hw(flags); \ | 374 | flags = hard_local_irq_save(); \ |
375 | if (arg) \ | 375 | if (arg) \ |
376 | gpio_array[gpio_bank(gpio)]->name ## _set = gpio_bit(gpio); \ | 376 | gpio_array[gpio_bank(gpio)]->name ## _set = gpio_bit(gpio); \ |
377 | else \ | 377 | else \ |
378 | gpio_array[gpio_bank(gpio)]->name ## _clear = gpio_bit(gpio); \ | 378 | gpio_array[gpio_bank(gpio)]->name ## _clear = gpio_bit(gpio); \ |
379 | if (ANOMALY_05000311 || ANOMALY_05000323) { \ | 379 | if (ANOMALY_05000311 || ANOMALY_05000323) { \ |
380 | AWA_DUMMY_READ(name); \ | 380 | AWA_DUMMY_READ(name); \ |
381 | local_irq_restore_hw(flags); \ | 381 | hard_local_irq_restore(flags); \ |
382 | } \ | 382 | } \ |
383 | } \ | 383 | } \ |
384 | EXPORT_SYMBOL(set_gpio_ ## name); | 384 | EXPORT_SYMBOL(set_gpio_ ## name); |
@@ -391,11 +391,11 @@ void set_gpio_toggle(unsigned gpio) | |||
391 | { | 391 | { |
392 | unsigned long flags; | 392 | unsigned long flags; |
393 | if (ANOMALY_05000311 || ANOMALY_05000323) | 393 | if (ANOMALY_05000311 || ANOMALY_05000323) |
394 | local_irq_save_hw(flags); | 394 | flags = hard_local_irq_save(); |
395 | gpio_array[gpio_bank(gpio)]->toggle = gpio_bit(gpio); | 395 | gpio_array[gpio_bank(gpio)]->toggle = gpio_bit(gpio); |
396 | if (ANOMALY_05000311 || ANOMALY_05000323) { | 396 | if (ANOMALY_05000311 || ANOMALY_05000323) { |
397 | AWA_DUMMY_READ(toggle); | 397 | AWA_DUMMY_READ(toggle); |
398 | local_irq_restore_hw(flags); | 398 | hard_local_irq_restore(flags); |
399 | } | 399 | } |
400 | } | 400 | } |
401 | EXPORT_SYMBOL(set_gpio_toggle); | 401 | EXPORT_SYMBOL(set_gpio_toggle); |
@@ -408,11 +408,11 @@ void set_gpiop_ ## name(unsigned gpio, unsigned short arg) \ | |||
408 | { \ | 408 | { \ |
409 | unsigned long flags; \ | 409 | unsigned long flags; \ |
410 | if (ANOMALY_05000311 || ANOMALY_05000323) \ | 410 | if (ANOMALY_05000311 || ANOMALY_05000323) \ |
411 | local_irq_save_hw(flags); \ | 411 | flags = hard_local_irq_save(); \ |
412 | gpio_array[gpio_bank(gpio)]->name = arg; \ | 412 | gpio_array[gpio_bank(gpio)]->name = arg; \ |
413 | if (ANOMALY_05000311 || ANOMALY_05000323) { \ | 413 | if (ANOMALY_05000311 || ANOMALY_05000323) { \ |
414 | AWA_DUMMY_READ(name); \ | 414 | AWA_DUMMY_READ(name); \ |
415 | local_irq_restore_hw(flags); \ | 415 | hard_local_irq_restore(flags); \ |
416 | } \ | 416 | } \ |
417 | } \ | 417 | } \ |
418 | EXPORT_SYMBOL(set_gpiop_ ## name); | 418 | EXPORT_SYMBOL(set_gpiop_ ## name); |
@@ -433,11 +433,11 @@ unsigned short get_gpio_ ## name(unsigned gpio) \ | |||
433 | unsigned long flags; \ | 433 | unsigned long flags; \ |
434 | unsigned short ret; \ | 434 | unsigned short ret; \ |
435 | if (ANOMALY_05000311 || ANOMALY_05000323) \ | 435 | if (ANOMALY_05000311 || ANOMALY_05000323) \ |
436 | local_irq_save_hw(flags); \ | 436 | flags = hard_local_irq_save(); \ |
437 | ret = 0x01 & (gpio_array[gpio_bank(gpio)]->name >> gpio_sub_n(gpio)); \ | 437 | ret = 0x01 & (gpio_array[gpio_bank(gpio)]->name >> gpio_sub_n(gpio)); \ |
438 | if (ANOMALY_05000311 || ANOMALY_05000323) { \ | 438 | if (ANOMALY_05000311 || ANOMALY_05000323) { \ |
439 | AWA_DUMMY_READ(name); \ | 439 | AWA_DUMMY_READ(name); \ |
440 | local_irq_restore_hw(flags); \ | 440 | hard_local_irq_restore(flags); \ |
441 | } \ | 441 | } \ |
442 | return ret; \ | 442 | return ret; \ |
443 | } \ | 443 | } \ |
@@ -460,11 +460,11 @@ unsigned short get_gpiop_ ## name(unsigned gpio) \ | |||
460 | unsigned long flags; \ | 460 | unsigned long flags; \ |
461 | unsigned short ret; \ | 461 | unsigned short ret; \ |
462 | if (ANOMALY_05000311 || ANOMALY_05000323) \ | 462 | if (ANOMALY_05000311 || ANOMALY_05000323) \ |
463 | local_irq_save_hw(flags); \ | 463 | flags = hard_local_irq_save(); \ |
464 | ret = (gpio_array[gpio_bank(gpio)]->name); \ | 464 | ret = (gpio_array[gpio_bank(gpio)]->name); \ |
465 | if (ANOMALY_05000311 || ANOMALY_05000323) { \ | 465 | if (ANOMALY_05000311 || ANOMALY_05000323) { \ |
466 | AWA_DUMMY_READ(name); \ | 466 | AWA_DUMMY_READ(name); \ |
467 | local_irq_restore_hw(flags); \ | 467 | hard_local_irq_restore(flags); \ |
468 | } \ | 468 | } \ |
469 | return ret; \ | 469 | return ret; \ |
470 | } \ | 470 | } \ |
@@ -525,14 +525,14 @@ int gpio_pm_wakeup_ctrl(unsigned gpio, unsigned ctrl) | |||
525 | if (check_gpio(gpio) < 0) | 525 | if (check_gpio(gpio) < 0) |
526 | return -EINVAL; | 526 | return -EINVAL; |
527 | 527 | ||
528 | local_irq_save_hw(flags); | 528 | flags = hard_local_irq_save(); |
529 | if (ctrl) | 529 | if (ctrl) |
530 | reserve(wakeup, gpio); | 530 | reserve(wakeup, gpio); |
531 | else | 531 | else |
532 | unreserve(wakeup, gpio); | 532 | unreserve(wakeup, gpio); |
533 | 533 | ||
534 | set_gpio_maskb(gpio, ctrl); | 534 | set_gpio_maskb(gpio, ctrl); |
535 | local_irq_restore_hw(flags); | 535 | hard_local_irq_restore(flags); |
536 | 536 | ||
537 | return 0; | 537 | return 0; |
538 | } | 538 | } |
@@ -690,7 +690,7 @@ int peripheral_request(unsigned short per, const char *label) | |||
690 | 690 | ||
691 | BUG_ON(ident >= MAX_RESOURCES); | 691 | BUG_ON(ident >= MAX_RESOURCES); |
692 | 692 | ||
693 | local_irq_save_hw(flags); | 693 | flags = hard_local_irq_save(); |
694 | 694 | ||
695 | /* If a pin can be muxed as either GPIO or peripheral, make | 695 | /* If a pin can be muxed as either GPIO or peripheral, make |
696 | * sure it is not already a GPIO pin when we request it. | 696 | * sure it is not already a GPIO pin when we request it. |
@@ -701,7 +701,7 @@ int peripheral_request(unsigned short per, const char *label) | |||
701 | printk(KERN_ERR | 701 | printk(KERN_ERR |
702 | "%s: Peripheral %d is already reserved as GPIO by %s !\n", | 702 | "%s: Peripheral %d is already reserved as GPIO by %s !\n", |
703 | __func__, ident, get_label(ident)); | 703 | __func__, ident, get_label(ident)); |
704 | local_irq_restore_hw(flags); | 704 | hard_local_irq_restore(flags); |
705 | return -EBUSY; | 705 | return -EBUSY; |
706 | } | 706 | } |
707 | 707 | ||
@@ -730,7 +730,7 @@ int peripheral_request(unsigned short per, const char *label) | |||
730 | printk(KERN_ERR | 730 | printk(KERN_ERR |
731 | "%s: Peripheral %d function %d is already reserved by %s !\n", | 731 | "%s: Peripheral %d function %d is already reserved by %s !\n", |
732 | __func__, ident, P_FUNCT2MUX(per), get_label(ident)); | 732 | __func__, ident, P_FUNCT2MUX(per), get_label(ident)); |
733 | local_irq_restore_hw(flags); | 733 | hard_local_irq_restore(flags); |
734 | return -EBUSY; | 734 | return -EBUSY; |
735 | } | 735 | } |
736 | } | 736 | } |
@@ -741,7 +741,7 @@ int peripheral_request(unsigned short per, const char *label) | |||
741 | portmux_setup(per); | 741 | portmux_setup(per); |
742 | port_setup(ident, PERIPHERAL_USAGE); | 742 | port_setup(ident, PERIPHERAL_USAGE); |
743 | 743 | ||
744 | local_irq_restore_hw(flags); | 744 | hard_local_irq_restore(flags); |
745 | set_label(ident, label); | 745 | set_label(ident, label); |
746 | 746 | ||
747 | return 0; | 747 | return 0; |
@@ -780,10 +780,10 @@ void peripheral_free(unsigned short per) | |||
780 | if (!(per & P_DEFINED)) | 780 | if (!(per & P_DEFINED)) |
781 | return; | 781 | return; |
782 | 782 | ||
783 | local_irq_save_hw(flags); | 783 | flags = hard_local_irq_save(); |
784 | 784 | ||
785 | if (unlikely(!is_reserved(peri, ident, 0))) { | 785 | if (unlikely(!is_reserved(peri, ident, 0))) { |
786 | local_irq_restore_hw(flags); | 786 | hard_local_irq_restore(flags); |
787 | return; | 787 | return; |
788 | } | 788 | } |
789 | 789 | ||
@@ -794,7 +794,7 @@ void peripheral_free(unsigned short per) | |||
794 | 794 | ||
795 | set_label(ident, "free"); | 795 | set_label(ident, "free"); |
796 | 796 | ||
797 | local_irq_restore_hw(flags); | 797 | hard_local_irq_restore(flags); |
798 | } | 798 | } |
799 | EXPORT_SYMBOL(peripheral_free); | 799 | EXPORT_SYMBOL(peripheral_free); |
800 | 800 | ||
@@ -828,7 +828,7 @@ int bfin_gpio_request(unsigned gpio, const char *label) | |||
828 | if (check_gpio(gpio) < 0) | 828 | if (check_gpio(gpio) < 0) |
829 | return -EINVAL; | 829 | return -EINVAL; |
830 | 830 | ||
831 | local_irq_save_hw(flags); | 831 | flags = hard_local_irq_save(); |
832 | 832 | ||
833 | /* | 833 | /* |
834 | * Allow that the identical GPIO can | 834 | * Allow that the identical GPIO can |
@@ -837,7 +837,7 @@ int bfin_gpio_request(unsigned gpio, const char *label) | |||
837 | */ | 837 | */ |
838 | 838 | ||
839 | if (cmp_label(gpio, label) == 0) { | 839 | if (cmp_label(gpio, label) == 0) { |
840 | local_irq_restore_hw(flags); | 840 | hard_local_irq_restore(flags); |
841 | return 0; | 841 | return 0; |
842 | } | 842 | } |
843 | 843 | ||
@@ -846,7 +846,7 @@ int bfin_gpio_request(unsigned gpio, const char *label) | |||
846 | dump_stack(); | 846 | dump_stack(); |
847 | printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved by %s !\n", | 847 | printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved by %s !\n", |
848 | gpio, get_label(gpio)); | 848 | gpio, get_label(gpio)); |
849 | local_irq_restore_hw(flags); | 849 | hard_local_irq_restore(flags); |
850 | return -EBUSY; | 850 | return -EBUSY; |
851 | } | 851 | } |
852 | if (unlikely(is_reserved(peri, gpio, 1))) { | 852 | if (unlikely(is_reserved(peri, gpio, 1))) { |
@@ -855,7 +855,7 @@ int bfin_gpio_request(unsigned gpio, const char *label) | |||
855 | printk(KERN_ERR | 855 | printk(KERN_ERR |
856 | "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n", | 856 | "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n", |
857 | gpio, get_label(gpio)); | 857 | gpio, get_label(gpio)); |
858 | local_irq_restore_hw(flags); | 858 | hard_local_irq_restore(flags); |
859 | return -EBUSY; | 859 | return -EBUSY; |
860 | } | 860 | } |
861 | if (unlikely(is_reserved(gpio_irq, gpio, 1))) { | 861 | if (unlikely(is_reserved(gpio_irq, gpio, 1))) { |
@@ -871,7 +871,7 @@ int bfin_gpio_request(unsigned gpio, const char *label) | |||
871 | reserve(gpio, gpio); | 871 | reserve(gpio, gpio); |
872 | set_label(gpio, label); | 872 | set_label(gpio, label); |
873 | 873 | ||
874 | local_irq_restore_hw(flags); | 874 | hard_local_irq_restore(flags); |
875 | 875 | ||
876 | port_setup(gpio, GPIO_USAGE); | 876 | port_setup(gpio, GPIO_USAGE); |
877 | 877 | ||
@@ -888,13 +888,13 @@ void bfin_gpio_free(unsigned gpio) | |||
888 | 888 | ||
889 | might_sleep(); | 889 | might_sleep(); |
890 | 890 | ||
891 | local_irq_save_hw(flags); | 891 | flags = hard_local_irq_save(); |
892 | 892 | ||
893 | if (unlikely(!is_reserved(gpio, gpio, 0))) { | 893 | if (unlikely(!is_reserved(gpio, gpio, 0))) { |
894 | if (system_state == SYSTEM_BOOTING) | 894 | if (system_state == SYSTEM_BOOTING) |
895 | dump_stack(); | 895 | dump_stack(); |
896 | gpio_error(gpio); | 896 | gpio_error(gpio); |
897 | local_irq_restore_hw(flags); | 897 | hard_local_irq_restore(flags); |
898 | return; | 898 | return; |
899 | } | 899 | } |
900 | 900 | ||
@@ -902,7 +902,7 @@ void bfin_gpio_free(unsigned gpio) | |||
902 | 902 | ||
903 | set_label(gpio, "free"); | 903 | set_label(gpio, "free"); |
904 | 904 | ||
905 | local_irq_restore_hw(flags); | 905 | hard_local_irq_restore(flags); |
906 | } | 906 | } |
907 | EXPORT_SYMBOL(bfin_gpio_free); | 907 | EXPORT_SYMBOL(bfin_gpio_free); |
908 | 908 | ||
@@ -913,7 +913,7 @@ int bfin_special_gpio_request(unsigned gpio, const char *label) | |||
913 | { | 913 | { |
914 | unsigned long flags; | 914 | unsigned long flags; |
915 | 915 | ||
916 | local_irq_save_hw(flags); | 916 | flags = hard_local_irq_save(); |
917 | 917 | ||
918 | /* | 918 | /* |
919 | * Allow that the identical GPIO can | 919 | * Allow that the identical GPIO can |
@@ -922,19 +922,19 @@ int bfin_special_gpio_request(unsigned gpio, const char *label) | |||
922 | */ | 922 | */ |
923 | 923 | ||
924 | if (cmp_label(gpio, label) == 0) { | 924 | if (cmp_label(gpio, label) == 0) { |
925 | local_irq_restore_hw(flags); | 925 | hard_local_irq_restore(flags); |
926 | return 0; | 926 | return 0; |
927 | } | 927 | } |
928 | 928 | ||
929 | if (unlikely(is_reserved(special_gpio, gpio, 1))) { | 929 | if (unlikely(is_reserved(special_gpio, gpio, 1))) { |
930 | local_irq_restore_hw(flags); | 930 | hard_local_irq_restore(flags); |
931 | printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved by %s !\n", | 931 | printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved by %s !\n", |
932 | gpio, get_label(gpio)); | 932 | gpio, get_label(gpio)); |
933 | 933 | ||
934 | return -EBUSY; | 934 | return -EBUSY; |
935 | } | 935 | } |
936 | if (unlikely(is_reserved(peri, gpio, 1))) { | 936 | if (unlikely(is_reserved(peri, gpio, 1))) { |
937 | local_irq_restore_hw(flags); | 937 | hard_local_irq_restore(flags); |
938 | printk(KERN_ERR | 938 | printk(KERN_ERR |
939 | "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n", | 939 | "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n", |
940 | gpio, get_label(gpio)); | 940 | gpio, get_label(gpio)); |
@@ -946,7 +946,7 @@ int bfin_special_gpio_request(unsigned gpio, const char *label) | |||
946 | reserve(peri, gpio); | 946 | reserve(peri, gpio); |
947 | 947 | ||
948 | set_label(gpio, label); | 948 | set_label(gpio, label); |
949 | local_irq_restore_hw(flags); | 949 | hard_local_irq_restore(flags); |
950 | port_setup(gpio, GPIO_USAGE); | 950 | port_setup(gpio, GPIO_USAGE); |
951 | 951 | ||
952 | return 0; | 952 | return 0; |
@@ -959,18 +959,18 @@ void bfin_special_gpio_free(unsigned gpio) | |||
959 | 959 | ||
960 | might_sleep(); | 960 | might_sleep(); |
961 | 961 | ||
962 | local_irq_save_hw(flags); | 962 | flags = hard_local_irq_save(); |
963 | 963 | ||
964 | if (unlikely(!is_reserved(special_gpio, gpio, 0))) { | 964 | if (unlikely(!is_reserved(special_gpio, gpio, 0))) { |
965 | gpio_error(gpio); | 965 | gpio_error(gpio); |
966 | local_irq_restore_hw(flags); | 966 | hard_local_irq_restore(flags); |
967 | return; | 967 | return; |
968 | } | 968 | } |
969 | 969 | ||
970 | unreserve(special_gpio, gpio); | 970 | unreserve(special_gpio, gpio); |
971 | unreserve(peri, gpio); | 971 | unreserve(peri, gpio); |
972 | set_label(gpio, "free"); | 972 | set_label(gpio, "free"); |
973 | local_irq_restore_hw(flags); | 973 | hard_local_irq_restore(flags); |
974 | } | 974 | } |
975 | EXPORT_SYMBOL(bfin_special_gpio_free); | 975 | EXPORT_SYMBOL(bfin_special_gpio_free); |
976 | #endif | 976 | #endif |
@@ -983,7 +983,7 @@ int bfin_gpio_irq_request(unsigned gpio, const char *label) | |||
983 | if (check_gpio(gpio) < 0) | 983 | if (check_gpio(gpio) < 0) |
984 | return -EINVAL; | 984 | return -EINVAL; |
985 | 985 | ||
986 | local_irq_save_hw(flags); | 986 | flags = hard_local_irq_save(); |
987 | 987 | ||
988 | if (unlikely(is_reserved(peri, gpio, 1))) { | 988 | if (unlikely(is_reserved(peri, gpio, 1))) { |
989 | if (system_state == SYSTEM_BOOTING) | 989 | if (system_state == SYSTEM_BOOTING) |
@@ -991,7 +991,7 @@ int bfin_gpio_irq_request(unsigned gpio, const char *label) | |||
991 | printk(KERN_ERR | 991 | printk(KERN_ERR |
992 | "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n", | 992 | "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n", |
993 | gpio, get_label(gpio)); | 993 | gpio, get_label(gpio)); |
994 | local_irq_restore_hw(flags); | 994 | hard_local_irq_restore(flags); |
995 | return -EBUSY; | 995 | return -EBUSY; |
996 | } | 996 | } |
997 | if (unlikely(is_reserved(gpio, gpio, 1))) | 997 | if (unlikely(is_reserved(gpio, gpio, 1))) |
@@ -1002,7 +1002,7 @@ int bfin_gpio_irq_request(unsigned gpio, const char *label) | |||
1002 | reserve(gpio_irq, gpio); | 1002 | reserve(gpio_irq, gpio); |
1003 | set_label(gpio, label); | 1003 | set_label(gpio, label); |
1004 | 1004 | ||
1005 | local_irq_restore_hw(flags); | 1005 | hard_local_irq_restore(flags); |
1006 | 1006 | ||
1007 | port_setup(gpio, GPIO_USAGE); | 1007 | port_setup(gpio, GPIO_USAGE); |
1008 | 1008 | ||
@@ -1016,13 +1016,13 @@ void bfin_gpio_irq_free(unsigned gpio) | |||
1016 | if (check_gpio(gpio) < 0) | 1016 | if (check_gpio(gpio) < 0) |
1017 | return; | 1017 | return; |
1018 | 1018 | ||
1019 | local_irq_save_hw(flags); | 1019 | flags = hard_local_irq_save(); |
1020 | 1020 | ||
1021 | if (unlikely(!is_reserved(gpio_irq, gpio, 0))) { | 1021 | if (unlikely(!is_reserved(gpio_irq, gpio, 0))) { |
1022 | if (system_state == SYSTEM_BOOTING) | 1022 | if (system_state == SYSTEM_BOOTING) |
1023 | dump_stack(); | 1023 | dump_stack(); |
1024 | gpio_error(gpio); | 1024 | gpio_error(gpio); |
1025 | local_irq_restore_hw(flags); | 1025 | hard_local_irq_restore(flags); |
1026 | return; | 1026 | return; |
1027 | } | 1027 | } |
1028 | 1028 | ||
@@ -1030,7 +1030,7 @@ void bfin_gpio_irq_free(unsigned gpio) | |||
1030 | 1030 | ||
1031 | set_label(gpio, "free"); | 1031 | set_label(gpio, "free"); |
1032 | 1032 | ||
1033 | local_irq_restore_hw(flags); | 1033 | hard_local_irq_restore(flags); |
1034 | } | 1034 | } |
1035 | 1035 | ||
1036 | static inline void __bfin_gpio_direction_input(unsigned gpio) | 1036 | static inline void __bfin_gpio_direction_input(unsigned gpio) |
@@ -1052,10 +1052,10 @@ int bfin_gpio_direction_input(unsigned gpio) | |||
1052 | return -EINVAL; | 1052 | return -EINVAL; |
1053 | } | 1053 | } |
1054 | 1054 | ||
1055 | local_irq_save_hw(flags); | 1055 | flags = hard_local_irq_save(); |
1056 | __bfin_gpio_direction_input(gpio); | 1056 | __bfin_gpio_direction_input(gpio); |
1057 | AWA_DUMMY_READ(inen); | 1057 | AWA_DUMMY_READ(inen); |
1058 | local_irq_restore_hw(flags); | 1058 | hard_local_irq_restore(flags); |
1059 | 1059 | ||
1060 | return 0; | 1060 | return 0; |
1061 | } | 1061 | } |
@@ -1070,9 +1070,9 @@ void bfin_gpio_irq_prepare(unsigned gpio) | |||
1070 | port_setup(gpio, GPIO_USAGE); | 1070 | port_setup(gpio, GPIO_USAGE); |
1071 | 1071 | ||
1072 | #ifdef CONFIG_BF54x | 1072 | #ifdef CONFIG_BF54x |
1073 | local_irq_save_hw(flags); | 1073 | flags = hard_local_irq_save(); |
1074 | __bfin_gpio_direction_input(gpio); | 1074 | __bfin_gpio_direction_input(gpio); |
1075 | local_irq_restore_hw(flags); | 1075 | hard_local_irq_restore(flags); |
1076 | #endif | 1076 | #endif |
1077 | } | 1077 | } |
1078 | 1078 | ||
@@ -1094,7 +1094,7 @@ int bfin_gpio_direction_output(unsigned gpio, int value) | |||
1094 | return -EINVAL; | 1094 | return -EINVAL; |
1095 | } | 1095 | } |
1096 | 1096 | ||
1097 | local_irq_save_hw(flags); | 1097 | flags = hard_local_irq_save(); |
1098 | 1098 | ||
1099 | gpio_array[gpio_bank(gpio)]->inen &= ~gpio_bit(gpio); | 1099 | gpio_array[gpio_bank(gpio)]->inen &= ~gpio_bit(gpio); |
1100 | gpio_set_value(gpio, value); | 1100 | gpio_set_value(gpio, value); |
@@ -1105,7 +1105,7 @@ int bfin_gpio_direction_output(unsigned gpio, int value) | |||
1105 | #endif | 1105 | #endif |
1106 | 1106 | ||
1107 | AWA_DUMMY_READ(dir); | 1107 | AWA_DUMMY_READ(dir); |
1108 | local_irq_restore_hw(flags); | 1108 | hard_local_irq_restore(flags); |
1109 | 1109 | ||
1110 | return 0; | 1110 | return 0; |
1111 | } | 1111 | } |
@@ -1120,11 +1120,11 @@ int bfin_gpio_get_value(unsigned gpio) | |||
1120 | 1120 | ||
1121 | if (unlikely(get_gpio_edge(gpio))) { | 1121 | if (unlikely(get_gpio_edge(gpio))) { |
1122 | int ret; | 1122 | int ret; |
1123 | local_irq_save_hw(flags); | 1123 | flags = hard_local_irq_save(); |
1124 | set_gpio_edge(gpio, 0); | 1124 | set_gpio_edge(gpio, 0); |
1125 | ret = get_gpio_data(gpio); | 1125 | ret = get_gpio_data(gpio); |
1126 | set_gpio_edge(gpio, 1); | 1126 | set_gpio_edge(gpio, 1); |
1127 | local_irq_restore_hw(flags); | 1127 | hard_local_irq_restore(flags); |
1128 | return ret; | 1128 | return ret; |
1129 | } else | 1129 | } else |
1130 | return get_gpio_data(gpio); | 1130 | return get_gpio_data(gpio); |
diff --git a/arch/blackfin/kernel/cplb-mpu/cplbmgr.c b/arch/blackfin/kernel/cplb-mpu/cplbmgr.c index 87b25b1b30ed..8de92299b3ee 100644 --- a/arch/blackfin/kernel/cplb-mpu/cplbmgr.c +++ b/arch/blackfin/kernel/cplb-mpu/cplbmgr.c | |||
@@ -318,7 +318,7 @@ void flush_switched_cplbs(unsigned int cpu) | |||
318 | 318 | ||
319 | nr_cplb_flush[cpu]++; | 319 | nr_cplb_flush[cpu]++; |
320 | 320 | ||
321 | local_irq_save_hw(flags); | 321 | flags = hard_local_irq_save(); |
322 | _disable_icplb(); | 322 | _disable_icplb(); |
323 | for (i = first_switched_icplb; i < MAX_CPLBS; i++) { | 323 | for (i = first_switched_icplb; i < MAX_CPLBS; i++) { |
324 | icplb_tbl[cpu][i].data = 0; | 324 | icplb_tbl[cpu][i].data = 0; |
@@ -332,7 +332,7 @@ void flush_switched_cplbs(unsigned int cpu) | |||
332 | bfin_write32(DCPLB_DATA0 + i * 4, 0); | 332 | bfin_write32(DCPLB_DATA0 + i * 4, 0); |
333 | } | 333 | } |
334 | _enable_dcplb(); | 334 | _enable_dcplb(); |
335 | local_irq_restore_hw(flags); | 335 | hard_local_irq_restore(flags); |
336 | 336 | ||
337 | } | 337 | } |
338 | 338 | ||
@@ -348,7 +348,7 @@ void set_mask_dcplbs(unsigned long *masks, unsigned int cpu) | |||
348 | return; | 348 | return; |
349 | } | 349 | } |
350 | 350 | ||
351 | local_irq_save_hw(flags); | 351 | flags = hard_local_irq_save(); |
352 | current_rwx_mask[cpu] = masks; | 352 | current_rwx_mask[cpu] = masks; |
353 | 353 | ||
354 | if (L2_LENGTH && addr >= L2_START && addr < L2_START + L2_LENGTH) { | 354 | if (L2_LENGTH && addr >= L2_START && addr < L2_START + L2_LENGTH) { |
@@ -373,5 +373,5 @@ void set_mask_dcplbs(unsigned long *masks, unsigned int cpu) | |||
373 | addr += PAGE_SIZE; | 373 | addr += PAGE_SIZE; |
374 | } | 374 | } |
375 | _enable_dcplb(); | 375 | _enable_dcplb(); |
376 | local_irq_restore_hw(flags); | 376 | hard_local_irq_restore(flags); |
377 | } | 377 | } |
diff --git a/arch/blackfin/kernel/ipipe.c b/arch/blackfin/kernel/ipipe.c index 1a496cd71ba2..3b1da4aff2a1 100644 --- a/arch/blackfin/kernel/ipipe.c +++ b/arch/blackfin/kernel/ipipe.c | |||
@@ -219,10 +219,10 @@ int __ipipe_syscall_root(struct pt_regs *regs) | |||
219 | 219 | ||
220 | ret = __ipipe_dispatch_event(IPIPE_EVENT_SYSCALL, regs); | 220 | ret = __ipipe_dispatch_event(IPIPE_EVENT_SYSCALL, regs); |
221 | 221 | ||
222 | local_irq_save_hw(flags); | 222 | flags = hard_local_irq_save(); |
223 | 223 | ||
224 | if (!__ipipe_root_domain_p) { | 224 | if (!__ipipe_root_domain_p) { |
225 | local_irq_restore_hw(flags); | 225 | hard_local_irq_restore(flags); |
226 | return 1; | 226 | return 1; |
227 | } | 227 | } |
228 | 228 | ||
@@ -230,7 +230,7 @@ int __ipipe_syscall_root(struct pt_regs *regs) | |||
230 | if ((p->irqpend_himask & IPIPE_IRQMASK_VIRT) != 0) | 230 | if ((p->irqpend_himask & IPIPE_IRQMASK_VIRT) != 0) |
231 | __ipipe_sync_pipeline(IPIPE_IRQMASK_VIRT); | 231 | __ipipe_sync_pipeline(IPIPE_IRQMASK_VIRT); |
232 | 232 | ||
233 | local_irq_restore_hw(flags); | 233 | hard_local_irq_restore(flags); |
234 | 234 | ||
235 | return -ret; | 235 | return -ret; |
236 | } | 236 | } |
@@ -239,14 +239,14 @@ unsigned long ipipe_critical_enter(void (*syncfn) (void)) | |||
239 | { | 239 | { |
240 | unsigned long flags; | 240 | unsigned long flags; |
241 | 241 | ||
242 | local_irq_save_hw(flags); | 242 | flags = hard_local_irq_save(); |
243 | 243 | ||
244 | return flags; | 244 | return flags; |
245 | } | 245 | } |
246 | 246 | ||
247 | void ipipe_critical_exit(unsigned long flags) | 247 | void ipipe_critical_exit(unsigned long flags) |
248 | { | 248 | { |
249 | local_irq_restore_hw(flags); | 249 | hard_local_irq_restore(flags); |
250 | } | 250 | } |
251 | 251 | ||
252 | static void __ipipe_no_irqtail(void) | 252 | static void __ipipe_no_irqtail(void) |
@@ -279,9 +279,9 @@ int ipipe_trigger_irq(unsigned irq) | |||
279 | return -EINVAL; | 279 | return -EINVAL; |
280 | #endif | 280 | #endif |
281 | 281 | ||
282 | local_irq_save_hw(flags); | 282 | flags = hard_local_irq_save(); |
283 | __ipipe_handle_irq(irq, NULL); | 283 | __ipipe_handle_irq(irq, NULL); |
284 | local_irq_restore_hw(flags); | 284 | hard_local_irq_restore(flags); |
285 | 285 | ||
286 | return 1; | 286 | return 1; |
287 | } | 287 | } |
@@ -293,7 +293,7 @@ asmlinkage void __ipipe_sync_root(void) | |||
293 | 293 | ||
294 | BUG_ON(irqs_disabled()); | 294 | BUG_ON(irqs_disabled()); |
295 | 295 | ||
296 | local_irq_save_hw(flags); | 296 | flags = hard_local_irq_save(); |
297 | 297 | ||
298 | if (irq_tail_hook) | 298 | if (irq_tail_hook) |
299 | irq_tail_hook(); | 299 | irq_tail_hook(); |
@@ -303,7 +303,7 @@ asmlinkage void __ipipe_sync_root(void) | |||
303 | if (ipipe_root_cpudom_var(irqpend_himask) != 0) | 303 | if (ipipe_root_cpudom_var(irqpend_himask) != 0) |
304 | __ipipe_sync_pipeline(IPIPE_IRQMASK_ANY); | 304 | __ipipe_sync_pipeline(IPIPE_IRQMASK_ANY); |
305 | 305 | ||
306 | local_irq_restore_hw(flags); | 306 | hard_local_irq_restore(flags); |
307 | } | 307 | } |
308 | 308 | ||
309 | void ___ipipe_sync_pipeline(unsigned long syncmask) | 309 | void ___ipipe_sync_pipeline(unsigned long syncmask) |
@@ -344,10 +344,10 @@ void __ipipe_stall_root(void) | |||
344 | { | 344 | { |
345 | unsigned long *p, flags; | 345 | unsigned long *p, flags; |
346 | 346 | ||
347 | local_irq_save_hw(flags); | 347 | flags = hard_local_irq_save(); |
348 | p = &__ipipe_root_status; | 348 | p = &__ipipe_root_status; |
349 | __set_bit(IPIPE_STALL_FLAG, p); | 349 | __set_bit(IPIPE_STALL_FLAG, p); |
350 | local_irq_restore_hw(flags); | 350 | hard_local_irq_restore(flags); |
351 | } | 351 | } |
352 | EXPORT_SYMBOL(__ipipe_stall_root); | 352 | EXPORT_SYMBOL(__ipipe_stall_root); |
353 | 353 | ||
@@ -356,10 +356,10 @@ unsigned long __ipipe_test_and_stall_root(void) | |||
356 | unsigned long *p, flags; | 356 | unsigned long *p, flags; |
357 | int x; | 357 | int x; |
358 | 358 | ||
359 | local_irq_save_hw(flags); | 359 | flags = hard_local_irq_save(); |
360 | p = &__ipipe_root_status; | 360 | p = &__ipipe_root_status; |
361 | x = __test_and_set_bit(IPIPE_STALL_FLAG, p); | 361 | x = __test_and_set_bit(IPIPE_STALL_FLAG, p); |
362 | local_irq_restore_hw(flags); | 362 | hard_local_irq_restore(flags); |
363 | 363 | ||
364 | return x; | 364 | return x; |
365 | } | 365 | } |
@@ -371,10 +371,10 @@ unsigned long __ipipe_test_root(void) | |||
371 | unsigned long flags; | 371 | unsigned long flags; |
372 | int x; | 372 | int x; |
373 | 373 | ||
374 | local_irq_save_hw_smp(flags); | 374 | flags = hard_local_irq_save_smp(); |
375 | p = &__ipipe_root_status; | 375 | p = &__ipipe_root_status; |
376 | x = test_bit(IPIPE_STALL_FLAG, p); | 376 | x = test_bit(IPIPE_STALL_FLAG, p); |
377 | local_irq_restore_hw_smp(flags); | 377 | hard_local_irq_restore_smp(flags); |
378 | 378 | ||
379 | return x; | 379 | return x; |
380 | } | 380 | } |
@@ -384,10 +384,10 @@ void __ipipe_lock_root(void) | |||
384 | { | 384 | { |
385 | unsigned long *p, flags; | 385 | unsigned long *p, flags; |
386 | 386 | ||
387 | local_irq_save_hw(flags); | 387 | flags = hard_local_irq_save(); |
388 | p = &__ipipe_root_status; | 388 | p = &__ipipe_root_status; |
389 | __set_bit(IPIPE_SYNCDEFER_FLAG, p); | 389 | __set_bit(IPIPE_SYNCDEFER_FLAG, p); |
390 | local_irq_restore_hw(flags); | 390 | hard_local_irq_restore(flags); |
391 | } | 391 | } |
392 | EXPORT_SYMBOL(__ipipe_lock_root); | 392 | EXPORT_SYMBOL(__ipipe_lock_root); |
393 | 393 | ||
@@ -395,9 +395,9 @@ void __ipipe_unlock_root(void) | |||
395 | { | 395 | { |
396 | unsigned long *p, flags; | 396 | unsigned long *p, flags; |
397 | 397 | ||
398 | local_irq_save_hw(flags); | 398 | flags = hard_local_irq_save(); |
399 | p = &__ipipe_root_status; | 399 | p = &__ipipe_root_status; |
400 | __clear_bit(IPIPE_SYNCDEFER_FLAG, p); | 400 | __clear_bit(IPIPE_SYNCDEFER_FLAG, p); |
401 | local_irq_restore_hw(flags); | 401 | hard_local_irq_restore(flags); |
402 | } | 402 | } |
403 | EXPORT_SYMBOL(__ipipe_unlock_root); | 403 | EXPORT_SYMBOL(__ipipe_unlock_root); |
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c index 01f98cb964d2..c86a3ed5f48f 100644 --- a/arch/blackfin/kernel/process.c +++ b/arch/blackfin/kernel/process.c | |||
@@ -65,11 +65,11 @@ static void default_idle(void) | |||
65 | #ifdef CONFIG_IPIPE | 65 | #ifdef CONFIG_IPIPE |
66 | ipipe_suspend_domain(); | 66 | ipipe_suspend_domain(); |
67 | #endif | 67 | #endif |
68 | local_irq_disable_hw(); | 68 | hard_local_irq_disable(); |
69 | if (!need_resched()) | 69 | if (!need_resched()) |
70 | idle_with_irq_disabled(); | 70 | idle_with_irq_disabled(); |
71 | 71 | ||
72 | local_irq_enable_hw(); | 72 | hard_local_irq_enable(); |
73 | } | 73 | } |
74 | 74 | ||
75 | /* | 75 | /* |
diff --git a/arch/blackfin/mach-bf518/include/mach/pll.h b/arch/blackfin/mach-bf518/include/mach/pll.h index 9c19a077e91a..d5502988896b 100644 --- a/arch/blackfin/mach-bf518/include/mach/pll.h +++ b/arch/blackfin/mach-bf518/include/mach/pll.h | |||
@@ -18,7 +18,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val) | |||
18 | if (val == bfin_read_PLL_CTL()) | 18 | if (val == bfin_read_PLL_CTL()) |
19 | return; | 19 | return; |
20 | 20 | ||
21 | local_irq_save_hw(flags); | 21 | flags = hard_local_irq_save(); |
22 | /* Enable the PLL Wakeup bit in SIC IWR */ | 22 | /* Enable the PLL Wakeup bit in SIC IWR */ |
23 | iwr0 = bfin_read32(SIC_IWR0); | 23 | iwr0 = bfin_read32(SIC_IWR0); |
24 | iwr1 = bfin_read32(SIC_IWR1); | 24 | iwr1 = bfin_read32(SIC_IWR1); |
@@ -32,7 +32,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val) | |||
32 | 32 | ||
33 | bfin_write32(SIC_IWR0, iwr0); | 33 | bfin_write32(SIC_IWR0, iwr0); |
34 | bfin_write32(SIC_IWR1, iwr1); | 34 | bfin_write32(SIC_IWR1, iwr1); |
35 | local_irq_restore_hw(flags); | 35 | hard_local_irq_restore(flags); |
36 | } | 36 | } |
37 | 37 | ||
38 | /* Writing to VR_CTL initiates a PLL relock sequence. */ | 38 | /* Writing to VR_CTL initiates a PLL relock sequence. */ |
@@ -43,7 +43,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
43 | if (val == bfin_read_VR_CTL()) | 43 | if (val == bfin_read_VR_CTL()) |
44 | return; | 44 | return; |
45 | 45 | ||
46 | local_irq_save_hw(flags); | 46 | flags = hard_local_irq_save(); |
47 | /* Enable the PLL Wakeup bit in SIC IWR */ | 47 | /* Enable the PLL Wakeup bit in SIC IWR */ |
48 | iwr0 = bfin_read32(SIC_IWR0); | 48 | iwr0 = bfin_read32(SIC_IWR0); |
49 | iwr1 = bfin_read32(SIC_IWR1); | 49 | iwr1 = bfin_read32(SIC_IWR1); |
@@ -57,7 +57,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
57 | 57 | ||
58 | bfin_write32(SIC_IWR0, iwr0); | 58 | bfin_write32(SIC_IWR0, iwr0); |
59 | bfin_write32(SIC_IWR1, iwr1); | 59 | bfin_write32(SIC_IWR1, iwr1); |
60 | local_irq_restore_hw(flags); | 60 | hard_local_irq_restore(flags); |
61 | } | 61 | } |
62 | 62 | ||
63 | #endif /* _MACH_PLL_H */ | 63 | #endif /* _MACH_PLL_H */ |
diff --git a/arch/blackfin/mach-bf527/include/mach/pll.h b/arch/blackfin/mach-bf527/include/mach/pll.h index a9105226a994..24f1d7c02325 100644 --- a/arch/blackfin/mach-bf527/include/mach/pll.h +++ b/arch/blackfin/mach-bf527/include/mach/pll.h | |||
@@ -18,7 +18,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val) | |||
18 | if (val == bfin_read_PLL_CTL()) | 18 | if (val == bfin_read_PLL_CTL()) |
19 | return; | 19 | return; |
20 | 20 | ||
21 | local_irq_save_hw(flags); | 21 | flags = hard_local_irq_save(); |
22 | /* Enable the PLL Wakeup bit in SIC IWR */ | 22 | /* Enable the PLL Wakeup bit in SIC IWR */ |
23 | iwr0 = bfin_read32(SIC_IWR0); | 23 | iwr0 = bfin_read32(SIC_IWR0); |
24 | iwr1 = bfin_read32(SIC_IWR1); | 24 | iwr1 = bfin_read32(SIC_IWR1); |
@@ -32,7 +32,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val) | |||
32 | 32 | ||
33 | bfin_write32(SIC_IWR0, iwr0); | 33 | bfin_write32(SIC_IWR0, iwr0); |
34 | bfin_write32(SIC_IWR1, iwr1); | 34 | bfin_write32(SIC_IWR1, iwr1); |
35 | local_irq_restore_hw(flags); | 35 | hard_local_irq_restore(flags); |
36 | } | 36 | } |
37 | 37 | ||
38 | /* Writing to VR_CTL initiates a PLL relock sequence. */ | 38 | /* Writing to VR_CTL initiates a PLL relock sequence. */ |
@@ -43,7 +43,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
43 | if (val == bfin_read_VR_CTL()) | 43 | if (val == bfin_read_VR_CTL()) |
44 | return; | 44 | return; |
45 | 45 | ||
46 | local_irq_save_hw(flags); | 46 | flags = hard_local_irq_save(); |
47 | /* Enable the PLL Wakeup bit in SIC IWR */ | 47 | /* Enable the PLL Wakeup bit in SIC IWR */ |
48 | iwr0 = bfin_read32(SIC_IWR0); | 48 | iwr0 = bfin_read32(SIC_IWR0); |
49 | iwr1 = bfin_read32(SIC_IWR1); | 49 | iwr1 = bfin_read32(SIC_IWR1); |
@@ -57,7 +57,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
57 | 57 | ||
58 | bfin_write32(SIC_IWR0, iwr0); | 58 | bfin_write32(SIC_IWR0, iwr0); |
59 | bfin_write32(SIC_IWR1, iwr1); | 59 | bfin_write32(SIC_IWR1, iwr1); |
60 | local_irq_restore_hw(flags); | 60 | hard_local_irq_restore(flags); |
61 | } | 61 | } |
62 | 62 | ||
63 | #endif /* _MACH_PLL_H */ | 63 | #endif /* _MACH_PLL_H */ |
diff --git a/arch/blackfin/mach-bf533/include/mach/fio_flag.h b/arch/blackfin/mach-bf533/include/mach/fio_flag.h index b81905a1da23..d0bfba0b083b 100644 --- a/arch/blackfin/mach-bf533/include/mach/fio_flag.h +++ b/arch/blackfin/mach-bf533/include/mach/fio_flag.h | |||
@@ -15,10 +15,10 @@ | |||
15 | static inline void bfin_write_FIO_FLAG_##name(unsigned short val) \ | 15 | static inline void bfin_write_FIO_FLAG_##name(unsigned short val) \ |
16 | { \ | 16 | { \ |
17 | unsigned long flags; \ | 17 | unsigned long flags; \ |
18 | local_irq_save_hw(flags); \ | 18 | flags = hard_local_irq_save(); \ |
19 | bfin_write16(FIO_FLAG_##name, val); \ | 19 | bfin_write16(FIO_FLAG_##name, val); \ |
20 | bfin_read_CHIPID(); \ | 20 | bfin_read_CHIPID(); \ |
21 | local_irq_restore_hw(flags); \ | 21 | hard_local_irq_restore(flags); \ |
22 | } | 22 | } |
23 | BFIN_WRITE_FIO_FLAG(D) | 23 | BFIN_WRITE_FIO_FLAG(D) |
24 | BFIN_WRITE_FIO_FLAG(C) | 24 | BFIN_WRITE_FIO_FLAG(C) |
@@ -30,10 +30,10 @@ static inline u16 bfin_read_FIO_FLAG_##name(void) \ | |||
30 | { \ | 30 | { \ |
31 | unsigned long flags; \ | 31 | unsigned long flags; \ |
32 | u16 ret; \ | 32 | u16 ret; \ |
33 | local_irq_save_hw(flags); \ | 33 | flags = hard_local_irq_save(); \ |
34 | ret = bfin_read16(FIO_FLAG_##name); \ | 34 | ret = bfin_read16(FIO_FLAG_##name); \ |
35 | bfin_read_CHIPID(); \ | 35 | bfin_read_CHIPID(); \ |
36 | local_irq_restore_hw(flags); \ | 36 | hard_local_irq_restore(flags); \ |
37 | return ret; \ | 37 | return ret; \ |
38 | } | 38 | } |
39 | BFIN_READ_FIO_FLAG(D) | 39 | BFIN_READ_FIO_FLAG(D) |
diff --git a/arch/blackfin/mach-bf533/include/mach/pll.h b/arch/blackfin/mach-bf533/include/mach/pll.h index 9a0c9a2f1278..169c106d0edb 100644 --- a/arch/blackfin/mach-bf533/include/mach/pll.h +++ b/arch/blackfin/mach-bf533/include/mach/pll.h | |||
@@ -18,7 +18,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val) | |||
18 | if (val == bfin_read_PLL_CTL()) | 18 | if (val == bfin_read_PLL_CTL()) |
19 | return; | 19 | return; |
20 | 20 | ||
21 | local_irq_save_hw(flags); | 21 | flags = hard_local_irq_save(); |
22 | /* Enable the PLL Wakeup bit in SIC IWR */ | 22 | /* Enable the PLL Wakeup bit in SIC IWR */ |
23 | iwr = bfin_read32(SIC_IWR); | 23 | iwr = bfin_read32(SIC_IWR); |
24 | /* Only allow PPL Wakeup) */ | 24 | /* Only allow PPL Wakeup) */ |
@@ -29,7 +29,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val) | |||
29 | asm("IDLE;"); | 29 | asm("IDLE;"); |
30 | 30 | ||
31 | bfin_write32(SIC_IWR, iwr); | 31 | bfin_write32(SIC_IWR, iwr); |
32 | local_irq_restore_hw(flags); | 32 | hard_local_irq_restore(flags); |
33 | } | 33 | } |
34 | 34 | ||
35 | /* Writing to VR_CTL initiates a PLL relock sequence. */ | 35 | /* Writing to VR_CTL initiates a PLL relock sequence. */ |
@@ -40,7 +40,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
40 | if (val == bfin_read_VR_CTL()) | 40 | if (val == bfin_read_VR_CTL()) |
41 | return; | 41 | return; |
42 | 42 | ||
43 | local_irq_save_hw(flags); | 43 | flags = hard_local_irq_save(); |
44 | /* Enable the PLL Wakeup bit in SIC IWR */ | 44 | /* Enable the PLL Wakeup bit in SIC IWR */ |
45 | iwr = bfin_read32(SIC_IWR); | 45 | iwr = bfin_read32(SIC_IWR); |
46 | /* Only allow PPL Wakeup) */ | 46 | /* Only allow PPL Wakeup) */ |
@@ -51,7 +51,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
51 | asm("IDLE;"); | 51 | asm("IDLE;"); |
52 | 52 | ||
53 | bfin_write32(SIC_IWR, iwr); | 53 | bfin_write32(SIC_IWR, iwr); |
54 | local_irq_restore_hw(flags); | 54 | hard_local_irq_restore(flags); |
55 | } | 55 | } |
56 | 56 | ||
57 | #endif /* _MACH_PLL_H */ | 57 | #endif /* _MACH_PLL_H */ |
diff --git a/arch/blackfin/mach-bf537/include/mach/pll.h b/arch/blackfin/mach-bf537/include/mach/pll.h index 9a0c9a2f1278..169c106d0edb 100644 --- a/arch/blackfin/mach-bf537/include/mach/pll.h +++ b/arch/blackfin/mach-bf537/include/mach/pll.h | |||
@@ -18,7 +18,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val) | |||
18 | if (val == bfin_read_PLL_CTL()) | 18 | if (val == bfin_read_PLL_CTL()) |
19 | return; | 19 | return; |
20 | 20 | ||
21 | local_irq_save_hw(flags); | 21 | flags = hard_local_irq_save(); |
22 | /* Enable the PLL Wakeup bit in SIC IWR */ | 22 | /* Enable the PLL Wakeup bit in SIC IWR */ |
23 | iwr = bfin_read32(SIC_IWR); | 23 | iwr = bfin_read32(SIC_IWR); |
24 | /* Only allow PPL Wakeup) */ | 24 | /* Only allow PPL Wakeup) */ |
@@ -29,7 +29,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val) | |||
29 | asm("IDLE;"); | 29 | asm("IDLE;"); |
30 | 30 | ||
31 | bfin_write32(SIC_IWR, iwr); | 31 | bfin_write32(SIC_IWR, iwr); |
32 | local_irq_restore_hw(flags); | 32 | hard_local_irq_restore(flags); |
33 | } | 33 | } |
34 | 34 | ||
35 | /* Writing to VR_CTL initiates a PLL relock sequence. */ | 35 | /* Writing to VR_CTL initiates a PLL relock sequence. */ |
@@ -40,7 +40,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
40 | if (val == bfin_read_VR_CTL()) | 40 | if (val == bfin_read_VR_CTL()) |
41 | return; | 41 | return; |
42 | 42 | ||
43 | local_irq_save_hw(flags); | 43 | flags = hard_local_irq_save(); |
44 | /* Enable the PLL Wakeup bit in SIC IWR */ | 44 | /* Enable the PLL Wakeup bit in SIC IWR */ |
45 | iwr = bfin_read32(SIC_IWR); | 45 | iwr = bfin_read32(SIC_IWR); |
46 | /* Only allow PPL Wakeup) */ | 46 | /* Only allow PPL Wakeup) */ |
@@ -51,7 +51,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
51 | asm("IDLE;"); | 51 | asm("IDLE;"); |
52 | 52 | ||
53 | bfin_write32(SIC_IWR, iwr); | 53 | bfin_write32(SIC_IWR, iwr); |
54 | local_irq_restore_hw(flags); | 54 | hard_local_irq_restore(flags); |
55 | } | 55 | } |
56 | 56 | ||
57 | #endif /* _MACH_PLL_H */ | 57 | #endif /* _MACH_PLL_H */ |
diff --git a/arch/blackfin/mach-bf538/include/mach/pll.h b/arch/blackfin/mach-bf538/include/mach/pll.h index 0e67452df6be..b30bbcd412a7 100644 --- a/arch/blackfin/mach-bf538/include/mach/pll.h +++ b/arch/blackfin/mach-bf538/include/mach/pll.h | |||
@@ -18,7 +18,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val) | |||
18 | if (val == bfin_read_PLL_CTL()) | 18 | if (val == bfin_read_PLL_CTL()) |
19 | return; | 19 | return; |
20 | 20 | ||
21 | local_irq_save_hw(flags); | 21 | flags = hard_local_irq_save(); |
22 | /* Enable the PLL Wakeup bit in SIC IWR */ | 22 | /* Enable the PLL Wakeup bit in SIC IWR */ |
23 | iwr0 = bfin_read32(SIC_IWR0); | 23 | iwr0 = bfin_read32(SIC_IWR0); |
24 | iwr1 = bfin_read32(SIC_IWR1); | 24 | iwr1 = bfin_read32(SIC_IWR1); |
@@ -32,7 +32,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val) | |||
32 | 32 | ||
33 | bfin_write32(SIC_IWR0, iwr0); | 33 | bfin_write32(SIC_IWR0, iwr0); |
34 | bfin_write32(SIC_IWR1, iwr1); | 34 | bfin_write32(SIC_IWR1, iwr1); |
35 | local_irq_restore_hw(flags); | 35 | hard_local_irq_restore(flags); |
36 | } | 36 | } |
37 | 37 | ||
38 | /* Writing to VR_CTL initiates a PLL relock sequence. */ | 38 | /* Writing to VR_CTL initiates a PLL relock sequence. */ |
@@ -43,7 +43,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
43 | if (val == bfin_read_VR_CTL()) | 43 | if (val == bfin_read_VR_CTL()) |
44 | return; | 44 | return; |
45 | 45 | ||
46 | local_irq_save_hw(flags); | 46 | flags = hard_local_irq_save(); |
47 | /* Enable the PLL Wakeup bit in SIC IWR */ | 47 | /* Enable the PLL Wakeup bit in SIC IWR */ |
48 | iwr0 = bfin_read32(SIC_IWR0); | 48 | iwr0 = bfin_read32(SIC_IWR0); |
49 | iwr1 = bfin_read32(SIC_IWR1); | 49 | iwr1 = bfin_read32(SIC_IWR1); |
@@ -57,7 +57,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
57 | 57 | ||
58 | bfin_write32(SIC_IWR0, iwr0); | 58 | bfin_write32(SIC_IWR0, iwr0); |
59 | bfin_write32(SIC_IWR1, iwr1); | 59 | bfin_write32(SIC_IWR1, iwr1); |
60 | local_irq_restore_hw(flags); | 60 | hard_local_irq_restore(flags); |
61 | } | 61 | } |
62 | 62 | ||
63 | #endif /* _MACH_PLL_H */ | 63 | #endif /* _MACH_PLL_H */ |
diff --git a/arch/blackfin/mach-bf548/include/mach/pll.h b/arch/blackfin/mach-bf548/include/mach/pll.h index 777fee61fab8..7865a090d333 100644 --- a/arch/blackfin/mach-bf548/include/mach/pll.h +++ b/arch/blackfin/mach-bf548/include/mach/pll.h | |||
@@ -18,7 +18,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val) | |||
18 | if (val == bfin_read_PLL_CTL()) | 18 | if (val == bfin_read_PLL_CTL()) |
19 | return; | 19 | return; |
20 | 20 | ||
21 | local_irq_save_hw(flags); | 21 | flags = hard_local_irq_save(); |
22 | /* Enable the PLL Wakeup bit in SIC IWR */ | 22 | /* Enable the PLL Wakeup bit in SIC IWR */ |
23 | iwr0 = bfin_read32(SIC_IWR0); | 23 | iwr0 = bfin_read32(SIC_IWR0); |
24 | iwr1 = bfin_read32(SIC_IWR1); | 24 | iwr1 = bfin_read32(SIC_IWR1); |
@@ -35,7 +35,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val) | |||
35 | bfin_write32(SIC_IWR0, iwr0); | 35 | bfin_write32(SIC_IWR0, iwr0); |
36 | bfin_write32(SIC_IWR1, iwr1); | 36 | bfin_write32(SIC_IWR1, iwr1); |
37 | bfin_write32(SIC_IWR2, iwr2); | 37 | bfin_write32(SIC_IWR2, iwr2); |
38 | local_irq_restore_hw(flags); | 38 | hard_local_irq_restore(flags); |
39 | } | 39 | } |
40 | 40 | ||
41 | /* Writing to VR_CTL initiates a PLL relock sequence. */ | 41 | /* Writing to VR_CTL initiates a PLL relock sequence. */ |
@@ -46,7 +46,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
46 | if (val == bfin_read_VR_CTL()) | 46 | if (val == bfin_read_VR_CTL()) |
47 | return; | 47 | return; |
48 | 48 | ||
49 | local_irq_save_hw(flags); | 49 | flags = hard_local_irq_save(); |
50 | /* Enable the PLL Wakeup bit in SIC IWR */ | 50 | /* Enable the PLL Wakeup bit in SIC IWR */ |
51 | iwr0 = bfin_read32(SIC_IWR0); | 51 | iwr0 = bfin_read32(SIC_IWR0); |
52 | iwr1 = bfin_read32(SIC_IWR1); | 52 | iwr1 = bfin_read32(SIC_IWR1); |
@@ -63,7 +63,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
63 | bfin_write32(SIC_IWR0, iwr0); | 63 | bfin_write32(SIC_IWR0, iwr0); |
64 | bfin_write32(SIC_IWR1, iwr1); | 64 | bfin_write32(SIC_IWR1, iwr1); |
65 | bfin_write32(SIC_IWR2, iwr2); | 65 | bfin_write32(SIC_IWR2, iwr2); |
66 | local_irq_restore_hw(flags); | 66 | hard_local_irq_restore(flags); |
67 | } | 67 | } |
68 | 68 | ||
69 | #endif /* _MACH_PLL_H */ | 69 | #endif /* _MACH_PLL_H */ |
diff --git a/arch/blackfin/mach-bf561/include/mach/pll.h b/arch/blackfin/mach-bf561/include/mach/pll.h index 4baa44fccebd..f2b1fbdb8e72 100644 --- a/arch/blackfin/mach-bf561/include/mach/pll.h +++ b/arch/blackfin/mach-bf561/include/mach/pll.h | |||
@@ -18,7 +18,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val) | |||
18 | if (val == bfin_read_PLL_CTL()) | 18 | if (val == bfin_read_PLL_CTL()) |
19 | return; | 19 | return; |
20 | 20 | ||
21 | local_irq_save_hw(flags); | 21 | flags = hard_local_irq_save(); |
22 | /* Enable the PLL Wakeup bit in SIC IWR */ | 22 | /* Enable the PLL Wakeup bit in SIC IWR */ |
23 | iwr0 = bfin_read32(SICA_IWR0); | 23 | iwr0 = bfin_read32(SICA_IWR0); |
24 | iwr1 = bfin_read32(SICA_IWR1); | 24 | iwr1 = bfin_read32(SICA_IWR1); |
@@ -32,7 +32,7 @@ static __inline__ void bfin_write_PLL_CTL(unsigned int val) | |||
32 | 32 | ||
33 | bfin_write32(SICA_IWR0, iwr0); | 33 | bfin_write32(SICA_IWR0, iwr0); |
34 | bfin_write32(SICA_IWR1, iwr1); | 34 | bfin_write32(SICA_IWR1, iwr1); |
35 | local_irq_restore_hw(flags); | 35 | hard_local_irq_restore(flags); |
36 | } | 36 | } |
37 | 37 | ||
38 | /* Writing to VR_CTL initiates a PLL relock sequence. */ | 38 | /* Writing to VR_CTL initiates a PLL relock sequence. */ |
@@ -43,7 +43,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
43 | if (val == bfin_read_VR_CTL()) | 43 | if (val == bfin_read_VR_CTL()) |
44 | return; | 44 | return; |
45 | 45 | ||
46 | local_irq_save_hw(flags); | 46 | flags = hard_local_irq_save(); |
47 | /* Enable the PLL Wakeup bit in SIC IWR */ | 47 | /* Enable the PLL Wakeup bit in SIC IWR */ |
48 | iwr0 = bfin_read32(SICA_IWR0); | 48 | iwr0 = bfin_read32(SICA_IWR0); |
49 | iwr1 = bfin_read32(SICA_IWR1); | 49 | iwr1 = bfin_read32(SICA_IWR1); |
@@ -57,7 +57,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
57 | 57 | ||
58 | bfin_write32(SICA_IWR0, iwr0); | 58 | bfin_write32(SICA_IWR0, iwr0); |
59 | bfin_write32(SICA_IWR1, iwr1); | 59 | bfin_write32(SICA_IWR1, iwr1); |
60 | local_irq_restore_hw(flags); | 60 | hard_local_irq_restore(flags); |
61 | } | 61 | } |
62 | 62 | ||
63 | #endif /* _MACH_PLL_H */ | 63 | #endif /* _MACH_PLL_H */ |
diff --git a/arch/blackfin/mach-common/cpufreq.c b/arch/blackfin/mach-common/cpufreq.c index 4391d03dc845..f4cf11d362e1 100644 --- a/arch/blackfin/mach-common/cpufreq.c +++ b/arch/blackfin/mach-common/cpufreq.c | |||
@@ -134,7 +134,7 @@ static int bfin_target(struct cpufreq_policy *poli, | |||
134 | 134 | ||
135 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 135 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |
136 | if (cpu == CPUFREQ_CPU) { | 136 | if (cpu == CPUFREQ_CPU) { |
137 | local_irq_save_hw(flags); | 137 | flags = hard_local_irq_save(); |
138 | plldiv = (bfin_read_PLL_DIV() & SSEL) | | 138 | plldiv = (bfin_read_PLL_DIV() & SSEL) | |
139 | dpm_state_table[index].csel; | 139 | dpm_state_table[index].csel; |
140 | bfin_write_PLL_DIV(plldiv); | 140 | bfin_write_PLL_DIV(plldiv); |
@@ -155,7 +155,7 @@ static int bfin_target(struct cpufreq_policy *poli, | |||
155 | loops_per_jiffy = cpufreq_scale(lpj_ref, | 155 | loops_per_jiffy = cpufreq_scale(lpj_ref, |
156 | lpj_ref_freq, freqs.new); | 156 | lpj_ref_freq, freqs.new); |
157 | } | 157 | } |
158 | local_irq_restore_hw(flags); | 158 | hard_local_irq_restore(flags); |
159 | } | 159 | } |
160 | /* TODO: just test case for cycles clock source, remove later */ | 160 | /* TODO: just test case for cycles clock source, remove later */ |
161 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 161 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); |
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c index 1c8c4c7245c3..eaece5f84e42 100644 --- a/arch/blackfin/mach-common/ints-priority.c +++ b/arch/blackfin/mach-common/ints-priority.c | |||
@@ -132,8 +132,8 @@ static void bfin_ack_noop(unsigned int irq) | |||
132 | static void bfin_core_mask_irq(unsigned int irq) | 132 | static void bfin_core_mask_irq(unsigned int irq) |
133 | { | 133 | { |
134 | bfin_irq_flags &= ~(1 << irq); | 134 | bfin_irq_flags &= ~(1 << irq); |
135 | if (!irqs_disabled_hw()) | 135 | if (!hard_irqs_disabled()) |
136 | local_irq_enable_hw(); | 136 | hard_local_irq_enable(); |
137 | } | 137 | } |
138 | 138 | ||
139 | static void bfin_core_unmask_irq(unsigned int irq) | 139 | static void bfin_core_unmask_irq(unsigned int irq) |
@@ -148,8 +148,8 @@ static void bfin_core_unmask_irq(unsigned int irq) | |||
148 | * local_irq_enable just does "STI bfin_irq_flags", so it's exactly | 148 | * local_irq_enable just does "STI bfin_irq_flags", so it's exactly |
149 | * what we need. | 149 | * what we need. |
150 | */ | 150 | */ |
151 | if (!irqs_disabled_hw()) | 151 | if (!hard_irqs_disabled()) |
152 | local_irq_enable_hw(); | 152 | hard_local_irq_enable(); |
153 | return; | 153 | return; |
154 | } | 154 | } |
155 | 155 | ||
@@ -158,12 +158,12 @@ static void bfin_internal_mask_irq(unsigned int irq) | |||
158 | unsigned long flags; | 158 | unsigned long flags; |
159 | 159 | ||
160 | #ifdef CONFIG_BF53x | 160 | #ifdef CONFIG_BF53x |
161 | local_irq_save_hw(flags); | 161 | flags = hard_local_irq_save(); |
162 | bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() & | 162 | bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() & |
163 | ~(1 << SIC_SYSIRQ(irq))); | 163 | ~(1 << SIC_SYSIRQ(irq))); |
164 | #else | 164 | #else |
165 | unsigned mask_bank, mask_bit; | 165 | unsigned mask_bank, mask_bit; |
166 | local_irq_save_hw(flags); | 166 | flags = hard_local_irq_save(); |
167 | mask_bank = SIC_SYSIRQ(irq) / 32; | 167 | mask_bank = SIC_SYSIRQ(irq) / 32; |
168 | mask_bit = SIC_SYSIRQ(irq) % 32; | 168 | mask_bit = SIC_SYSIRQ(irq) % 32; |
169 | bfin_write_SIC_IMASK(mask_bank, bfin_read_SIC_IMASK(mask_bank) & | 169 | bfin_write_SIC_IMASK(mask_bank, bfin_read_SIC_IMASK(mask_bank) & |
@@ -173,7 +173,7 @@ static void bfin_internal_mask_irq(unsigned int irq) | |||
173 | ~(1 << mask_bit)); | 173 | ~(1 << mask_bit)); |
174 | #endif | 174 | #endif |
175 | #endif | 175 | #endif |
176 | local_irq_restore_hw(flags); | 176 | hard_local_irq_restore(flags); |
177 | } | 177 | } |
178 | 178 | ||
179 | #ifdef CONFIG_SMP | 179 | #ifdef CONFIG_SMP |
@@ -186,12 +186,12 @@ static void bfin_internal_unmask_irq(unsigned int irq) | |||
186 | unsigned long flags; | 186 | unsigned long flags; |
187 | 187 | ||
188 | #ifdef CONFIG_BF53x | 188 | #ifdef CONFIG_BF53x |
189 | local_irq_save_hw(flags); | 189 | flags = hard_local_irq_save(); |
190 | bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() | | 190 | bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() | |
191 | (1 << SIC_SYSIRQ(irq))); | 191 | (1 << SIC_SYSIRQ(irq))); |
192 | #else | 192 | #else |
193 | unsigned mask_bank, mask_bit; | 193 | unsigned mask_bank, mask_bit; |
194 | local_irq_save_hw(flags); | 194 | flags = hard_local_irq_save(); |
195 | mask_bank = SIC_SYSIRQ(irq) / 32; | 195 | mask_bank = SIC_SYSIRQ(irq) / 32; |
196 | mask_bit = SIC_SYSIRQ(irq) % 32; | 196 | mask_bit = SIC_SYSIRQ(irq) % 32; |
197 | #ifdef CONFIG_SMP | 197 | #ifdef CONFIG_SMP |
@@ -207,7 +207,7 @@ static void bfin_internal_unmask_irq(unsigned int irq) | |||
207 | (1 << mask_bit)); | 207 | (1 << mask_bit)); |
208 | #endif | 208 | #endif |
209 | #endif | 209 | #endif |
210 | local_irq_restore_hw(flags); | 210 | hard_local_irq_restore(flags); |
211 | } | 211 | } |
212 | 212 | ||
213 | #ifdef CONFIG_SMP | 213 | #ifdef CONFIG_SMP |
@@ -264,7 +264,7 @@ int bfin_internal_set_wake(unsigned int irq, unsigned int state) | |||
264 | break; | 264 | break; |
265 | } | 265 | } |
266 | 266 | ||
267 | local_irq_save_hw(flags); | 267 | flags = hard_local_irq_save(); |
268 | 268 | ||
269 | if (state) { | 269 | if (state) { |
270 | bfin_sic_iwr[bank] |= (1 << bit); | 270 | bfin_sic_iwr[bank] |= (1 << bit); |
@@ -275,7 +275,7 @@ int bfin_internal_set_wake(unsigned int irq, unsigned int state) | |||
275 | vr_wakeup &= ~wakeup; | 275 | vr_wakeup &= ~wakeup; |
276 | } | 276 | } |
277 | 277 | ||
278 | local_irq_restore_hw(flags); | 278 | hard_local_irq_restore(flags); |
279 | 279 | ||
280 | return 0; | 280 | return 0; |
281 | } | 281 | } |
diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c index 09c1fb410748..80884b136a0c 100644 --- a/arch/blackfin/mach-common/pm.c +++ b/arch/blackfin/mach-common/pm.c | |||
@@ -25,7 +25,7 @@ void bfin_pm_suspend_standby_enter(void) | |||
25 | { | 25 | { |
26 | unsigned long flags; | 26 | unsigned long flags; |
27 | 27 | ||
28 | local_irq_save_hw(flags); | 28 | flags = hard_local_irq_save(); |
29 | bfin_pm_standby_setup(); | 29 | bfin_pm_standby_setup(); |
30 | 30 | ||
31 | #ifdef CONFIG_PM_BFIN_SLEEP_DEEPER | 31 | #ifdef CONFIG_PM_BFIN_SLEEP_DEEPER |
@@ -56,7 +56,7 @@ void bfin_pm_suspend_standby_enter(void) | |||
56 | bfin_write_SIC_IWR(IWR_DISABLE_ALL); | 56 | bfin_write_SIC_IWR(IWR_DISABLE_ALL); |
57 | #endif | 57 | #endif |
58 | 58 | ||
59 | local_irq_restore_hw(flags); | 59 | hard_local_irq_restore(flags); |
60 | } | 60 | } |
61 | 61 | ||
62 | int bf53x_suspend_l1_mem(unsigned char *memptr) | 62 | int bf53x_suspend_l1_mem(unsigned char *memptr) |
@@ -149,12 +149,12 @@ int bfin_pm_suspend_mem_enter(void) | |||
149 | wakeup |= GPWE; | 149 | wakeup |= GPWE; |
150 | #endif | 150 | #endif |
151 | 151 | ||
152 | local_irq_save_hw(flags); | 152 | flags = hard_local_irq_save(); |
153 | 153 | ||
154 | ret = blackfin_dma_suspend(); | 154 | ret = blackfin_dma_suspend(); |
155 | 155 | ||
156 | if (ret) { | 156 | if (ret) { |
157 | local_irq_restore_hw(flags); | 157 | hard_local_irq_restore(flags); |
158 | kfree(memptr); | 158 | kfree(memptr); |
159 | return ret; | 159 | return ret; |
160 | } | 160 | } |
@@ -178,7 +178,7 @@ int bfin_pm_suspend_mem_enter(void) | |||
178 | bfin_gpio_pm_hibernate_restore(); | 178 | bfin_gpio_pm_hibernate_restore(); |
179 | blackfin_dma_resume(); | 179 | blackfin_dma_resume(); |
180 | 180 | ||
181 | local_irq_restore_hw(flags); | 181 | hard_local_irq_restore(flags); |
182 | kfree(memptr); | 182 | kfree(memptr); |
183 | 183 | ||
184 | return 0; | 184 | return 0; |