summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/conf/files.i3861
-rw-r--r--sys/arch/i386/i386/i386_trap.S6
-rw-r--r--sys/arch/x86/include/cpufunc.h32
3 files changed, 21 insertions, 18 deletions
diff --git a/sys/arch/i386/conf/files.i386 b/sys/arch/i386/conf/files.i386
index 17c115a8c7c..f527b0ab9b2 100644
--- a/sys/arch/i386/conf/files.i386
+++ b/sys/arch/i386/conf/files.i386
@@ -48,6 +48,7 @@ defparam opt_beep.h BEEP_ONHALT_PITCH=1500
defparam opt_beep.h BEEP_ONHALT_PERIOD=250
+file lockdoc/init_data.c lockdoc
file lockdoc/log.c lockdoc
file lockdoc/test.c lockdoc
diff --git a/sys/arch/i386/i386/i386_trap.S b/sys/arch/i386/i386/i386_trap.S
index 22bf694f7dc..70e8f118ef6 100644
--- a/sys/arch/i386/i386/i386_trap.S
+++ b/sys/arch/i386/i386/i386_trap.S
@@ -408,13 +408,7 @@ calltrap:
addl $1,CPUVAR(NTRAP) /* statistical info */
adcl $0,CPUVAR(NTRAP)+4
pushl %esp
-#ifdef LOCKDOC
- call _C_LABEL(trace_irqs_off)
-#endif
call _C_LABEL(trap)
-#ifdef LOCKDOC
- call _C_LABEL(trace_irqs_on)
-#endif
addl $4,%esp
_C_LABEL(trapreturn): .globl trapreturn
testb $CHK_UPL,TF_CS(%esp)
diff --git a/sys/arch/x86/include/cpufunc.h b/sys/arch/x86/include/cpufunc.h
index 6daa7565b1e..c2615991036 100644
--- a/sys/arch/x86/include/cpufunc.h
+++ b/sys/arch/x86/include/cpufunc.h
@@ -376,32 +376,27 @@ void x86_enable_intr(void);
#else
#ifdef LOCKDOC
-
-#define x86_disable_intr() __x86_disable_intr(__FILE__, __LINE__, __func__)
-void __x86_disable_intr(const char *file, int line, const char *func);
-u_long lockdoc_x86_disable_intr(void);
-
+static inline void
+_x86_disable_intr(void)
#else
-
static inline void
x86_disable_intr(void)
+#endif
{
__asm volatile ("cli" ::: "memory");
}
-#endif /* LOCKDOC */
#ifdef LOCKDOC
-#define x86_enable_intr() __x86_enable_intr(__FILE__, __LINE__, __func__)
-void __x86_enable_intr(const char *file, int line, const char *func);
-u_long lockdoc_x86_enable_intr(void);
-
+static inline void
+_x86_enable_intr(void)
#else
static inline void
x86_enable_intr(void)
+#endif
{
__asm volatile ("sti" ::: "memory");
}
-#endif /* LOCKDOC */
+
#endif /* XENPV */
@@ -415,6 +410,19 @@ void x86_write_flags(u_long);
void x86_reset(void);
+/*
+ * This import is needed so that the interrupt functions are being redefined
+ * without having to add the lockdoc.h import to every single
+ * file those functions are being called.
+ *
+ * We have to include it this late into the file to avoid circular
+ * dependencies with the calls to x86_read_flags and x86_write_flags
+ * in lockdoc.h.
+ */
+#ifdef LOCKDOC
+#include <sys/lockdoc.h>
+#endif
+
/* -------------------------------------------------------------------------- */
/*