-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 36559 b: refs/heads/master c: 7ad1bcb h: refs/heads/master i: 36557: 44926e1 36555: bbe6f9a 36551: 82fe240 36543: 4855b40 v: v3
- Loading branch information
Russell King
authored and
Russell King
committed
Sep 20, 2006
1 parent
9514715
commit 9b7a2a6
Showing
5 changed files
with
151 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: d84b47115a04d9f6b0da777e8aa8cd930d5b6b8b | ||
refs/heads/master: 7ad1bcb25c5623f1f87c50fdf2272f58ff91db5a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
#ifndef __ASM_ARM_IRQFLAGS_H | ||
#define __ASM_ARM_IRQFLAGS_H | ||
|
||
#ifdef __KERNEL__ | ||
|
||
#include <asm/ptrace.h> | ||
|
||
/* | ||
* CPU interrupt mask handling. | ||
*/ | ||
#if __LINUX_ARM_ARCH__ >= 6 | ||
|
||
#define raw_local_irq_save(x) \ | ||
({ \ | ||
__asm__ __volatile__( \ | ||
"mrs %0, cpsr @ local_irq_save\n" \ | ||
"cpsid i" \ | ||
: "=r" (x) : : "memory", "cc"); \ | ||
}) | ||
|
||
#define raw_local_irq_enable() __asm__("cpsie i @ __sti" : : : "memory", "cc") | ||
#define raw_local_irq_disable() __asm__("cpsid i @ __cli" : : : "memory", "cc") | ||
#define local_fiq_enable() __asm__("cpsie f @ __stf" : : : "memory", "cc") | ||
#define local_fiq_disable() __asm__("cpsid f @ __clf" : : : "memory", "cc") | ||
|
||
#else | ||
|
||
/* | ||
* Save the current interrupt enable state & disable IRQs | ||
*/ | ||
#define raw_local_irq_save(x) \ | ||
({ \ | ||
unsigned long temp; \ | ||
(void) (&temp == &x); \ | ||
__asm__ __volatile__( \ | ||
"mrs %0, cpsr @ local_irq_save\n" \ | ||
" orr %1, %0, #128\n" \ | ||
" msr cpsr_c, %1" \ | ||
: "=r" (x), "=r" (temp) \ | ||
: \ | ||
: "memory", "cc"); \ | ||
}) | ||
|
||
/* | ||
* Enable IRQs | ||
*/ | ||
#define raw_local_irq_enable() \ | ||
({ \ | ||
unsigned long temp; \ | ||
__asm__ __volatile__( \ | ||
"mrs %0, cpsr @ local_irq_enable\n" \ | ||
" bic %0, %0, #128\n" \ | ||
" msr cpsr_c, %0" \ | ||
: "=r" (temp) \ | ||
: \ | ||
: "memory", "cc"); \ | ||
}) | ||
|
||
/* | ||
* Disable IRQs | ||
*/ | ||
#define raw_local_irq_disable() \ | ||
({ \ | ||
unsigned long temp; \ | ||
__asm__ __volatile__( \ | ||
"mrs %0, cpsr @ local_irq_disable\n" \ | ||
" orr %0, %0, #128\n" \ | ||
" msr cpsr_c, %0" \ | ||
: "=r" (temp) \ | ||
: \ | ||
: "memory", "cc"); \ | ||
}) | ||
|
||
/* | ||
* Enable FIQs | ||
*/ | ||
#define local_fiq_enable() \ | ||
({ \ | ||
unsigned long temp; \ | ||
__asm__ __volatile__( \ | ||
"mrs %0, cpsr @ stf\n" \ | ||
" bic %0, %0, #64\n" \ | ||
" msr cpsr_c, %0" \ | ||
: "=r" (temp) \ | ||
: \ | ||
: "memory", "cc"); \ | ||
}) | ||
|
||
/* | ||
* Disable FIQs | ||
*/ | ||
#define local_fiq_disable() \ | ||
({ \ | ||
unsigned long temp; \ | ||
__asm__ __volatile__( \ | ||
"mrs %0, cpsr @ clf\n" \ | ||
" orr %0, %0, #64\n" \ | ||
" msr cpsr_c, %0" \ | ||
: "=r" (temp) \ | ||
: \ | ||
: "memory", "cc"); \ | ||
}) | ||
|
||
#endif | ||
|
||
/* | ||
* Save the current interrupt enable state. | ||
*/ | ||
#define raw_local_save_flags(x) \ | ||
({ \ | ||
__asm__ __volatile__( \ | ||
"mrs %0, cpsr @ local_save_flags" \ | ||
: "=r" (x) : : "memory", "cc"); \ | ||
}) | ||
|
||
/* | ||
* restore saved IRQ & FIQ state | ||
*/ | ||
#define raw_local_irq_restore(x) \ | ||
__asm__ __volatile__( \ | ||
"msr cpsr_c, %0 @ local_irq_restore\n" \ | ||
: \ | ||
: "r" (x) \ | ||
: "memory", "cc") | ||
|
||
#define raw_irqs_disabled_flags(flags) \ | ||
({ \ | ||
(int)((flags) & PSR_I_BIT); \ | ||
}) | ||
|
||
#endif | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters