summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-05-21 19:42:08 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-05-21 19:42:08 +0000
commit5785052132ea981fa7a37a802ee141a07453a991 (patch)
tree13d628590364a1e6daec6f3c9bbf5db4e1bb3218 /sys
parentf42e08b4b436132c9165fe158935a2f6422caf91 (diff)
ddb expects the kernel longjmp() to only take a single parameter and always
return 1 since 12+ years, it's about time to fix the offending ports. Reported by Pierre Riteau (firstname.lastname at gmail)
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/hppa/hppa/locore.S4
-rw-r--r--sys/arch/hppa64/hppa64/locore.S4
-rw-r--r--sys/arch/powerpc/powerpc/setjmp.S4
-rw-r--r--sys/arch/solbourne/solbourne/locore.s7
-rw-r--r--sys/arch/sparc/sparc/locore.s7
-rw-r--r--sys/arch/sparc64/sparc64/locore.s9
-rw-r--r--sys/arch/vax/boot/boot/autoconf.c8
-rw-r--r--sys/arch/vax/boot/common/str.S5
-rw-r--r--sys/arch/vax/stand/boot/autoconf.c8
-rw-r--r--sys/arch/vax/stand/common/str.S5
-rw-r--r--sys/arch/vax/vax/subr.s4
11 files changed, 25 insertions, 40 deletions
diff --git a/sys/arch/hppa/hppa/locore.S b/sys/arch/hppa/hppa/locore.S
index fa875d8a35c..1ae594f1485 100644
--- a/sys/arch/hppa/hppa/locore.S
+++ b/sys/arch/hppa/hppa/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.156 2007/10/10 15:53:51 art Exp $ */
+/* $OpenBSD: locore.S,v 1.157 2008/05/21 19:42:05 miod Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -2711,7 +2711,7 @@ LEAF_ENTRY(longjmp)
ldwm 4(arg0),sp /* stack pointer, */
bv 0(rp)
- copy arg1,ret0 /* Move return value to where it belongs. */
+ ldi 1, ret0
EXIT(longjmp)
diff --git a/sys/arch/hppa64/hppa64/locore.S b/sys/arch/hppa64/hppa64/locore.S
index 94035745d1a..59fed31fb35 100644
--- a/sys/arch/hppa64/hppa64/locore.S
+++ b/sys/arch/hppa64/hppa64/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.7 2008/04/20 17:11:24 kettenis Exp $ */
+/* $OpenBSD: locore.S,v 1.8 2008/05/21 19:42:07 miod Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -1457,7 +1457,7 @@ LEAF_ENTRY(longjmp)
ldd,ma 8(%arg0), %r27
bv %r0(%rp)
- copy %arg1, %ret0
+ ldi 1, %ret0
EXIT(longjmp)
/*
diff --git a/sys/arch/powerpc/powerpc/setjmp.S b/sys/arch/powerpc/powerpc/setjmp.S
index db963d7ba05..c8f067c1254 100644
--- a/sys/arch/powerpc/powerpc/setjmp.S
+++ b/sys/arch/powerpc/powerpc/setjmp.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: setjmp.S,v 1.8 2003/10/15 02:41:50 drahn Exp $ */
+/* $OpenBSD: setjmp.S,v 1.9 2008/05/21 19:42:07 miod Exp $ */
/* kernel version of this file, does not have signal goop */
/* int setjmp(jmp_buf env) */
@@ -121,5 +121,5 @@ ENTRY(_C_LABEL(longjmp))
lwz %r0, JMP_xer(%r3)
mtxer %r0
/* f14-f31, fpscr */
- mr %r3, %r4
+ li %r3, 1
blr
diff --git a/sys/arch/solbourne/solbourne/locore.s b/sys/arch/solbourne/solbourne/locore.s
index 0c8666cb599..90aae122272 100644
--- a/sys/arch/solbourne/solbourne/locore.s
+++ b/sys/arch/solbourne/solbourne/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.9 2007/10/10 15:53:52 art Exp $ */
+/* $OpenBSD: locore.s,v 1.10 2008/05/21 19:42:07 miod Exp $ */
/* OpenBSD: locore.s,v 1.64 2005/04/17 18:47:50 miod Exp */
/*
@@ -4736,10 +4736,7 @@ Lpanic_ljmp:
_ALIGN
ENTRY(longjmp)
- addcc %o1, %g0, %g6 ! compute v ? v : 1 in a global register
- be,a 0f
- mov 1, %g6
-0:
+ mov 1, %g6
mov %o0, %g1 ! save a in another global register
ld [%g1+8], %g7 /* get caller's frame */
1:
diff --git a/sys/arch/sparc/sparc/locore.s b/sys/arch/sparc/sparc/locore.s
index 3a3102ee20a..2c123ea86cb 100644
--- a/sys/arch/sparc/sparc/locore.s
+++ b/sys/arch/sparc/sparc/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.77 2008/03/23 12:06:45 miod Exp $ */
+/* $OpenBSD: locore.s,v 1.78 2008/05/21 19:42:07 miod Exp $ */
/* $NetBSD: locore.s,v 1.73 1997/09/13 20:36:48 pk Exp $ */
/*
@@ -6116,10 +6116,7 @@ Lpanic_ljmp:
_ALIGN
ENTRY(longjmp)
- addcc %o1, %g0, %g6 ! compute v ? v : 1 in a global register
- be,a 0f
- mov 1, %g6
-0:
+ mov 1, %g6
mov %o0, %g1 ! save a in another global register
ld [%g1+8], %g7 /* get caller's frame */
1:
diff --git a/sys/arch/sparc64/sparc64/locore.s b/sys/arch/sparc64/sparc64/locore.s
index ff12401c558..9cfd8e8e038 100644
--- a/sys/arch/sparc64/sparc64/locore.s
+++ b/sys/arch/sparc64/sparc64/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.137 2008/04/20 10:35:57 kettenis Exp $ */
+/* $OpenBSD: locore.s,v 1.138 2008/05/21 19:42:07 miod Exp $ */
/* $NetBSD: locore.s,v 1.137 2001/08/13 06:10:10 jdolecek Exp $ */
/*
@@ -9002,18 +9002,11 @@ ENTRY(setjmp)
ret
restore %g0, 0, %o0
- .data
-Lpanic_ljmp:
- .asciz "longjmp botch"
- _ALIGN
- .text
-
ENTRY(longjmp)
save %sp, -CC64FSZ, %sp ! prepare to restore to (old) frame
flushw
mov 1, %i2
ldx [%i0+0], %fp ! get return stack
- movrz %i1, %i1, %i2 ! compute v ? v : 1
ldx [%i0+8], %i7 ! get rpc
ret
restore %i2, 0, %o0
diff --git a/sys/arch/vax/boot/boot/autoconf.c b/sys/arch/vax/boot/boot/autoconf.c
index 895e154fd31..8b20a30b1af 100644
--- a/sys/arch/vax/boot/boot/autoconf.c
+++ b/sys/arch/vax/boot/boot/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.9 2003/08/15 23:16:30 deraadt Exp $ */
+/* $OpenBSD: autoconf.c,v 1.10 2008/05/21 19:42:07 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.19 2002/06/01 15:33:22 ragge Exp $ */
/*
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
@@ -51,7 +51,7 @@ void consinit(void);
void scbinit(void);
int getsecs(void);
void scb_stray(void *);
-void longjmp(int *, int);
+void longjmp(int *);
void rtimer(void *);
long *bootregs;
@@ -144,7 +144,7 @@ mcheck(void *arg)
off = (mfp[7]/4 + 8);
printf("Machine check, pc=%x, psl=%x\n", mfp[off], mfp[off+1]);
- longjmp(jbuf, 1);
+ longjmp(jbuf);
}
/*
@@ -201,7 +201,7 @@ rtimer(void *arg)
int nu = sluttid - getsecs();
if (senast != nu) {
mtpr(20, PR_IPL);
- longjmp(jbuf, 1);
+ longjmp(jbuf);
}
}
}
diff --git a/sys/arch/vax/boot/common/str.S b/sys/arch/vax/boot/common/str.S
index e88cb9ca9ce..1425fd1121c 100644
--- a/sys/arch/vax/boot/common/str.S
+++ b/sys/arch/vax/boot/common/str.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: str.S,v 1.1 2002/06/11 09:36:24 hugh Exp $ */
+/* $OpenBSD: str.S,v 1.2 2008/05/21 19:42:07 miod Exp $ */
/* $NetBSD: str.S,v 1.1 2002/02/24 01:04:25 matt Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -157,9 +157,8 @@ ENTRY(setjmp, 0)
ENTRY(longjmp, 0)
movl 4(ap), r1
- movl 8(ap), r0
+ movl $1, r0
movl (r1), ap
movl 4(r1), fp
movl 12(r1), sp
jmp *8(r1)
-
diff --git a/sys/arch/vax/stand/boot/autoconf.c b/sys/arch/vax/stand/boot/autoconf.c
index 895e154fd31..8b20a30b1af 100644
--- a/sys/arch/vax/stand/boot/autoconf.c
+++ b/sys/arch/vax/stand/boot/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.9 2003/08/15 23:16:30 deraadt Exp $ */
+/* $OpenBSD: autoconf.c,v 1.10 2008/05/21 19:42:07 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.19 2002/06/01 15:33:22 ragge Exp $ */
/*
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
@@ -51,7 +51,7 @@ void consinit(void);
void scbinit(void);
int getsecs(void);
void scb_stray(void *);
-void longjmp(int *, int);
+void longjmp(int *);
void rtimer(void *);
long *bootregs;
@@ -144,7 +144,7 @@ mcheck(void *arg)
off = (mfp[7]/4 + 8);
printf("Machine check, pc=%x, psl=%x\n", mfp[off], mfp[off+1]);
- longjmp(jbuf, 1);
+ longjmp(jbuf);
}
/*
@@ -201,7 +201,7 @@ rtimer(void *arg)
int nu = sluttid - getsecs();
if (senast != nu) {
mtpr(20, PR_IPL);
- longjmp(jbuf, 1);
+ longjmp(jbuf);
}
}
}
diff --git a/sys/arch/vax/stand/common/str.S b/sys/arch/vax/stand/common/str.S
index e88cb9ca9ce..1425fd1121c 100644
--- a/sys/arch/vax/stand/common/str.S
+++ b/sys/arch/vax/stand/common/str.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: str.S,v 1.1 2002/06/11 09:36:24 hugh Exp $ */
+/* $OpenBSD: str.S,v 1.2 2008/05/21 19:42:07 miod Exp $ */
/* $NetBSD: str.S,v 1.1 2002/02/24 01:04:25 matt Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -157,9 +157,8 @@ ENTRY(setjmp, 0)
ENTRY(longjmp, 0)
movl 4(ap), r1
- movl 8(ap), r0
+ movl $1, r0
movl (r1), ap
movl 4(r1), fp
movl 12(r1), sp
jmp *8(r1)
-
diff --git a/sys/arch/vax/vax/subr.s b/sys/arch/vax/vax/subr.s
index b0ca031e3d2..68142c7d485 100644
--- a/sys/arch/vax/vax/subr.s
+++ b/sys/arch/vax/vax/subr.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr.s,v 1.27 2007/10/10 15:53:53 art Exp $ */
+/* $OpenBSD: subr.s,v 1.28 2008/05/21 19:42:07 miod Exp $ */
/* $NetBSD: subr.s,v 1.32 1999/03/25 00:41:48 mrg Exp $ */
/*
@@ -232,7 +232,7 @@ ENTRY(setjmp, 0)
ENTRY(longjmp, 0)
movl 4(ap), r1
- movl 8(ap), r0
+ movl $1, r0
movl (r1), ap
movl 4(r1), fp
movl 12(r1), sp