summaryrefslogtreecommitdiff
path: root/sys/arch/sgi
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-10-22 20:39:18 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-10-22 20:39:18 +0000
commita63fc81055abbcdcb4ef50d56c1405cc92937d8b (patch)
treeafb92c69aa0461b5521cedc52868f559455879df /sys/arch/sgi
parent367f13c7e4fb8a960568c1aec8792e5aa394acf0 (diff)
The recent cleanups make blatantly visible that the pending_int handler
does almost exactly what splx() is doing if ipending is zero, and triggers soft interrupts as well. So don't bother checking for ipending in splx, and always invoke pending_int, which gets renamed as splx_handler for consistency.
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r--sys/arch/sgi/include/intr.h10
-rw-r--r--sys/arch/sgi/localbus/macebus.c8
-rw-r--r--sys/arch/sgi/sgi/ip27_machdep.c8
-rw-r--r--sys/arch/sgi/xbow/xheart.c10
4 files changed, 18 insertions, 18 deletions
diff --git a/sys/arch/sgi/include/intr.h b/sys/arch/sgi/include/intr.h
index da0a71b838b..33cbd8aec22 100644
--- a/sys/arch/sgi/include/intr.h
+++ b/sys/arch/sgi/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.32 2009/10/22 20:10:46 miod Exp $ */
+/* $OpenBSD: intr.h,v 1.33 2009/10/22 20:39:17 miod Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -146,15 +146,15 @@ void splinit(void);
extern uint32_t imask[NIPLS];
/* Inlines */
-static __inline void register_pending_int_handler(void (*)(int));
+static __inline void register_splx_handler(void (*)(int));
typedef void (int_f) (int);
-extern int_f *pending_hand;
+extern int_f *splx_hand;
static __inline void
-register_pending_int_handler(void(*pending)(int))
+register_splx_handler(void(*handler)(int))
{
- pending_hand = pending;
+ splx_hand = handler;
}
int splraise(int);
diff --git a/sys/arch/sgi/localbus/macebus.c b/sys/arch/sgi/localbus/macebus.c
index e83e04d7907..7c818d0347c 100644
--- a/sys/arch/sgi/localbus/macebus.c
+++ b/sys/arch/sgi/localbus/macebus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: macebus.c,v 1.47 2009/10/22 20:10:46 miod Exp $ */
+/* $OpenBSD: macebus.c,v 1.48 2009/10/22 20:39:17 miod Exp $ */
/*
* Copyright (c) 2000-2004 Opsycon AB (www.opsycon.se)
@@ -54,7 +54,7 @@ int macebusprint(void *, const char *);
int macebussearch(struct device *, void *, void *);
void macebus_intr_makemasks(void);
-void macebus_do_pending_int(int);
+void macebus_splx(int);
uint32_t macebus_iointr(uint32_t, struct trap_frame *);
uint32_t macebus_aux(uint32_t, struct trap_frame *);
@@ -252,7 +252,7 @@ macebusattach(struct device *parent, struct device *self, void *aux)
* handler. Register all except clock.
*/
set_intr(INTPRI_MACEIO, CR_INT_0, macebus_iointr);
- register_pending_int_handler(macebus_do_pending_int);
+ register_splx_handler(macebus_splx);
/* Set up a handler called when clock interrupts go off. */
set_intr(INTPRI_MACEAUX, CR_INT_5, macebus_aux);
@@ -592,7 +592,7 @@ macebus_intr_makemasks(void)
}
void
-macebus_do_pending_int(int newcpl)
+macebus_splx(int newcpl)
{
struct cpu_info *ci = curcpu();
diff --git a/sys/arch/sgi/sgi/ip27_machdep.c b/sys/arch/sgi/sgi/ip27_machdep.c
index 85d18039ded..f98901546d1 100644
--- a/sys/arch/sgi/sgi/ip27_machdep.c
+++ b/sys/arch/sgi/sgi/ip27_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip27_machdep.c,v 1.25 2009/10/22 20:05:28 miod Exp $ */
+/* $OpenBSD: ip27_machdep.c,v 1.26 2009/10/22 20:39:17 miod Exp $ */
/*
* Copyright (c) 2008, 2009 Miodrag Vallat.
@@ -72,7 +72,7 @@ int ip27_hub_intr_establish(int (*)(void *), void *, int, int,
void ip27_hub_intr_disestablish(int);
uint32_t ip27_hub_intr_handler(uint32_t, struct trap_frame *);
void ip27_hub_intr_makemasks(void);
-void ip27_hub_do_pending_int(int);
+void ip27_hub_splx(int);
void ip27_attach_node(struct device *, int16_t);
int ip27_print(void *, const char *);
@@ -231,7 +231,7 @@ ip27_setup()
xbow_intr_widget_intr_disestablish = ip27_hub_intr_disestablish;
set_intr(INTPRI_XBOWMUX, CR_INT_0, ip27_hub_intr_handler);
- register_pending_int_handler(ip27_hub_do_pending_int);
+ register_splx_handler(ip27_hub_splx);
/*
* Disable all hardware interrupts.
@@ -718,7 +718,7 @@ ip27_hub_intr_makemasks()
}
void
-ip27_hub_do_pending_int(int newcpl)
+ip27_hub_splx(int newcpl)
{
struct cpu_info *ci = curcpu();
diff --git a/sys/arch/sgi/xbow/xheart.c b/sys/arch/sgi/xbow/xheart.c
index 1a9a8e077ee..65b05c9d10f 100644
--- a/sys/arch/sgi/xbow/xheart.c
+++ b/sys/arch/sgi/xbow/xheart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xheart.c,v 1.10 2009/10/22 20:05:28 miod Exp $ */
+/* $OpenBSD: xheart.c,v 1.11 2009/10/22 20:39:17 miod Exp $ */
/*
* Copyright (c) 2008 Miodrag Vallat.
@@ -70,7 +70,7 @@ int xheart_intr_establish(int (*)(void *), void *, int, int, const char *);
void xheart_intr_disestablish(int);
uint32_t xheart_intr_handler(uint32_t, struct trap_frame *);
void xheart_intr_makemasks(struct xheart_softc *);
-void xheart_do_pending_int(int);
+void xheart_splx(int);
int
xheart_match(struct device *parent, void *match, void *aux)
@@ -132,7 +132,7 @@ xheart_attach(struct device *parent, struct device *self, void *aux)
*(volatile uint64_t*)(heart + HEART_IMR(3)) = 0UL;
set_intr(INTPRI_XBOWMUX, CR_INT_0, xheart_intr_handler);
- register_pending_int_handler(xheart_do_pending_int);
+ register_splx_handler(xheart_splx);
}
}
@@ -390,7 +390,7 @@ xheart_intr_makemasks(struct xheart_softc *sc)
}
void
-xheart_do_pending_int(int newcpl)
+xheart_splx(int newcpl)
{
struct cpu_info *ci = curcpu();
@@ -398,7 +398,7 @@ xheart_do_pending_int(int newcpl)
__asm__ (" .set noreorder\n");
ci->ci_cpl = newcpl;
__asm__ (" sync\n .set reorder\n");
- if(CPU_IS_PRIMARY(ci))
+ if (CPU_IS_PRIMARY(ci))
hw_setintrmask(newcpl);
/* If we still have softints pending trigger processing. */
if (ci->ci_ipending & SINT_ALLMASK & ~newcpl)