commit 5375d415a2b2b47fa9288fcf759ff17abdf30c39 parent 9933ed07832f27117618960b54dcd7a46d91cd63 Author: oblique <psyberbits@gmail.com> Date: Wed, 31 Oct 2012 23:54:21 +0200 add irq_enable() and irq_disable() Diffstat:
M | include/irq.h | | | 12 | ++++++++++++ |
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/include/irq.h b/include/irq.h @@ -12,4 +12,16 @@ int irq_trigger_sgi(u32 irq_num); #define HW_IRQ(x) (x + 32) #define NUM_OF_IRQ 160 +static inline void +irq_enable(void) +{ + asm volatile("cpsie if" : : : "memory"); +} + +static inline void +irq_disable(void) +{ + asm volatile("cpsid if" : : : "memory"); +} + #endif /* __IRQ_H */