Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm26/arm26 Arrange to inline hardsplx() into raise...



details:   https://anonhg.NetBSD.org/src/rev/f98e3fd71095
branches:  trunk
changeset: 509335:f98e3fd71095
user:      bjh21 <bjh21%NetBSD.org@localhost>
date:      Tue May 01 22:19:09 2001 +0000

description:
Arrange to inline hardsplx() into raisespl() and lowerspl().  This should
make them slightly faster, and makes it easier to see how much of the time
apparently spent in hardsplx() actually comes from deferred statclock
interrupts.

diffstat:

 sys/arch/arm26/arm26/irq.c |  42 ++++++++++++++++++++++--------------------
 1 files changed, 22 insertions(+), 20 deletions(-)

diffs (77 lines):

diff -r 170aa8fd4a5f -r f98e3fd71095 sys/arch/arm26/arm26/irq.c
--- a/sys/arch/arm26/arm26/irq.c        Tue May 01 20:37:44 2001 +0000
+++ b/sys/arch/arm26/arm26/irq.c        Tue May 01 22:19:09 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: irq.c,v 1.17 2001/04/21 18:51:17 bjh21 Exp $ */
+/* $NetBSD: irq.c,v 1.18 2001/05/01 22:19:09 bjh21 Exp $ */
 
 /*-
  * Copyright (c) 2000, 2001 Ben Harris
@@ -33,7 +33,7 @@
 
 #include <sys/param.h>
 
-__RCSID("$NetBSD: irq.c,v 1.17 2001/04/21 18:51:17 bjh21 Exp $");
+__RCSID("$NetBSD: irq.c,v 1.18 2001/05/01 22:19:09 bjh21 Exp $");
 
 #include <sys/device.h>
 #include <sys/kernel.h> /* for cold */
@@ -98,6 +98,8 @@
 
 volatile static int current_spl = IPL_HIGH;
 
+__inline int hardsplx(int);
+
 void
 irq_init(void)
 {
@@ -286,6 +288,24 @@
        splx(s);
 }
 
+__inline int
+hardsplx(int s)
+{
+       int was;
+
+       int_off();
+       was = current_spl;
+       /* Don't try this till we've found the IOC */
+       if (the_ioc != NULL)
+               ioc_irq_setmask(irqmask[s]);
+#if NUNIXBP > 0
+       unixbp_irq_setmask(irqmask[s] >> IRQ_UNIXBP_BASE);
+#endif
+       current_spl = s;
+       int_on();
+       return was;
+}
+
 int
 raisespl(int s)
 {
@@ -306,24 +326,6 @@
        }
 }
 
-int
-hardsplx(int s)
-{
-       int was;
-
-       int_off();
-       was = current_spl;
-       /* Don't try this till we've found the IOC */
-       if (the_ioc != NULL)
-               ioc_irq_setmask(irqmask[s]);
-#if NUNIXBP > 0
-       unixbp_irq_setmask(irqmask[s] >> IRQ_UNIXBP_BASE);
-#endif
-       current_spl = s;
-       int_on();
-       return was;
-}
-
 #ifdef DDB
 void
 irq_stat(void (*pr)(const char *, ...))



Home | Main Index | Thread Index | Old Index