summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mips64/mips64/interrupt.c28
-rw-r--r--sys/arch/sgi/include/intr.h51
2 files changed, 32 insertions, 47 deletions
diff --git a/sys/arch/mips64/mips64/interrupt.c b/sys/arch/mips64/mips64/interrupt.c
index a0ed3367e16..2c07070237e 100644
--- a/sys/arch/mips64/mips64/interrupt.c
+++ b/sys/arch/mips64/mips64/interrupt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interrupt.c,v 1.35 2009/04/25 20:35:06 miod Exp $ */
+/* $OpenBSD: interrupt.c,v 1.36 2009/05/21 16:08:04 miod Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -287,7 +287,6 @@ splinit()
#endif
}
-#ifndef INLINE_SPLRAISE
int
splraise(int newcpl)
{
@@ -299,4 +298,29 @@ splraise(int newcpl)
__asm__ (" sync\n .set reorder\n");
return (oldcpl);
}
+
+void
+splx(int newcpl)
+{
+ if (ipending & ~newcpl)
+ (*pending_hand)(newcpl);
+ else {
+ __asm__ (" .set noreorder\n");
+ cpl = newcpl;
+ __asm__ (" sync\n .set reorder\n");
+#ifdef IMASK_EXTERNAL
+ hw_setintrmask(newcpl);
#endif
+ }
+}
+
+int
+spllower(int newcpl)
+{
+ int oldcpl;
+
+ oldcpl = cpl;
+ splx(newcpl);
+ return (oldcpl);
+}
+
diff --git a/sys/arch/sgi/include/intr.h b/sys/arch/sgi/include/intr.h
index ca1a33cb88b..1b2e9924ff7 100644
--- a/sys/arch/sgi/include/intr.h
+++ b/sys/arch/sgi/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.22 2009/03/20 18:41:07 miod Exp $ */
+/* $OpenBSD: intr.h,v 1.23 2009/05/21 16:08:05 miod Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -169,10 +169,8 @@ extern intrmask_t imask[NIPLS];
/* Inlines */
static __inline void register_pending_int_handler(void (*)(int));
-static __inline void splx(int newcpl);
-static __inline int spllower(int newcpl);
-typedef void (int_f) (int);
+typedef void (int_f) (int);
extern int_f *pending_hand;
static __inline void
@@ -181,46 +179,9 @@ register_pending_int_handler(void(*pending)(int))
pending_hand = pending;
}
-/*
- */
-#ifdef INLINE_SPLRAISE
-static __inline int splraise(int newcpl);
-static __inline int
-splraise(int newcpl)
-{
- int oldcpl;
-
- __asm__ (" .set noreorder\n");
- oldcpl = cpl;
- cpl = oldcpl | newcpl;
- __asm__ (" sync\n .set reorder\n");
- return (oldcpl);
-}
-#else
-int splraise(int newcpl);
-#endif
-
-static __inline void
-splx(int newcpl)
-{
- if (ipending & ~newcpl)
- (*pending_hand)(newcpl);
- else
- cpl = newcpl;
-}
-
-static __inline int
-spllower(int newcpl)
-{
- int oldcpl;
-
- oldcpl = cpl;
- if (ipending & ~newcpl)
- (*pending_hand)(newcpl);
- else
- cpl = newcpl;
- return (oldcpl);
-}
+int splraise(int);
+void splx(int);
+int spllower(int);
/*
* Interrupt control struct used by interrupt dispatchers
@@ -237,7 +198,7 @@ struct intrhand {
int ih_irq;
char *ih_what;
void *frame;
- struct evcount ih_count;
+ struct evcount ih_count;
};
extern struct intrhand *intrhand[INTMASKSIZE];