summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2017-06-11 10:01:24 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2017-06-11 10:01:24 +0000
commitfac2b3619b9e82337ad2787f816268bea0092078 (patch)
tree3da198336a32873fce4dbf0a0c6c2e9432a02fc8
parentae2cbf62933872440eeb08686c943e0ff899b776 (diff)
Define register_splx_handler() in one place.
-rw-r--r--sys/arch/loongson/include/intr.h15
-rw-r--r--sys/arch/mips64/mips64/interrupt.c10
-rw-r--r--sys/arch/octeon/include/intr.h15
-rw-r--r--sys/arch/sgi/include/intr.h15
4 files changed, 14 insertions, 41 deletions
diff --git a/sys/arch/loongson/include/intr.h b/sys/arch/loongson/include/intr.h
index 1e7905d8d6c..66f1432b3d6 100644
--- a/sys/arch/loongson/include/intr.h
+++ b/sys/arch/loongson/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.13 2017/05/17 11:52:25 visa Exp $ */
+/* $OpenBSD: intr.h,v 1.14 2017/06/11 10:01:23 visa Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -135,18 +135,7 @@ void splinit(void);
#define splassert(X)
#define splsoftassert(X)
-/* Inlines */
-static __inline void register_splx_handler(void (*)(int));
-
-typedef void (int_f)(int);
-extern int_f *splx_hand;
-
-static __inline void
-register_splx_handler(void(*handler)(int))
-{
- splx_hand = handler;
-}
-
+void register_splx_handler(void (*)(int));
int splraise(int);
void splx(int);
int spllower(int);
diff --git a/sys/arch/mips64/mips64/interrupt.c b/sys/arch/mips64/mips64/interrupt.c
index f8b8ebda1be..ca5d709626b 100644
--- a/sys/arch/mips64/mips64/interrupt.c
+++ b/sys/arch/mips64/mips64/interrupt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interrupt.c,v 1.67 2016/08/16 13:03:58 visa Exp $ */
+/* $OpenBSD: interrupt.c,v 1.68 2017/06/11 10:01:23 visa Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -59,7 +59,7 @@ struct {
uint32_t (*int_hand)(uint32_t, struct trapframe *);
} cpu_int_tab[NLOWINT];
-int_f *splx_hand = &dummy_splx;
+void (*splx_hand)(int) = &dummy_splx;
/*
* Modern versions of MIPS processors have extended interrupt
@@ -221,6 +221,12 @@ splinit()
(void)updateimask(0);
}
+void
+register_splx_handler(void (*handler)(int))
+{
+ splx_hand = handler;
+}
+
int
splraise(int newipl)
{
diff --git a/sys/arch/octeon/include/intr.h b/sys/arch/octeon/include/intr.h
index df8f86c2c1c..a6129f9f8fa 100644
--- a/sys/arch/octeon/include/intr.h
+++ b/sys/arch/octeon/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.9 2017/04/06 15:25:24 visa Exp $ */
+/* $OpenBSD: intr.h,v 1.10 2017/06/11 10:01:23 visa Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -139,18 +139,7 @@ void splinit(void);
#define splassert(X)
#define splsoftassert(X)
-/* Inlines */
-static __inline void register_splx_handler(void (*)(int));
-
-typedef void (int_f)(int);
-extern int_f *splx_hand;
-
-static __inline void
-register_splx_handler(void(*handler)(int))
-{
- splx_hand = handler;
-}
-
+void register_splx_handler(void (*)(int));
int splraise(int);
void splx(int);
int spllower(int);
diff --git a/sys/arch/sgi/include/intr.h b/sys/arch/sgi/include/intr.h
index cd20096826a..9bd5674d42d 100644
--- a/sys/arch/sgi/include/intr.h
+++ b/sys/arch/sgi/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.48 2017/02/11 03:44:22 visa Exp $ */
+/* $OpenBSD: intr.h,v 1.49 2017/06/11 10:01:23 visa Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -134,18 +134,7 @@ void splinit(void);
#define splassert(X)
#define splsoftassert(X)
-/* Inlines */
-static __inline void register_splx_handler(void (*)(int));
-
-typedef void (int_f)(int);
-extern int_f *splx_hand;
-
-static __inline void
-register_splx_handler(void(*handler)(int))
-{
- splx_hand = handler;
-}
-
+void register_splx_handler(void (*)(int));
int splraise(int);
void splx(int);
int spllower(int);