Wed Jan 25 17:38:09 2012 UTC ()
STACKALIGN(fp) -> STACK_ALIGN(fp, STACK_ALIGNBYTES)
per recent param.h cleanup.


(tsutsui)
diff -r1.13 -r1.14 src/sys/arch/arm/arm/compat_16_machdep.c
diff -r1.40 -r1.41 src/sys/arch/arm/arm/sig_machdep.c

cvs diff -r1.13 -r1.14 src/sys/arch/arm/arm/compat_16_machdep.c (expand / switch to unified diff)

--- src/sys/arch/arm/arm/compat_16_machdep.c 2011/06/30 20:09:19 1.13
+++ src/sys/arch/arm/arm/compat_16_machdep.c 2012/01/25 17:38:09 1.14
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: compat_16_machdep.c,v 1.13 2011/06/30 20:09:19 wiz Exp $ */ 1/* $NetBSD: compat_16_machdep.c,v 1.14 2012/01/25 17:38:09 tsutsui Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1994-1998 Mark Brinicombe. 4 * Copyright (c) 1994-1998 Mark Brinicombe.
5 * Copyright (c) 1994 Brini. 5 * Copyright (c) 1994 Brini.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * This code is derived from software written for Brini by Mark Brinicombe 8 * This code is derived from software written for Brini by Mark Brinicombe
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -32,27 +32,27 @@ @@ -32,27 +32,27 @@
32 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE. 36 * SUCH DAMAGE.
37 * 37 *
38 * Machine dependent functions for kernel setup 38 * Machine dependent functions for kernel setup
39 * 39 *
40 * Created : 17/09/94 40 * Created : 17/09/94
41 */ 41 */
42 42
43 43
44#include <sys/cdefs.h> 44#include <sys/cdefs.h>
45__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.13 2011/06/30 20:09:19 wiz Exp $"); 45__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.14 2012/01/25 17:38:09 tsutsui Exp $");
46 46
47#ifdef _KERNEL_OPT 47#ifdef _KERNEL_OPT
48#include "opt_compat_netbsd.h" 48#include "opt_compat_netbsd.h"
49#include "opt_armfpe.h" 49#include "opt_armfpe.h"
50#endif 50#endif
51 51
52#include <sys/param.h> 52#include <sys/param.h>
53#include <sys/mount.h> /* XXX only needed by syscallargs.h */ 53#include <sys/mount.h> /* XXX only needed by syscallargs.h */
54#include <sys/proc.h> 54#include <sys/proc.h>
55#include <sys/signal.h> 55#include <sys/signal.h>
56#include <sys/syscallargs.h> 56#include <sys/syscallargs.h>
57#include <sys/systm.h> 57#include <sys/systm.h>
58#include <sys/ras.h> 58#include <sys/ras.h>
@@ -92,27 +92,27 @@ sendsig_sigcontext(const ksiginfo_t *ksi @@ -92,27 +92,27 @@ sendsig_sigcontext(const ksiginfo_t *ksi
92 int onstack, error; 92 int onstack, error;
93 int sig = ksi->ksi_signo; 93 int sig = ksi->ksi_signo;
94 u_long code = KSI_TRAPCODE(ksi); 94 u_long code = KSI_TRAPCODE(ksi);
95 sig_t catcher = SIGACTION(p, sig).sa_handler; 95 sig_t catcher = SIGACTION(p, sig).sa_handler;
96 96
97 tf = process_frame(l); 97 tf = process_frame(l);
98 98
99 fp = getframe(l, sig, &onstack); 99 fp = getframe(l, sig, &onstack);
100 100
101 /* make room on the stack */ 101 /* make room on the stack */
102 fp--; 102 fp--;
103 103
104 /* make the stack aligned */ 104 /* make the stack aligned */
105 fp = (void *)STACKALIGN(fp); 105 fp = (void *)STACK_ALIGN(fp, STACK_ALIGNBYTES);
106 106
107 /* Save register context. */ 107 /* Save register context. */
108 frame.sf_sc.sc_r0 = tf->tf_r0; 108 frame.sf_sc.sc_r0 = tf->tf_r0;
109 frame.sf_sc.sc_r1 = tf->tf_r1; 109 frame.sf_sc.sc_r1 = tf->tf_r1;
110 frame.sf_sc.sc_r2 = tf->tf_r2; 110 frame.sf_sc.sc_r2 = tf->tf_r2;
111 frame.sf_sc.sc_r3 = tf->tf_r3; 111 frame.sf_sc.sc_r3 = tf->tf_r3;
112 frame.sf_sc.sc_r4 = tf->tf_r4; 112 frame.sf_sc.sc_r4 = tf->tf_r4;
113 frame.sf_sc.sc_r5 = tf->tf_r5; 113 frame.sf_sc.sc_r5 = tf->tf_r5;
114 frame.sf_sc.sc_r6 = tf->tf_r6; 114 frame.sf_sc.sc_r6 = tf->tf_r6;
115 frame.sf_sc.sc_r7 = tf->tf_r7; 115 frame.sf_sc.sc_r7 = tf->tf_r7;
116 frame.sf_sc.sc_r8 = tf->tf_r8; 116 frame.sf_sc.sc_r8 = tf->tf_r8;
117 frame.sf_sc.sc_r9 = tf->tf_r9; 117 frame.sf_sc.sc_r9 = tf->tf_r9;
118 frame.sf_sc.sc_r10 = tf->tf_r10; 118 frame.sf_sc.sc_r10 = tf->tf_r10;

cvs diff -r1.40 -r1.41 src/sys/arch/arm/arm/sig_machdep.c (expand / switch to unified diff)

--- src/sys/arch/arm/arm/sig_machdep.c 2011/06/30 20:09:19 1.40
+++ src/sys/arch/arm/arm/sig_machdep.c 2012/01/25 17:38:09 1.41
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: sig_machdep.c,v 1.40 2011/06/30 20:09:19 wiz Exp $ */ 1/* $NetBSD: sig_machdep.c,v 1.41 2012/01/25 17:38:09 tsutsui Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1994-1998 Mark Brinicombe. 4 * Copyright (c) 1994-1998 Mark Brinicombe.
5 * Copyright (c) 1994 Brini. 5 * Copyright (c) 1994 Brini.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * This code is derived from software written for Brini by Mark Brinicombe 8 * This code is derived from software written for Brini by Mark Brinicombe
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -34,27 +34,27 @@ @@ -34,27 +34,27 @@
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE. 36 * SUCH DAMAGE.
37 * 37 *
38 * Machine dependent functions for kernel setup 38 * Machine dependent functions for kernel setup
39 * 39 *
40 * Created : 17/09/94 40 * Created : 17/09/94
41 */ 41 */
42 42
43#include "opt_armfpe.h" 43#include "opt_armfpe.h"
44 44
45#include <sys/param.h> 45#include <sys/param.h>
46 46
47__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.40 2011/06/30 20:09:19 wiz Exp $"); 47__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.41 2012/01/25 17:38:09 tsutsui Exp $");
48 48
49#include <sys/mount.h> /* XXX only needed by syscallargs.h */ 49#include <sys/mount.h> /* XXX only needed by syscallargs.h */
50#include <sys/proc.h> 50#include <sys/proc.h>
51#include <sys/signal.h> 51#include <sys/signal.h>
52#include <sys/syscallargs.h> 52#include <sys/syscallargs.h>
53#include <sys/systm.h> 53#include <sys/systm.h>
54#include <sys/ras.h> 54#include <sys/ras.h>
55#include <sys/ucontext.h> 55#include <sys/ucontext.h>
56 56
57#include <arm/armreg.h> 57#include <arm/armreg.h>
58 58
59#include <machine/cpu.h> 59#include <machine/cpu.h>
60#include <machine/frame.h> 60#include <machine/frame.h>
@@ -98,27 +98,27 @@ sendsig_siginfo(const ksiginfo_t *ksi, c @@ -98,27 +98,27 @@ sendsig_siginfo(const ksiginfo_t *ksi, c
98 int onstack, error; 98 int onstack, error;
99 int sig = ksi->ksi_signo; 99 int sig = ksi->ksi_signo;
100 sig_t catcher = SIGACTION(p, sig).sa_handler; 100 sig_t catcher = SIGACTION(p, sig).sa_handler;
101 101
102 /* get the current frame */ 102 /* get the current frame */
103 tf = process_frame(l); 103 tf = process_frame(l);
104 104
105 fp = getframe(l, sig, &onstack); 105 fp = getframe(l, sig, &onstack);
106  106
107 /* make room on the stack */ 107 /* make room on the stack */
108 fp--; 108 fp--;
109  109
110 /* make the stack aligned */ 110 /* make the stack aligned */
111 fp = (struct sigframe_siginfo *)STACKALIGN(fp); 111 fp = (struct sigframe_siginfo *)STACK_ALIGN(fp, STACK_ALIGNBYTES);
112 112
113 /* populate the siginfo frame */ 113 /* populate the siginfo frame */
114 frame.sf_si._info = ksi->ksi_info; 114 frame.sf_si._info = ksi->ksi_info;
115 frame.sf_uc.uc_flags = _UC_SIGMASK; 115 frame.sf_uc.uc_flags = _UC_SIGMASK;
116 frame.sf_uc.uc_sigmask = *mask; 116 frame.sf_uc.uc_sigmask = *mask;
117 frame.sf_uc.uc_link = l->l_ctxlink; 117 frame.sf_uc.uc_link = l->l_ctxlink;
118 frame.sf_uc.uc_flags |= (l->l_sigstk.ss_flags & SS_ONSTACK) 118 frame.sf_uc.uc_flags |= (l->l_sigstk.ss_flags & SS_ONSTACK)
119 ? _UC_SETSTACK : _UC_CLRSTACK; 119 ? _UC_SETSTACK : _UC_CLRSTACK;
120 memset(&frame.sf_uc.uc_stack, 0, sizeof(frame.sf_uc.uc_stack)); 120 memset(&frame.sf_uc.uc_stack, 0, sizeof(frame.sf_uc.uc_stack));
121 sendsig_reset(l, sig); 121 sendsig_reset(l, sig);
122 122
123 mutex_exit(p->p_lock); 123 mutex_exit(p->p_lock);
124 cpu_getmcontext(l, &frame.sf_uc.uc_mcontext, &frame.sf_uc.uc_flags); 124 cpu_getmcontext(l, &frame.sf_uc.uc_mcontext, &frame.sf_uc.uc_flags);