tracing: Centralize preemptirq tracepoints and unify their usage
[linux-2.6-microblaze.git] / include / linux / irqflags.h
index 9700f00..50edb9c 100644 (file)
 #include <linux/typecheck.h>
 #include <asm/irqflags.h>
 
-#ifdef CONFIG_TRACE_IRQFLAGS
+/* Currently trace_softirqs_on/off is used only by lockdep */
+#ifdef CONFIG_PROVE_LOCKING
   extern void trace_softirqs_on(unsigned long ip);
   extern void trace_softirqs_off(unsigned long ip);
+#else
+# define trace_softirqs_on(ip) do { } while (0)
+# define trace_softirqs_off(ip)        do { } while (0)
+#endif
+
+#ifdef CONFIG_TRACE_IRQFLAGS
   extern void trace_hardirqs_on(void);
   extern void trace_hardirqs_off(void);
 # define trace_hardirq_context(p)      ((p)->hardirq_context)
@@ -43,8 +50,6 @@ do {                                          \
 #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