summaryrefslogtreecommitdiff
path: root/sys/arch/x86/include/cpufunc.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/x86/include/cpufunc.h')
-rw-r--r--sys/arch/x86/include/cpufunc.h32
1 files changed, 20 insertions, 12 deletions
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
+
/* -------------------------------------------------------------------------- */
/*