Module Name: src
Committed By: uebayasi
Date: Tue Sep 8 07:46:14 UTC 2009
Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: mips_machdep.c vm_machdep.c
Log Message:
To be consistent, always cast pointers to (intptr_t) even if the address is
in userspace.
Reviewed By: matt
To generate a diff of this commit:
cvs rdiff -u -r1.205.4.1.2.1.2.5 -r1.205.4.1.2.1.2.6 \
src/sys/arch/mips/mips/mips_machdep.c
cvs rdiff -u -r1.121.6.1.2.4 -r1.121.6.1.2.5 \
src/sys/arch/mips/mips/vm_machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/mips/mips/mips_machdep.c
diff -u src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.5 src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.6
--- src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.5 Mon Sep 7 22:27:30 2009
+++ src/sys/arch/mips/mips/mips_machdep.c Tue Sep 8 07:46:14 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: mips_machdep.c,v 1.205.4.1.2.1.2.5 2009/09/07 22:27:30 matt Exp $ */
+/* $NetBSD: mips_machdep.c,v 1.205.4.1.2.1.2.6 2009/09/08 07:46:14 uebayasi Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -112,7 +112,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.205.4.1.2.1.2.5 2009/09/07 22:27:30 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.205.4.1.2.1.2.6 2009/09/08 07:46:14 uebayasi Exp $");
#include "opt_cputype.h"
@@ -1138,7 +1138,7 @@
* vectors. They are fixed up by ld.elf_so.
* - ps_strings is a NetBSD extension.
*/
- f->f_regs[_R_A0] = (uintptr_t)stack;
+ f->f_regs[_R_A0] = (intptr_t)stack;
f->f_regs[_R_A1] = 0;
f->f_regs[_R_A2] = 0;
f->f_regs[_R_A3] = (intptr_t)l->l_proc->p_psstr;
@@ -1827,15 +1827,15 @@
/* NOTREACHED */
}
- f->f_regs[_R_PC] = (uintptr_t)upcall;
- f->f_regs[_R_SP] = (uintptr_t)sf;
+ f->f_regs[_R_PC] = (intptr_t)upcall;
+ f->f_regs[_R_SP] = (intptr_t)sf;
f->f_regs[_R_A0] = type;
- f->f_regs[_R_A1] = (uintptr_t)sas;
+ f->f_regs[_R_A1] = (intptr_t)sas;
f->f_regs[_R_A2] = nevents;
f->f_regs[_R_A3] = ninterrupted;
f->f_regs[_R_S8] = 0;
f->f_regs[_R_RA] = 0;
- f->f_regs[_R_T9] = (uintptr_t)upcall; /* t9=Upcall function*/
+ f->f_regs[_R_T9] = (intptr_t)upcall; /* t9=Upcall function*/
}
Index: src/sys/arch/mips/mips/vm_machdep.c
diff -u src/sys/arch/mips/mips/vm_machdep.c:1.121.6.1.2.4 src/sys/arch/mips/mips/vm_machdep.c:1.121.6.1.2.5
--- src/sys/arch/mips/mips/vm_machdep.c:1.121.6.1.2.4 Mon Sep 7 21:54:39 2009
+++ src/sys/arch/mips/mips/vm_machdep.c Tue Sep 8 07:46:14 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.121.6.1.2.4 2009/09/07 21:54:39 matt Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.121.6.1.2.5 2009/09/08 07:46:14 uebayasi Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -80,7 +80,7 @@
#include "opt_coredump.h"
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.121.6.1.2.4 2009/09/07 21:54:39 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.121.6.1.2.5 2009/09/08 07:46:14 uebayasi Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -159,7 +159,7 @@
* If specified, give the child a different stack.
*/
if (stack != NULL)
- f->f_regs[_R_SP] = (uintptr_t)stack + stacksize;
+ f->f_regs[_R_SP] = (intptr_t)stack + stacksize;
l2->l_md.md_regs = f;
l2->l_md.md_flags = l1->l_md.md_flags & MDP_FPUSED;