Subject: port-newsmips/8445: missing _spl*() prototype in newsmips/include/intr.h
To: None <gnats-bugs@gnats.netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: netbsd-bugs
Date: 09/19/1999 04:27:47
>Number:         8445
>Category:       port-newsmips
>Synopsis:       missing _spl*() prototype in newsmips/include/intr.h
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-newsmips-maintainer (NetBSD/newsmips Portmaster)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 19 04:05:00 1999
>Last-Modified:
>Originator:     Izumi Tsutsui
>Organization:
Izumi Tsutsui	Himeji City, Japan
>Release:        NetBSD-current 19990918
>Environment:
System: NetBSD 1.4K newsmips on NWS-3470D

>Description:
Some prototype declaration of the functions in mips/locore.s
are missing so newsmips kernel does not compile.

>How-To-Repeat:
Config and make a newsmips kernel.

cc  -O2 -Werror -Wall -Wno-parentheses -Wpointer-arith -Wno-main -G0 \
 -mno-abicalls -mno-half-pic -I. -I../../../../arch -I../../../.. \
-nostdinc -Dnews3400 -DMIPS1 -DCPU_SINGLE -DLKM -DNKMEMCLUSTERS="0x400" \
-DDIAGNOSTIC -DMAXUSERS=16 -D_KERNEL -Dnewsmips \
 -c ../../../../arch/mips/mips/trap.c
cc1: warnings being treated as errors
../../../../arch/mips/mips/trap.c: In function `syscall':
../../../../arch/mips/mips/trap.c:257: warning: implicit declaration of function `_splset'
*** Error code 1

>Fix:
Add declarations in newsmips/include/intr.h as other mips archs.
(or should be in mips/include/intr.h ?)

Index: intr.h
===================================================================
RCS file: /cvs/repository/src/sys/arch/newsmips/include/intr.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 intr.h
--- intr.h	1999/09/11 15:53:15	1.1.1.1
+++ intr.h	1999/09/19 08:04:33
@@ -51,6 +51,14 @@
 #define splclock cpu_spl2
 #define splstatclock cpu_spl2
 
+extern int _splraise __P((int));
+extern int _spllower __P((int));
+extern int _splset __P((int));
+extern int _splget __P((void));
+extern void _splnone __P((void));
+extern void _setsoftintr __P((int));
+extern void _clrsoftintr __P((int));
+
 extern void setsoftnet __P((void)), clearsoftnet __P((void));
 extern void setsoftclock __P((void)), clearsoftclock __P((void));
 

>Audit-Trail:
>Unformatted: