Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm26 Bring spl stuff closer to specs
details: https://anonhg.NetBSD.org/src/rev/e76ceacf726e
branches: trunk
changeset: 487521:e76ceacf726e
user: bjh21 <bjh21%NetBSD.org@localhost>
date: Thu Jun 08 23:26:10 2000 +0000
description:
Bring spl stuff closer to specs
diffstat:
sys/arch/arm26/arm26/irq.c | 23 +++++++----------------
sys/arch/arm26/arm26/locore.S | 6 +++---
sys/arch/arm26/include/spl.h | 15 ++++++++-------
3 files changed, 18 insertions(+), 26 deletions(-)
diffs (123 lines):
diff -r 610a9073984e -r e76ceacf726e sys/arch/arm26/arm26/irq.c
--- a/sys/arch/arm26/arm26/irq.c Thu Jun 08 23:25:05 2000 +0000
+++ b/sys/arch/arm26/arm26/irq.c Thu Jun 08 23:26:10 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: irq.c,v 1.1 2000/05/09 21:55:56 bjh21 Exp $ */
+/* $NetBSD: irq.c,v 1.2 2000/06/08 23:26:10 bjh21 Exp $ */
/*-
* Copyright (c) 2000 Ben Harris
@@ -33,7 +33,7 @@
#include <sys/param.h>
-__RCSID("$NetBSD: irq.c,v 1.1 2000/05/09 21:55:56 bjh21 Exp $");
+__RCSID("$NetBSD: irq.c,v 1.2 2000/06/08 23:26:10 bjh21 Exp $");
#include <sys/device.h>
#include <sys/kernel.h> /* for cold */
@@ -252,28 +252,19 @@
{
if (s > current_spl)
- return splx(s);
+ return hardsplx(s);
else
return current_spl;
}
-int
+void
lowerspl(int s)
{
- if (s < current_spl)
- return splx(s);
- else
- return current_spl;
-}
-
-int
-splx(int s)
-{
-
- if (current_spl > s)
+ if (s < current_spl) {
dosoftints(s);
- return hardsplx(s);
+ hardsplx(s);
+ }
}
int
diff -r 610a9073984e -r e76ceacf726e sys/arch/arm26/arm26/locore.S
--- a/sys/arch/arm26/arm26/locore.S Thu Jun 08 23:25:05 2000 +0000
+++ b/sys/arch/arm26/arm26/locore.S Thu Jun 08 23:26:10 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.2 2000/06/08 22:33:53 bjh21 Exp $ */
+/* $NetBSD: locore.S,v 1.3 2000/06/08 23:26:10 bjh21 Exp $ */
/*
* Copyright (c) 1998, 2000 Ben Harris
* Copyright (C) 1994-1997 Mark Brinicombe
@@ -38,7 +38,7 @@
#include <machine/asm.h>
-RCSID("$NetBSD: locore.S,v 1.2 2000/06/08 22:33:53 bjh21 Exp $")
+RCSID("$NetBSD: locore.S,v 1.3 2000/06/08 23:26:10 bjh21 Exp $")
#include <sys/syscall.h>
#include <machine/armreg.h>
@@ -330,7 +330,7 @@
ENTRY(proc_trampoline)
mov fp, #0 /* Tie knot in top of stack */
mov r0, #0
- bl _C_FUNC(splx) /* spl0() */
+ bl _C_FUNC(lowerspl) /* spl0() */
cmp r4, #0 /* Function to call? */
beq Lproc_trampoline_nofunc
mov r0, r5
diff -r 610a9073984e -r e76ceacf726e sys/arch/arm26/include/spl.h
--- a/sys/arch/arm26/include/spl.h Thu Jun 08 23:25:05 2000 +0000
+++ b/sys/arch/arm26/include/spl.h Thu Jun 08 23:26:10 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spl.h,v 1.2 2000/06/08 10:49:19 bjh21 Exp $ */
+/* $NetBSD: spl.h,v 1.3 2000/06/08 23:26:10 bjh21 Exp $ */
/*-
* Copyright (c) 1998 Ben Harris
* All rights reserved.
@@ -55,11 +55,9 @@
#define IPL_HIGH 12
#define NIPL IPL_HIGH + 1
-#define spl0() splx(IPL_NONE)
#define splsoftnet() raisespl(IPL_SOFTNET)
+#define splsoft() splsoftnet()
#define splsoftclock() raisespl(IPL_SOFTCLOCK)
-#define spllowersoftclock() lowerspl(IPL_SOFTCLOCK)
-#define splsoft() splsoftnet()
#define splbio() raisespl(IPL_BIO)
#define splnet() raisespl(IPL_NET)
#define spltty() raisespl(IPL_TTY)
@@ -67,15 +65,18 @@
#define splaudio() raisespl(IPL_AUDIO)
#define splclock() raisespl(IPL_CLOCK)
#define splstatclock() raisespl(IPL_STATCLOCK)
-#define splhigh() splx(IPL_HIGH)
+#define splhigh() raisespl(IPL_HIGH)
+
+#define spl0() lowerspl(IPL_NONE)
+#define spllowersoftclock() lowerspl(IPL_SOFTCLOCK)
+#define splx(s) lowerspl(s)
#define signotify(p) setsoftast()
#ifdef _KERNEL
#ifndef ASSEMBLER
extern int raisespl(int);
-extern int lowerspl(int);
-extern int splx(int);
+extern void lowerspl(int);
void setsoftnet(void);
void setsoftast(void);
Home |
Main Index |
Thread Index |
Old Index