]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-x86/irqflags_64.h
sis190: mdio operation failure is not correctly detected
[linux-2.6-omap-h63xx.git] / include / asm-x86 / irqflags_64.h
index 86e70fe23659bded0499fc85b0bb359aa7e3387c..bb9163bb29d1d914651ac672e062b5229a31be6d 100644 (file)
@@ -111,6 +111,26 @@ 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);
+}
 /*
  * Used in the idle loop; sti takes one instruction cycle
  * to complete:
@@ -137,6 +157,20 @@ static inline void halt(void)
 #  define TRACE_IRQS_ON
 #  define TRACE_IRQS_OFF
 # endif
+# ifdef CONFIG_DEBUG_LOCK_ALLOC
+#  define LOCKDEP_SYS_EXIT     call lockdep_sys_exit_thunk
+#  define LOCKDEP_SYS_EXIT_IRQ \
+       TRACE_IRQS_ON; \
+       sti; \
+       SAVE_REST; \
+       LOCKDEP_SYS_EXIT; \
+       RESTORE_REST; \
+       cli; \
+       TRACE_IRQS_OFF;
+# else
+#  define LOCKDEP_SYS_EXIT
+#  define LOCKDEP_SYS_EXIT_IRQ
+# endif
 #endif
 
 #endif