summaryrefslogtreecommitdiff
path: root/sys/arch/octeon/include
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2019-09-05 05:31:39 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2019-09-05 05:31:39 +0000
commit4b2b041ac8a7c0b6420ddab454af2762ad8194a3 (patch)
tree33bd2a9fe45021c9212fb42ef75f5d24b61b4390 /sys/arch/octeon/include
parent3b6ad0ff73e79a075e7b058bc11d904693203c69 (diff)
Implement splassert() on mips64.
Diffstat (limited to 'sys/arch/octeon/include')
-rw-r--r--sys/arch/octeon/include/intr.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/arch/octeon/include/intr.h b/sys/arch/octeon/include/intr.h
index 04e0ee26923..6fd2cddb734 100644
--- a/sys/arch/octeon/include/intr.h
+++ b/sys/arch/octeon/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.21 2019/09/05 05:06:33 visa Exp $ */
+/* $OpenBSD: intr.h,v 1.22 2019/09/05 05:31:38 visa Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -127,8 +127,24 @@ void softintr_schedule(void *);
void splinit(void);
+#ifdef DIAGNOSTIC
+/*
+ * Although this function is implemented in MI code, it must be in this MD
+ * header because we don't want this header to include MI includes.
+ */
+void splassert_fail(int, int, const char *);
+extern int splassert_ctl;
+void splassert_check(int, const char *);
+#define splassert(__wantipl) do { \
+ if (splassert_ctl > 0) { \
+ splassert_check(__wantipl, __func__); \
+ } \
+} while (0)
+#define splsoftassert(wantipl) splassert(wantipl)
+#else
#define splassert(X)
#define splsoftassert(X)
+#endif
void register_splx_handler(void (*)(int));
int splraise(int);