diff options
author | Werner Almesberger <werner@openmoko.org> | 2009-01-29 14:27:33 +0000 |
---|---|---|
committer | Andy Green <agreen@octopus.localdomain> | 2009-01-29 14:27:33 +0000 |
commit | d38ff30d88adbe51d50e0f4e66a819b31bd3b234 (patch) | |
tree | e80f772942449e3a0e592290489fb31271f96626 /arch/arm/include | |
parent | d06b61efef255a68d95ec406640205aa1a37ebb2 (diff) |
Quick and dirty interrupt blocking time detector.
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/irqflags.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/arm/include/asm/irqflags.h b/arch/arm/include/asm/irqflags.h index 6d09974e664..3b01c151507 100644 --- a/arch/arm/include/asm/irqflags.h +++ b/arch/arm/include/asm/irqflags.h @@ -5,6 +5,12 @@ #include <asm/ptrace.h> + +void iblock_start(void); +void iblock_end(void); +void iblock_end_maybe(unsigned long flags); + + /* * CPU interrupt mask handling. */ @@ -31,6 +37,7 @@ #define raw_local_irq_save(x) \ ({ \ unsigned long temp; \ + iblock_start(); \ (void) (&temp == &x); \ __asm__ __volatile__( \ "mrs %0, cpsr @ local_irq_save\n" \ @@ -47,6 +54,7 @@ #define raw_local_irq_enable() \ ({ \ unsigned long temp; \ + iblock_start(); \ __asm__ __volatile__( \ "mrs %0, cpsr @ local_irq_enable\n" \ " bic %0, %0, #128\n" \ @@ -62,6 +70,7 @@ #define raw_local_irq_disable() \ ({ \ unsigned long temp; \ + iblock_start(); \ __asm__ __volatile__( \ "mrs %0, cpsr @ local_irq_disable\n" \ " orr %0, %0, #128\n" \ @@ -117,11 +126,12 @@ * restore saved IRQ & FIQ state */ #define raw_local_irq_restore(x) \ + ({ iblock_end_maybe(x); \ __asm__ __volatile__( \ "msr cpsr_c, %0 @ local_irq_restore\n" \ : \ : "r" (x) \ - : "memory", "cc") + : "memory", "cc"); }) #define raw_irqs_disabled_flags(flags) \ ({ \ |