Lines Matching refs:flags
21 static inline notrace void bfin_sti(unsigned long flags) in bfin_sti() argument
23 asm volatile("sti %0;" : : "d" (flags)); in bfin_sti()
28 unsigned long flags; in bfin_cli() local
29 asm volatile("cli %0;" : "=d" (flags)); in bfin_cli()
30 return flags; in bfin_cli()
60 unsigned long flags; in __hard_local_irq_save() local
61 flags = bfin_cli(); in __hard_local_irq_save()
65 return flags; in __hard_local_irq_save()
68 static inline notrace int hard_irqs_disabled_flags(unsigned long flags) in hard_irqs_disabled_flags() argument
71 return (flags & IMASK_IVG11) == 0; in hard_irqs_disabled_flags()
73 return (flags & ~0x3f) == 0; in hard_irqs_disabled_flags()
79 unsigned long flags = hard_local_save_flags(); in hard_irqs_disabled() local
80 return hard_irqs_disabled_flags(flags); in hard_irqs_disabled()
83 static inline notrace void __hard_local_irq_restore(unsigned long flags) in __hard_local_irq_restore() argument
85 if (!hard_irqs_disabled_flags(flags)) in __hard_local_irq_restore()
106 void __ipipe_restore_root(unsigned long flags);
139 static inline notrace int arch_irqs_disabled_flags(unsigned long flags) in arch_irqs_disabled_flags() argument
141 return flags == bfin_no_irqs; in arch_irqs_disabled_flags()
146 unsigned long flags; in arch_local_irq_save() local
149 flags = __ipipe_test_and_stall_root() ? bfin_no_irqs : bfin_irq_flags; in arch_local_irq_save()
152 return flags; in arch_local_irq_save()
155 static inline notrace void arch_local_irq_restore(unsigned long flags) in arch_local_irq_restore() argument
158 __ipipe_restore_root(flags == bfin_no_irqs); in arch_local_irq_restore()
199 unsigned long flags = hard_local_save_flags(); in hard_local_irq_save() local
200 if (!hard_irqs_disabled_flags(flags)) { in hard_local_irq_save()
204 return flags; in hard_local_irq_save()
207 static inline notrace void hard_local_irq_restore(unsigned long flags) in hard_local_irq_restore() argument
209 if (!hard_irqs_disabled_flags(flags)) { in hard_local_irq_restore()
219 # define hard_local_irq_restore(flags) __hard_local_irq_restore(flags) argument
223 #define hard_local_irq_restore_cond(flags) hard_local_irq_restore(flags) argument
232 #define arch_local_irq_restore(flags) __hard_local_irq_restore(flags) argument
235 #define arch_irqs_disabled_flags(flags) hard_irqs_disabled_flags(flags) argument
242 #define hard_local_irq_restore(flags) __hard_local_irq_restore(flags) argument
246 #define hard_local_irq_restore_cond(flags) do { (void)(flags); } while (0) argument
252 #define hard_local_irq_restore_smp(flags) hard_local_irq_restore(flags) argument
255 #define hard_local_irq_restore_smp(flags) do { (void)(flags); } while (0) argument
262 #define local_irq_save_hw(flags) \ argument
264 (flags) = hard_local_irq_save(); \
266 #define local_irq_restore_hw(flags) \ argument
268 hard_local_irq_restore(flags); \
278 #define local_irq_save_hw_notrace(flags) \ argument
280 (flags) = __hard_local_irq_save(); \
282 #define local_irq_restore_hw_notrace(flags) \ argument
284 __hard_local_irq_restore(flags); \