X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=include%2Fasm-x86%2Firqflags_32.h;h=4c7720089cb5cd68d1d26af4171dcf6f1518226a;hb=4db90a145292327b95b03f6dcd3352327235cc36;hp=eff8585cb741f777b91c518c63666d59d3a6d4a2;hpb=96a388de5dc53a8b234b3fd41f3ae2cedc9ffd42;p=safe%2Fjmp%2Flinux-2.6 diff --git a/include/asm-x86/irqflags_32.h b/include/asm-x86/irqflags_32.h index eff8585..4c77200 100644 --- a/include/asm-x86/irqflags_32.h +++ b/include/asm-x86/irqflags_32.h @@ -129,6 +129,27 @@ static inline int raw_irqs_disabled(void) return raw_irqs_disabled_flags(flags); } + +/* + * makes the traced hardirq state match with the machine state + * + * should be a rarely used function, only in places where its + * otherwise impossible to know the irq state, like in traps. + */ +static inline void trace_hardirqs_fixup_flags(unsigned long flags) +{ + if (raw_irqs_disabled_flags(flags)) + trace_hardirqs_off(); + else + trace_hardirqs_on(); +} + +static inline void trace_hardirqs_fixup(void) +{ + unsigned long flags = __raw_local_save_flags(); + + trace_hardirqs_fixup_flags(flags); +} #endif /* __ASSEMBLY__ */ /* @@ -160,4 +181,17 @@ static inline int raw_irqs_disabled(void) # define TRACE_IRQS_OFF #endif +#ifdef CONFIG_DEBUG_LOCK_ALLOC +# define LOCKDEP_SYS_EXIT \ + pushl %eax; \ + pushl %ecx; \ + pushl %edx; \ + call lockdep_sys_exit; \ + popl %edx; \ + popl %ecx; \ + popl %eax; +#else +# define LOCKDEP_SYS_EXIT +#endif + #endif