-
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: 31786 b: refs/heads/master c: de30a2b h: refs/heads/master v: v3
- Loading branch information
Ingo Molnar
authored and
Linus Torvalds
committed
Jul 3, 2006
1 parent
78f5a96
commit 43a85fe
Showing
11 changed files
with
314 additions
and
31 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: 5bdc9b447c0076f494a56fdcd93ee8c5e78a2afd | ||
refs/heads/master: de30a2b355ea85350ca2f58f3b9bf4e5bc007986 |
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,31 @@ | ||
/* | ||
* include/asm-powerpc/irqflags.h | ||
* | ||
* IRQ flags handling | ||
* | ||
* This file gets included from lowlevel asm headers too, to provide | ||
* wrapped versions of the local_irq_*() APIs, based on the | ||
* raw_local_irq_*() macros from the lowlevel headers. | ||
*/ | ||
#ifndef _ASM_IRQFLAGS_H | ||
#define _ASM_IRQFLAGS_H | ||
|
||
/* | ||
* Get definitions for raw_local_save_flags(x), etc. | ||
*/ | ||
#include <asm-powerpc/hw_irq.h> | ||
|
||
/* | ||
* Do the CPU's IRQ-state tracing from assembly code. We call a | ||
* C function, so save all the C-clobbered registers: | ||
*/ | ||
#ifdef CONFIG_TRACE_IRQFLAGS | ||
|
||
#error No support on PowerPC yet for CONFIG_TRACE_IRQFLAGS | ||
|
||
#else | ||
# define TRACE_IRQS_ON | ||
# define TRACE_IRQS_OFF | ||
#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
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,96 @@ | ||
/* | ||
* include/linux/irqflags.h | ||
* | ||
* IRQ flags tracing: follow the state of the hardirq and softirq flags and | ||
* provide callbacks for transitions between ON and OFF states. | ||
* | ||
* This file gets included from lowlevel asm headers too, to provide | ||
* wrapped versions of the local_irq_*() APIs, based on the | ||
* raw_local_irq_*() macros from the lowlevel headers. | ||
*/ | ||
#ifndef _LINUX_TRACE_IRQFLAGS_H | ||
#define _LINUX_TRACE_IRQFLAGS_H | ||
|
||
#ifdef CONFIG_TRACE_IRQFLAGS | ||
extern void trace_hardirqs_on(void); | ||
extern void trace_hardirqs_off(void); | ||
extern void trace_softirqs_on(unsigned long ip); | ||
extern void trace_softirqs_off(unsigned long ip); | ||
# define trace_hardirq_context(p) ((p)->hardirq_context) | ||
# define trace_softirq_context(p) ((p)->softirq_context) | ||
# define trace_hardirqs_enabled(p) ((p)->hardirqs_enabled) | ||
# define trace_softirqs_enabled(p) ((p)->softirqs_enabled) | ||
# define trace_hardirq_enter() do { current->hardirq_context++; } while (0) | ||
# define trace_hardirq_exit() do { current->hardirq_context--; } while (0) | ||
# define trace_softirq_enter() do { current->softirq_context++; } while (0) | ||
# define trace_softirq_exit() do { current->softirq_context--; } while (0) | ||
# define INIT_TRACE_IRQFLAGS .softirqs_enabled = 1, | ||
#else | ||
# define trace_hardirqs_on() do { } while (0) | ||
# define trace_hardirqs_off() do { } while (0) | ||
# define trace_softirqs_on(ip) do { } while (0) | ||
# define trace_softirqs_off(ip) do { } while (0) | ||
# define trace_hardirq_context(p) 0 | ||
# define trace_softirq_context(p) 0 | ||
# define trace_hardirqs_enabled(p) 0 | ||
# define trace_softirqs_enabled(p) 0 | ||
# define trace_hardirq_enter() do { } while (0) | ||
# define trace_hardirq_exit() do { } while (0) | ||
# define trace_softirq_enter() do { } while (0) | ||
# define trace_softirq_exit() do { } while (0) | ||
# define INIT_TRACE_IRQFLAGS | ||
#endif | ||
|
||
#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT | ||
|
||
#include <asm/irqflags.h> | ||
|
||
#define local_irq_enable() \ | ||
do { trace_hardirqs_on(); raw_local_irq_enable(); } while (0) | ||
#define local_irq_disable() \ | ||
do { raw_local_irq_disable(); trace_hardirqs_off(); } while (0) | ||
#define local_irq_save(flags) \ | ||
do { raw_local_irq_save(flags); trace_hardirqs_off(); } while (0) | ||
|
||
#define local_irq_restore(flags) \ | ||
do { \ | ||
if (raw_irqs_disabled_flags(flags)) { \ | ||
raw_local_irq_restore(flags); \ | ||
trace_hardirqs_off(); \ | ||
} else { \ | ||
trace_hardirqs_on(); \ | ||
raw_local_irq_restore(flags); \ | ||
} \ | ||
} while (0) | ||
#else /* !CONFIG_TRACE_IRQFLAGS_SUPPORT */ | ||
/* | ||
* The local_irq_*() APIs are equal to the raw_local_irq*() | ||
* if !TRACE_IRQFLAGS. | ||
*/ | ||
# define raw_local_irq_disable() local_irq_disable() | ||
# define raw_local_irq_enable() local_irq_enable() | ||
# define raw_local_irq_save(flags) local_irq_save(flags) | ||
# define raw_local_irq_restore(flags) local_irq_restore(flags) | ||
#endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */ | ||
|
||
#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT | ||
#define safe_halt() \ | ||
do { \ | ||
trace_hardirqs_on(); \ | ||
raw_safe_halt(); \ | ||
} while (0) | ||
|
||
#define local_save_flags(flags) raw_local_save_flags(flags) | ||
|
||
#define irqs_disabled() \ | ||
({ \ | ||
unsigned long flags; \ | ||
\ | ||
raw_local_save_flags(flags); \ | ||
raw_irqs_disabled_flags(flags); \ | ||
}) | ||
|
||
#define irqs_disabled_flags(flags) raw_irqs_disabled_flags(flags) | ||
#endif /* CONFIG_X86 */ | ||
|
||
#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
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
Oops, something went wrong.