svn commit: r204391 - in user/jmallett/octeon/sys: ddb mips/mips
ufs/ffs
Juli Mallett
jmallett at FreeBSD.org
Sat Feb 27 03:38:39 UTC 2010
Author: jmallett
Date: Sat Feb 27 03:38:38 2010
New Revision: 204391
URL: http://svn.freebsd.org/changeset/base/204391
Log:
Make ddb commands take an address as an intptr_t, not a db_expr_t. It is
possible to have 32-bit pointers and 64-bit registers and thus a 64-bit
db_expr_t.
Likewise make casts between pointers and register_t go through intptr_t to
be sure to sign extend properly, since register_t may be larger.
Modified:
user/jmallett/octeon/sys/ddb/db_break.c
user/jmallett/octeon/sys/ddb/db_capture.c
user/jmallett/octeon/sys/ddb/db_command.c
user/jmallett/octeon/sys/ddb/db_examine.c
user/jmallett/octeon/sys/ddb/db_main.c
user/jmallett/octeon/sys/ddb/db_print.c
user/jmallett/octeon/sys/ddb/db_ps.c
user/jmallett/octeon/sys/ddb/db_run.c
user/jmallett/octeon/sys/ddb/db_script.c
user/jmallett/octeon/sys/ddb/db_sym.c
user/jmallett/octeon/sys/ddb/db_textdump.c
user/jmallett/octeon/sys/ddb/db_thread.c
user/jmallett/octeon/sys/ddb/db_variables.c
user/jmallett/octeon/sys/ddb/db_watch.c
user/jmallett/octeon/sys/ddb/db_write_cmd.c
user/jmallett/octeon/sys/ddb/ddb.h
user/jmallett/octeon/sys/mips/mips/db_interface.c
user/jmallett/octeon/sys/mips/mips/db_trace.c
user/jmallett/octeon/sys/mips/mips/pm_machdep.c
user/jmallett/octeon/sys/mips/mips/stack_machdep.c
user/jmallett/octeon/sys/mips/mips/trap.c
user/jmallett/octeon/sys/mips/mips/vm_machdep.c
user/jmallett/octeon/sys/ufs/ffs/ffs_softdep.c
Modified: user/jmallett/octeon/sys/ddb/db_break.c
==============================================================================
--- user/jmallett/octeon/sys/ddb/db_break.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/ddb/db_break.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -281,7 +281,7 @@ db_list_breakpoints()
/*ARGSUSED*/
void
db_delete_cmd(addr, have_addr, count, modif)
- db_expr_t addr;
+ intptr_t addr;
boolean_t have_addr;
db_expr_t count;
char * modif;
@@ -293,7 +293,7 @@ db_delete_cmd(addr, have_addr, count, mo
/*ARGSUSED*/
void
db_breakpoint_cmd(addr, have_addr, count, modif)
- db_expr_t addr;
+ intptr_t addr;
boolean_t have_addr;
db_expr_t count;
char * modif;
@@ -307,7 +307,7 @@ db_breakpoint_cmd(addr, have_addr, count
/* list breakpoints */
void
db_listbreak_cmd(dummy1, dummy2, dummy3, dummy4)
- db_expr_t dummy1;
+ intptr_t dummy1;
boolean_t dummy2;
db_expr_t dummy3;
char * dummy4;
Modified: user/jmallett/octeon/sys/ddb/db_capture.c
==============================================================================
--- user/jmallett/octeon/sys/ddb/db_capture.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/ddb/db_capture.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -331,7 +331,7 @@ db_capture_usage(void)
}
void
-db_capture_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
+db_capture_cmd(intptr_t addr, boolean_t have_addr, db_expr_t count,
char *modif)
{
int t;
Modified: user/jmallett/octeon/sys/ddb/db_command.c
==============================================================================
--- user/jmallett/octeon/sys/ddb/db_command.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/ddb/db_command.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -539,7 +539,7 @@ typedef db_expr_t __db_f(db_expr_t, db_e
static __inline int
db_fncall_generic(db_expr_t addr, db_expr_t *rv, int nargs, db_expr_t args[])
{
- __db_f *f = (__db_f *)addr;
+ __db_f *f = (__db_f *)(intptr_t)addr;
if (nargs > 10) {
db_printf("Too many arguments (max 10)\n");
@@ -552,7 +552,7 @@ db_fncall_generic(db_expr_t addr, db_exp
static void
db_fncall(dummy1, dummy2, dummy3, dummy4)
- db_expr_t dummy1;
+ intptr_t dummy1;
boolean_t dummy2;
db_expr_t dummy3;
char * dummy4;
@@ -602,7 +602,7 @@ db_fncall(dummy1, dummy2, dummy3, dummy4
}
static void
-db_halt(db_expr_t dummy, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
+db_halt(intptr_t dummy, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
{
cpu_halt();
@@ -610,7 +610,7 @@ db_halt(db_expr_t dummy, boolean_t dummy
static void
db_kill(dummy1, dummy2, dummy3, dummy4)
- db_expr_t dummy1;
+ intptr_t dummy1;
boolean_t dummy2;
db_expr_t dummy3;
char * dummy4;
@@ -663,7 +663,7 @@ out:
static void
db_reset(dummy1, dummy2, dummy3, dummy4)
- db_expr_t dummy1;
+ intptr_t dummy1;
boolean_t dummy2;
db_expr_t dummy3;
char * dummy4;
@@ -674,7 +674,7 @@ db_reset(dummy1, dummy2, dummy3, dummy4)
static void
db_watchdog(dummy1, dummy2, dummy3, dummy4)
- db_expr_t dummy1;
+ intptr_t dummy1;
boolean_t dummy2;
db_expr_t dummy3;
char * dummy4;
@@ -691,7 +691,7 @@ db_watchdog(dummy1, dummy2, dummy3, dumm
}
static void
-db_gdb(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
+db_gdb(intptr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
{
if (kdb_dbbe_select("gdb") != 0)
@@ -701,9 +701,11 @@ db_gdb(db_expr_t dummy1, boolean_t dummy
}
static void
-db_stack_trace(db_expr_t tid, boolean_t hastid, db_expr_t count, char *modif)
+db_stack_trace(intptr_t addr, boolean_t hasaddr, db_expr_t count, char *modif)
{
struct thread *td;
+ boolean_t hastid;
+ db_expr_t tid;
db_expr_t radix;
pid_t pid;
int t;
@@ -747,7 +749,7 @@ db_stack_trace(db_expr_t tid, boolean_t
}
static void
-db_stack_trace_all(db_expr_t dummy, boolean_t dummy2, db_expr_t dummy3,
+db_stack_trace_all(intptr_t dummy, boolean_t dummy2, db_expr_t dummy3,
char *dummy4)
{
struct proc *p;
Modified: user/jmallett/octeon/sys/ddb/db_examine.c
==============================================================================
--- user/jmallett/octeon/sys/ddb/db_examine.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/ddb/db_examine.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -53,7 +53,7 @@ static void db_search(db_addr_t, int, db
/*ARGSUSED*/
void
db_examine_cmd(addr, have_addr, count, modif)
- db_expr_t addr;
+ intptr_t addr;
boolean_t have_addr;
db_expr_t count;
char * modif;
@@ -198,7 +198,7 @@ static char db_print_format = 'x';
/*ARGSUSED*/
void
db_print_cmd(addr, have_addr, count, modif)
- db_expr_t addr;
+ intptr_t addr;
boolean_t have_addr;
db_expr_t count;
char * modif;
@@ -256,7 +256,7 @@ db_print_loc_and_inst(loc)
*/
void
db_search_cmd(dummy1, dummy2, dummy3, dummy4)
- db_expr_t dummy1;
+ intptr_t dummy1;
boolean_t dummy2;
db_expr_t dummy3;
char * dummy4;
Modified: user/jmallett/octeon/sys/ddb/db_main.c
==============================================================================
--- user/jmallett/octeon/sys/ddb/db_main.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/ddb/db_main.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -156,7 +156,7 @@ X_db_symbol_values(db_symtab_t *symtab,
if (namep != NULL)
*namep = (const char*)lval.name;
if (valp != NULL)
- *valp = (db_expr_t)lval.value;
+ *valp = (db_expr_t)(intptr_t)lval.value;
} else {
if (namep != NULL)
*namep = (const char *)symtab->private +
Modified: user/jmallett/octeon/sys/ddb/db_print.c
==============================================================================
--- user/jmallett/octeon/sys/ddb/db_print.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/ddb/db_print.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
#include <ddb/db_sym.h>
void
-db_show_regs(db_expr_t _1, boolean_t _2, db_expr_t _3, char *_4)
+db_show_regs(intptr_t _1, boolean_t _2, db_expr_t _3, char *_4)
{
struct db_variable *regp;
db_expr_t value, offset;
Modified: user/jmallett/octeon/sys/ddb/db_ps.c
==============================================================================
--- user/jmallett/octeon/sys/ddb/db_ps.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/ddb/db_ps.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -75,7 +75,7 @@ DB_SHOW_ALL_COMMAND(procs, db_procs_cmd)
* characters.
*/
void
-db_ps(db_expr_t addr, boolean_t hasaddr, db_expr_t count, char *modif)
+db_ps(intptr_t addr, boolean_t hasaddr, db_expr_t count, char *modif)
{
volatile struct proc *p, *pp;
volatile struct thread *td;
Modified: user/jmallett/octeon/sys/ddb/db_run.c
==============================================================================
--- user/jmallett/octeon/sys/ddb/db_run.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/ddb/db_run.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -302,7 +302,7 @@ extern int db_cmd_loop_done;
/*ARGSUSED*/
void
db_single_step_cmd(addr, have_addr, count, modif)
- db_expr_t addr;
+ intptr_t addr;
boolean_t have_addr;
db_expr_t count;
char * modif;
@@ -329,7 +329,7 @@ db_single_step_cmd(addr, have_addr, coun
/*ARGSUSED*/
void
db_trace_until_call_cmd(addr, have_addr, count, modif)
- db_expr_t addr;
+ intptr_t addr;
boolean_t have_addr;
db_expr_t count;
char * modif;
@@ -351,7 +351,7 @@ db_trace_until_call_cmd(addr, have_addr,
/*ARGSUSED*/
void
db_trace_until_matching_cmd(addr, have_addr, count, modif)
- db_expr_t addr;
+ intptr_t addr;
boolean_t have_addr;
db_expr_t count;
char * modif;
@@ -375,7 +375,7 @@ db_trace_until_matching_cmd(addr, have_a
/*ARGSUSED*/
void
db_continue_cmd(addr, have_addr, count, modif)
- db_expr_t addr;
+ intptr_t addr;
boolean_t have_addr;
db_expr_t count;
char * modif;
Modified: user/jmallett/octeon/sys/ddb/db_script.c
==============================================================================
--- user/jmallett/octeon/sys/ddb/db_script.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/ddb/db_script.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -339,7 +339,7 @@ db_script_kdbenter(const char *eventname
* List scripts and their contents.
*/
void
-db_scripts_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
+db_scripts_cmd(intptr_t addr, boolean_t have_addr, db_expr_t count,
char *modif)
{
int i;
@@ -357,7 +357,7 @@ db_scripts_cmd(db_expr_t addr, boolean_t
* Execute a script.
*/
void
-db_run_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif)
+db_run_cmd(intptr_t addr, boolean_t have_addr, db_expr_t count, char *modif)
{
int t;
@@ -381,7 +381,7 @@ db_run_cmd(db_expr_t addr, boolean_t hav
* we do not wish to use db_lex's token processing.
*/
void
-db_script_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
+db_script_cmd(intptr_t addr, boolean_t have_addr, db_expr_t count,
char *modif)
{
char *buf, scriptname[DB_MAXSCRIPTNAME];
@@ -427,7 +427,7 @@ db_script_cmd(db_expr_t addr, boolean_t
* Remove a named script.
*/
void
-db_unscript_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
+db_unscript_cmd(intptr_t addr, boolean_t have_addr, db_expr_t count,
char *modif)
{
int error, t;
Modified: user/jmallett/octeon/sys/ddb/db_sym.c
==============================================================================
--- user/jmallett/octeon/sys/ddb/db_sym.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/ddb/db_sym.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -394,7 +394,7 @@ db_search_symbol( val, strategy, offp)
{
register
unsigned int diff;
- size_t newdiff;
+ db_expr_t newdiff;
register int i;
c_db_sym_t ret = C_DB_SYM_NULL, sym;
Modified: user/jmallett/octeon/sys/ddb/db_textdump.c
==============================================================================
--- user/jmallett/octeon/sys/ddb/db_textdump.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/ddb/db_textdump.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -503,7 +503,7 @@ db_textdump_usage(void)
}
void
-db_textdump_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
+db_textdump_cmd(intptr_t addr, boolean_t have_addr, db_expr_t count,
char *modif)
{
int t;
Modified: user/jmallett/octeon/sys/ddb/db_thread.c
==============================================================================
--- user/jmallett/octeon/sys/ddb/db_thread.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/ddb/db_thread.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -52,9 +52,11 @@ db_print_thread(void)
}
void
-db_set_thread(db_expr_t tid, boolean_t hastid, db_expr_t cnt, char *mod)
+db_set_thread(intptr_t addr, boolean_t hasaddr, db_expr_t cnt, char *mod)
{
struct thread *thr;
+ boolean_t hastid;
+ db_expr_t tid;
db_expr_t radix;
int err;
@@ -88,7 +90,7 @@ db_set_thread(db_expr_t tid, boolean_t h
}
void
-db_show_threads(db_expr_t addr, boolean_t hasaddr, db_expr_t cnt, char *mod)
+db_show_threads(intptr_t addr, boolean_t hasaddr, db_expr_t cnt, char *mod)
{
jmp_buf jb;
void *prev_jb;
@@ -141,7 +143,7 @@ hex2dec(db_expr_t expr)
* process. Otherwise, we treat the addr as a pointer to a thread.
*/
struct thread *
-db_lookup_thread(db_expr_t addr, boolean_t check_pid)
+db_lookup_thread(intptr_t addr, boolean_t check_pid)
{
struct thread *td;
db_expr_t decaddr;
@@ -178,7 +180,7 @@ db_lookup_thread(db_expr_t addr, boolean
* If that fails we treat the addr as a pointer to a process.
*/
struct proc *
-db_lookup_proc(db_expr_t addr)
+db_lookup_proc(intptr_t addr)
{
db_expr_t decaddr;
struct proc *p;
Modified: user/jmallett/octeon/sys/ddb/db_variables.c
==============================================================================
--- user/jmallett/octeon/sys/ddb/db_variables.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/ddb/db_variables.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -128,7 +128,7 @@ db_write_variable(struct db_variable *vp
}
void
-db_set_cmd(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
+db_set_cmd(intptr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
{
struct db_variable *vp;
db_expr_t value;
Modified: user/jmallett/octeon/sys/ddb/db_watch.c
==============================================================================
--- user/jmallett/octeon/sys/ddb/db_watch.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/ddb/db_watch.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -190,7 +190,7 @@ db_list_watchpoints()
/*ARGSUSED*/
void
db_deletewatch_cmd(addr, have_addr, count, modif)
- db_expr_t addr;
+ intptr_t addr;
boolean_t have_addr;
db_expr_t count;
char * modif;
@@ -202,7 +202,7 @@ db_deletewatch_cmd(addr, have_addr, coun
/*ARGSUSED*/
void
db_watchpoint_cmd(addr, have_addr, count, modif)
- db_expr_t addr;
+ intptr_t addr;
boolean_t have_addr;
db_expr_t count;
char * modif;
@@ -296,7 +296,7 @@ db_find_watchpoint(map, addr, regs)
/*ARGSUSED*/
void
db_deletehwatch_cmd(addr, have_addr, count, modif)
- db_expr_t addr;
+ intptr_t addr;
boolean_t have_addr;
db_expr_t count;
char * modif;
@@ -315,7 +315,7 @@ db_deletehwatch_cmd(addr, have_addr, cou
/*ARGSUSED*/
void
db_hwatchpoint_cmd(addr, have_addr, count, modif)
- db_expr_t addr;
+ intptr_t addr;
boolean_t have_addr;
db_expr_t count;
char * modif;
Modified: user/jmallett/octeon/sys/ddb/db_write_cmd.c
==============================================================================
--- user/jmallett/octeon/sys/ddb/db_write_cmd.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/ddb/db_write_cmd.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$");
/*ARGSUSED*/
void
db_write_cmd(address, have_addr, count, modif)
- db_expr_t address;
+ intptr_t address;
boolean_t have_addr;
db_expr_t count;
char * modif;
Modified: user/jmallett/octeon/sys/ddb/ddb.h
==============================================================================
--- user/jmallett/octeon/sys/ddb/ddb.h Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/ddb/ddb.h Sat Feb 27 03:38:38 2010 (r204391)
@@ -94,7 +94,7 @@ extern struct command_table db_show_all_
/*
* Type signature for a function implementing a ddb command.
*/
-typedef void db_cmdfcn_t(db_expr_t addr, boolean_t have_addr, db_expr_t count,
+typedef void db_cmdfcn_t(intptr_t addr, boolean_t have_addr, db_expr_t count,
char *modif);
/*
@@ -149,7 +149,7 @@ SYSUNINIT(__CONCAT(_name,_suffix), SI_SU
static db_cmdfcn_t _func; \
_DB_SET(_suffix, _name, _func, list, _flag, _more); \
static void \
-_func(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif)
+_func(intptr_t addr, boolean_t have_addr, db_expr_t count, char *modif)
/* common idom provided for backwards compatibility */
#define DB_FUNC(_name, _func, list, _flag, _more) \
@@ -190,13 +190,13 @@ void db_error(const char *s);
int db_expression(db_expr_t *valuep);
int db_get_variable(db_expr_t *valuep);
void db_iprintf(const char *,...) __printflike(1, 2);
-struct proc *db_lookup_proc(db_expr_t addr);
-struct thread *db_lookup_thread(db_expr_t addr, boolean_t check_pid);
+struct proc *db_lookup_proc(intptr_t addr);
+struct thread *db_lookup_thread(intptr_t addr, boolean_t check_pid);
struct vm_map *db_map_addr(vm_offset_t);
boolean_t db_map_current(struct vm_map *);
boolean_t db_map_equal(struct vm_map *, struct vm_map *);
-int db_md_set_watchpoint(db_expr_t addr, db_expr_t size);
-int db_md_clr_watchpoint(db_expr_t addr, db_expr_t size);
+int db_md_set_watchpoint(intptr_t addr, db_expr_t size);
+int db_md_clr_watchpoint(intptr_t addr, db_expr_t size);
void db_md_list_watchpoints(void);
void db_print_loc_and_inst(db_addr_t loc);
void db_print_thread(void);
Modified: user/jmallett/octeon/sys/mips/mips/db_interface.c
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/db_interface.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/mips/mips/db_interface.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -120,7 +120,7 @@ db_frame(struct db_variable *vp, db_expr
if (kdb_frame == NULL)
return (0);
- reg = (int *)((uintptr_t)kdb_frame + (db_expr_t)vp->valuep);
+ reg = (int *)((uintptr_t)kdb_frame + (size_t)(intptr_t)vp->valuep);
if (op == DB_VAR_GET)
*valuep = *reg;
else
Modified: user/jmallett/octeon/sys/mips/mips/db_trace.c
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/db_trace.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/mips/mips/db_trace.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -266,27 +266,27 @@ loop:
mask |= (1 << i.IType.rt);
switch (i.IType.rt) {
case 4:/* a0 */
- args[0] = kdbpeek((int *)(sp + (short)i.IType.imm));
+ args[0] = kdbpeek((int *)((intptr_t)sp + (short)i.IType.imm));
valid_args[0] = 1;
break;
case 5:/* a1 */
- args[1] = kdbpeek((int *)(sp + (short)i.IType.imm));
+ args[1] = kdbpeek((int *)((intptr_t)sp + (short)i.IType.imm));
valid_args[1] = 1;
break;
case 6:/* a2 */
- args[2] = kdbpeek((int *)(sp + (short)i.IType.imm));
+ args[2] = kdbpeek((int *)((intptr_t)sp + (short)i.IType.imm));
valid_args[2] = 1;
break;
case 7:/* a3 */
- args[3] = kdbpeek((int *)(sp + (short)i.IType.imm));
+ args[3] = kdbpeek((int *)((intptr_t)sp + (short)i.IType.imm));
valid_args[3] = 1;
break;
case 31: /* ra */
- ra = kdbpeek((int *)(sp + (short)i.IType.imm));
+ ra = kdbpeek((int *)((intptr_t)sp + (short)i.IType.imm));
}
break;
@@ -300,27 +300,27 @@ loop:
mask |= (1 << i.IType.rt);
switch (i.IType.rt) {
case 4:/* a0 */
- args[0] = kdbpeekD((int *)(sp + (short)i.IType.imm));
+ args[0] = kdbpeekD((int *)((intptr_t)sp + (short)i.IType.imm));
valid_args[0] = 1;
break;
case 5:/* a1 */
- args[1] = kdbpeekD((int *)(sp + (short)i.IType.imm));
+ args[1] = kdbpeekD((int *)((intptr_t)sp + (short)i.IType.imm));
valid_args[1] = 1;
break;
case 6:/* a2 */
- args[2] = kdbpeekD((int *)(sp + (short)i.IType.imm));
+ args[2] = kdbpeekD((int *)((intptr_t)sp + (short)i.IType.imm));
valid_args[2] = 1;
break;
case 7:/* a3 */
- args[3] = kdbpeekD((int *)(sp + (short)i.IType.imm));
+ args[3] = kdbpeekD((int *)((intptr_t)sp + (short)i.IType.imm));
valid_args[3] = 1;
break;
case 31: /* ra */
- ra = kdbpeekD((int *)(sp + (short)i.IType.imm));
+ ra = kdbpeekD((int *)((intptr_t)sp + (short)i.IType.imm));
}
break;
@@ -366,7 +366,7 @@ finish:
int
-db_md_set_watchpoint(db_expr_t addr, db_expr_t size)
+db_md_set_watchpoint(intptr_t addr, db_expr_t size)
{
return(0);
@@ -374,7 +374,7 @@ db_md_set_watchpoint(db_expr_t addr, db_
int
-db_md_clr_watchpoint( db_expr_t addr, db_expr_t size)
+db_md_clr_watchpoint(intptr_t addr, db_expr_t size)
{
return(0);
@@ -400,8 +400,8 @@ db_trace_thread(struct thread *thr, int
struct pcb *ctx;
if (thr == curthread) {
- sp = (register_t)__builtin_frame_address(0);
- ra = (register_t)__builtin_return_address(0);
+ sp = (register_t)(intptr_t)__builtin_frame_address(0);
+ ra = (register_t)(intptr_t)__builtin_return_address(0);
__asm __volatile(
"jal 99f\n"
Modified: user/jmallett/octeon/sys/mips/mips/pm_machdep.c
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/pm_machdep.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/mips/mips/pm_machdep.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -140,16 +140,16 @@ sendsig(sig_t catcher, ksiginfo_t *ksi,
/* Build the argument list for the signal handler. */
regs->a0 = sig;
- regs->a2 = (register_t)&sfp->sf_uc;
+ regs->a2 = (register_t)(intptr_t)&sfp->sf_uc;
if (SIGISMEMBER(psp->ps_siginfo, sig)) {
/* Signal handler installed with SA_SIGINFO. */
- regs->a1 = (register_t)&sfp->sf_si;
+ regs->a1 = (register_t)(intptr_t)&sfp->sf_si;
/* sf.sf_ahu.sf_action = (__siginfohandler_t *)catcher; */
/* fill siginfo structure */
sf.sf_si.si_signo = sig;
sf.sf_si.si_code = ksi->ksi_code;
- sf.sf_si.si_addr = (void*)regs->badvaddr;
+ sf.sf_si.si_addr = (void*)(intptr_t)regs->badvaddr;
} else {
/* Old FreeBSD-style arguments. */
regs->a1 = ksi->ksi_code;
@@ -172,13 +172,13 @@ sendsig(sig_t catcher, ksiginfo_t *ksi,
sigexit(td, SIGILL);
}
- regs->pc = (register_t) catcher;
- regs->t9 = (register_t) catcher;
- regs->sp = (register_t) sfp;
+ regs->pc = (register_t)(intptr_t)catcher;
+ regs->t9 = (register_t)(intptr_t)catcher;
+ regs->sp = (register_t)(intptr_t)sfp;
/*
* Signal trampoline code is at base of user stack.
*/
- regs->ra = (register_t) PS_STRINGS - *(p->p_sysent->sv_szsigcode);
+ regs->ra = (register_t)(intptr_t)PS_STRINGS - *(p->p_sysent->sv_szsigcode);
PROC_LOCK(p);
mtx_lock(&psp->ps_mtx);
}
@@ -231,12 +231,12 @@ sigreturn(struct thread *td, struct sigr
if (ucp->uc_mcontext.mc_regs[ZERO] != UCONTEXT_MAGIC) {
printf("sigreturn: pid %d, ucp %p\n", td->td_proc->p_pid, ucp);
printf(" old sp %p ra %p pc %p\n",
- (void *)regs->sp, (void *)regs->ra, (void *)regs->pc);
+ (void *)(intptr_t)regs->sp, (void *)(intptr_t)regs->ra, (void *)(intptr_t)regs->pc);
printf(" new sp %p ra %p pc %p z %p\n",
- (void *)ucp->uc_mcontext.mc_regs[SP],
- (void *)ucp->uc_mcontext.mc_regs[RA],
- (void *)ucp->uc_mcontext.mc_regs[PC],
- (void *)ucp->uc_mcontext.mc_regs[ZERO]);
+ (void *)(intptr_t)ucp->uc_mcontext.mc_regs[SP],
+ (void *)(intptr_t)ucp->uc_mcontext.mc_regs[RA],
+ (void *)(intptr_t)ucp->uc_mcontext.mc_regs[PC],
+ (void *)(intptr_t)ucp->uc_mcontext.mc_regs[ZERO]);
return EINVAL;
}
/* #endif */
Modified: user/jmallett/octeon/sys/mips/mips/stack_machdep.c
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/stack_machdep.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/mips/mips/stack_machdep.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -43,7 +43,7 @@ static u_register_t
stack_register_fetch(u_register_t sp, u_register_t stack_pos)
{
u_register_t * stack =
- ((u_register_t *)sp + stack_pos/sizeof(u_register_t));
+ ((u_register_t *)(intptr_t)sp + (size_t)stack_pos/sizeof(u_register_t));
return *stack;
}
@@ -59,10 +59,10 @@ stack_capture(struct stack *st, u_regist
for (;;) {
stacksize = 0;
- if (pc <= (u_register_t)btext)
+ if (pc <= (u_register_t)(intptr_t)btext)
break;
- for (i = pc; i >= (u_register_t)btext; i -= sizeof (insn)) {
- bcopy((void *)i, &insn, sizeof insn);
+ for (i = pc; i >= (u_register_t)(intptr_t)btext; i -= sizeof (insn)) {
+ bcopy((void *)(intptr_t)i, &insn, sizeof insn);
switch (insn.IType.op) {
case OP_ADDI:
case OP_ADDIU:
@@ -88,13 +88,13 @@ stack_capture(struct stack *st, u_regist
break;
for (i = pc; !ra; i += sizeof (insn)) {
- bcopy((void *)i, &insn, sizeof insn);
+ bcopy((void *)(intptr_t)i, &insn, sizeof insn);
switch (insn.IType.op) {
case OP_SPECIAL:
if((insn.RType.func == OP_JR))
{
- if (ra >= (u_register_t)btext)
+ if (ra >= (u_register_t)(intptr_t)btext)
break;
if (insn.RType.rs != RA)
break;
Modified: user/jmallett/octeon/sys/mips/mips/trap.c
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/trap.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/mips/mips/trap.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -290,7 +290,7 @@ trap(struct trapframe *trapframe)
int access_type;
ksiginfo_t ksi;
char *msg = NULL;
- register_t addr = 0;
+ intptr_t addr = 0;
trapdebug_enter(trapframe, 0);
@@ -682,7 +682,7 @@ dofault:
nargs = callp->sy_narg;
if (nargs > nsaved) {
- i = copyin((caddr_t)(locr0->sp +
+ i = copyin((caddr_t)(intptr_t)(locr0->sp +
4 * sizeof(register_t)), (caddr_t)&args[nsaved],
(u_int)(nargs - nsaved) * sizeof(register_t));
if (i) {
@@ -773,7 +773,8 @@ dofault:
case T_BREAK + T_USER:
{
- uintptr_t va, instr;
+ intptr_t va;
+ uint32_t instr;
/* compute address of break instruction */
va = trapframe->pc;
@@ -806,7 +807,7 @@ dofault:
case T_IWATCH + T_USER:
case T_DWATCH + T_USER:
{
- uintptr_t va;
+ intptr_t va;
/* compute address of trapped instruction */
va = trapframe->pc;
@@ -820,7 +821,8 @@ dofault:
case T_TRAP + T_USER:
{
- uintptr_t va, instr;
+ intptr_t va;
+ uint32_t instr;
struct trapframe *locr0 = td->td_frame;
/* compute address of trap instruction */
@@ -1169,38 +1171,38 @@ log_frame_dump(struct trapframe *frame)
{
log(LOG_ERR, "Trapframe Register Dump:\n");
log(LOG_ERR, "\tzero: %p\tat: %p\tv0: %p\tv1: %p\n",
- (void *)0, (void *)frame->ast, (void *)frame->v0, (void *)frame->v1);
+ (void *)(intptr_t)0, (void *)(intptr_t)frame->ast, (void *)(intptr_t)frame->v0, (void *)(intptr_t)frame->v1);
log(LOG_ERR, "\ta0: %p\ta1: %p\ta2: %p\ta3: %p\n",
- (void *)frame->a0, (void *)frame->a1, (void *)frame->a2, (void *)frame->a3);
+ (void *)(intptr_t)frame->a0, (void *)(intptr_t)frame->a1, (void *)(intptr_t)frame->a2, (void *)(intptr_t)frame->a3);
log(LOG_ERR, "\tt0: %p\tt1: %p\tt2: %p\tt3: %p\n",
- (void *)frame->t0, (void *)frame->t1, (void *)frame->t2, (void *)frame->t3);
+ (void *)(intptr_t)frame->t0, (void *)(intptr_t)frame->t1, (void *)(intptr_t)frame->t2, (void *)(intptr_t)frame->t3);
log(LOG_ERR, "\tt4: %p\tt5: %p\tt6: %p\tt7: %p\n",
- (void *)frame->t4, (void *)frame->t5, (void *)frame->t6, (void *)frame->t7);
+ (void *)(intptr_t)frame->t4, (void *)(intptr_t)frame->t5, (void *)(intptr_t)frame->t6, (void *)(intptr_t)frame->t7);
log(LOG_ERR, "\tt8: %p\tt9: %p\ts0: %p\ts1: %p\n",
- (void *)frame->t8, (void *)frame->t9, (void *)frame->s0, (void *)frame->s1);
+ (void *)(intptr_t)frame->t8, (void *)(intptr_t)frame->t9, (void *)(intptr_t)frame->s0, (void *)(intptr_t)frame->s1);
log(LOG_ERR, "\ts2: %p\ts3: %p\ts4: %p\ts5: %p\n",
- (void *)frame->s2, (void *)frame->s3, (void *)frame->s4, (void *)frame->s5);
+ (void *)(intptr_t)frame->s2, (void *)(intptr_t)frame->s3, (void *)(intptr_t)frame->s4, (void *)(intptr_t)frame->s5);
log(LOG_ERR, "\ts6: %p\ts7: %p\tk0: %p\tk1: %p\n",
- (void *)frame->s6, (void *)frame->s7, (void *)frame->k0, (void *)frame->k1);
+ (void *)(intptr_t)frame->s6, (void *)(intptr_t)frame->s7, (void *)(intptr_t)frame->k0, (void *)(intptr_t)frame->k1);
log(LOG_ERR, "\tgp: %p\tsp: %p\ts8: %p\tra: %p\n",
- (void *)frame->gp, (void *)frame->sp, (void *)frame->s8, (void *)frame->ra);
+ (void *)(intptr_t)frame->gp, (void *)(intptr_t)frame->sp, (void *)(intptr_t)frame->s8, (void *)(intptr_t)frame->ra);
log(LOG_ERR, "\tsr: %p\tmullo: %p\tmulhi: %p\tbadvaddr: %p\n",
- (void *)frame->sr, (void *)frame->mullo, (void *)frame->mulhi, (void *)frame->badvaddr);
+ (void *)(intptr_t)frame->sr, (void *)(intptr_t)frame->mullo, (void *)(intptr_t)frame->mulhi, (void *)(intptr_t)frame->badvaddr);
#ifdef IC_REG
log(LOG_ERR, "\tcause: %p\tpc: %p\tic: %p\n",
- (void *)frame->cause, (void *)frame->pc, (void *)frame->ic);
+ (void *)(intptr_t)frame->cause, (void *)(intptr_t)frame->pc, (void *)(intptr_t)frame->ic);
#else
log(LOG_ERR, "\tcause: %p\tpc: %p\n",
- (void *)frame->cause, (void *)frame->pc);
+ (void *)(intptr_t)frame->cause, (void *)(intptr_t)frame->pc);
#endif
}
@@ -1210,38 +1212,38 @@ trap_frame_dump(struct trapframe *frame)
{
printf("Trapframe Register Dump:\n");
printf("\tzero: %p\tat: %p\tv0: %p\tv1: %p\n",
- (void *)0, (void *)frame->ast, (void *)frame->v0, (void *)frame->v1);
+ (void *)(intptr_t)0, (void *)(intptr_t)frame->ast, (void *)(intptr_t)frame->v0, (void *)(intptr_t)frame->v1);
printf("\ta0: %p\ta1: %p\ta2: %p\ta3: %p\n",
- (void *)frame->a0, (void *)frame->a1, (void *)frame->a2, (void *)frame->a3);
+ (void *)(intptr_t)frame->a0, (void *)(intptr_t)frame->a1, (void *)(intptr_t)frame->a2, (void *)(intptr_t)frame->a3);
printf("\tt0: %p\tt1: %p\tt2: %p\tt3: %p\n",
- (void *)frame->t0, (void *)frame->t1, (void *)frame->t2, (void *)frame->t3);
+ (void *)(intptr_t)frame->t0, (void *)(intptr_t)frame->t1, (void *)(intptr_t)frame->t2, (void *)(intptr_t)frame->t3);
printf("\tt4: %p\tt5: %p\tt6: %p\tt7: %p\n",
- (void *)frame->t4, (void *)frame->t5, (void *)frame->t6, (void *)frame->t7);
+ (void *)(intptr_t)frame->t4, (void *)(intptr_t)frame->t5, (void *)(intptr_t)frame->t6, (void *)(intptr_t)frame->t7);
printf("\tt8: %p\tt9: %p\ts0: %p\ts1: %p\n",
- (void *)frame->t8, (void *)frame->t9, (void *)frame->s0, (void *)frame->s1);
+ (void *)(intptr_t)frame->t8, (void *)(intptr_t)frame->t9, (void *)(intptr_t)frame->s0, (void *)(intptr_t)frame->s1);
printf("\ts2: %p\ts3: %p\ts4: %p\ts5: %p\n",
- (void *)frame->s2, (void *)frame->s3, (void *)frame->s4, (void *)frame->s5);
+ (void *)(intptr_t)frame->s2, (void *)(intptr_t)frame->s3, (void *)(intptr_t)frame->s4, (void *)(intptr_t)frame->s5);
printf("\ts6: %p\ts7: %p\tk0: %p\tk1: %p\n",
- (void *)frame->s6, (void *)frame->s7, (void *)frame->k0, (void *)frame->k1);
+ (void *)(intptr_t)frame->s6, (void *)(intptr_t)frame->s7, (void *)(intptr_t)frame->k0, (void *)(intptr_t)frame->k1);
printf("\tgp: %p\tsp: %p\ts8: %p\tra: %p\n",
- (void *)frame->gp, (void *)frame->sp, (void *)frame->s8, (void *)frame->ra);
+ (void *)(intptr_t)frame->gp, (void *)(intptr_t)frame->sp, (void *)(intptr_t)frame->s8, (void *)(intptr_t)frame->ra);
printf("\tsr: %p\tmullo: %p\tmulhi: %p\tbadvaddr: %p\n",
- (void *)frame->sr, (void *)frame->mullo, (void *)frame->mulhi, (void *)frame->badvaddr);
+ (void *)(intptr_t)frame->sr, (void *)(intptr_t)frame->mullo, (void *)(intptr_t)frame->mulhi, (void *)(intptr_t)frame->badvaddr);
#ifdef IC_REG
printf("\tcause: %p\tpc: %p\tic: %p\n",
- (void *)frame->cause, (void *)frame->pc, (void *)frame->ic);
+ (void *)(intptr_t)frame->cause, (void *)(intptr_t)frame->pc, (void *)(intptr_t)frame->ic);
#else
printf("\tcause: %p\tpc: %p\n",
- (void *)frame->cause, (void *)frame->pc);
+ (void *)(intptr_t)frame->cause, (void *)(intptr_t)frame->pc);
#endif
}
@@ -1299,9 +1301,9 @@ log_bad_page_fault(char *msg, struct tra
log(LOG_ERR, "%s: pid %d (%s), uid %d: pc %p got a %s fault at %p\n",
msg, p->p_pid, p->p_comm,
p->p_ucred ? p->p_ucred->cr_uid : -1,
- (void *)pc,
+ (void *)(intptr_t)pc,
read_or_write,
- (void *)frame->badvaddr);
+ (void *)(intptr_t)frame->badvaddr);
/* log registers in trap frame */
log_frame_dump(frame);
@@ -1314,19 +1316,19 @@ log_bad_page_fault(char *msg, struct tra
*/
if (!(pc & 3) && (pc != frame->badvaddr) &&
(trap_type != T_BUS_ERR_IFETCH) &&
- useracc((caddr_t)pc, sizeof(int) * 4, VM_PROT_READ)) {
+ useracc((caddr_t)(intptr_t)pc, sizeof(int) * 4, VM_PROT_READ)) {
/* dump page table entry for faulting instruction */
log(LOG_ERR, "Page table info for pc address %p: pde = %p, pte = 0x%lx\n",
- (void *)pc, *pdep, ptep ? *ptep : 0);
+ (void *)(intptr_t)pc, *pdep, ptep ? *ptep : 0);
- addr = (unsigned int *)pc;
+ addr = (unsigned int *)(intptr_t)pc;
log(LOG_ERR, "Dumping 4 words starting at pc address %p: \n",
addr);
log(LOG_ERR, "%08x %08x %08x %08x\n",
addr[0], addr[1], addr[2], addr[3]);
} else {
log(LOG_ERR, "pc address %p is inaccessible, pde = 0x%p, pte = 0x%lx\n",
- (void *)pc, *pdep, ptep ? *ptep : 0);
+ (void *)(intptr_t)pc, *pdep, ptep ? *ptep : 0);
}
/* panic("Bad trap");*/
}
@@ -1339,7 +1341,7 @@ static int
mips_unaligned_load_store(struct trapframe *frame, register_t addr, register_t pc)
{
register_t *reg = (register_t *) frame;
- u_int32_t inst = *((u_int32_t *) pc);
+ u_int32_t inst = *((u_int32_t *)(intptr_t)pc);
u_int32_t value_msb, value;
int access_type = 0;
@@ -1436,8 +1438,8 @@ emulate_unaligned_access(struct trapfram
frame->pc += 4;
log(LOG_INFO, "Unaligned %s: pc=%p, badvaddr=%p\n",
- access_name[access_type - 1], (void *)pc,
- (void *)frame->badvaddr);
+ access_name[access_type - 1], (void *)(intptr_t)pc,
+ (void *)(intptr_t)frame->badvaddr);
}
}
return access_type;
Modified: user/jmallett/octeon/sys/mips/mips/vm_machdep.c
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/vm_machdep.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/mips/mips/vm_machdep.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -145,13 +145,13 @@ cpu_fork(register struct thread *td1,reg
if (td1 == PCPU_GET(fpcurthread))
MipsSaveCurFPState(td1);
- pcb2->pcb_context[PCB_REG_RA] = (register_t)fork_trampoline;
+ pcb2->pcb_context[PCB_REG_RA] = (register_t)(intptr_t)fork_trampoline;
/* Make sp 64-bit aligned */
pcb2->pcb_context[PCB_REG_SP] = (register_t)(((vm_offset_t)td2->td_pcb &
~(sizeof(__int64_t) - 1)) - STAND_FRAME_SIZE);
- pcb2->pcb_context[PCB_REG_S0] = (register_t)fork_return;
- pcb2->pcb_context[PCB_REG_S1] = (register_t)td2;
- pcb2->pcb_context[PCB_REG_S2] = (register_t)td2->td_frame;
+ pcb2->pcb_context[PCB_REG_S0] = (register_t)(intptr_t)fork_return;
+ pcb2->pcb_context[PCB_REG_S1] = (register_t)(intptr_t)td2;
+ pcb2->pcb_context[PCB_REG_S2] = (register_t)(intptr_t)td2->td_frame;
pcb2->pcb_context[PCB_REG_SR] = SR_INT_MASK & mips_rd_status();
/*
* FREEBSD_DEVELOPERS_FIXME:
@@ -182,8 +182,8 @@ cpu_set_fork_handler(struct thread *td,
* Note that the trap frame follows the args, so the function
* is really called like this: func(arg, frame);
*/
- td->td_pcb->pcb_context[PCB_REG_S0] = (register_t) func;
- td->td_pcb->pcb_context[PCB_REG_S1] = (register_t) arg;
+ td->td_pcb->pcb_context[PCB_REG_S0] = (register_t)(intptr_t)func;
+ td->td_pcb->pcb_context[PCB_REG_S1] = (register_t)(intptr_t)arg;
}
void
@@ -352,13 +352,13 @@ cpu_set_upcall(struct thread *td, struct
* Set registers for trampoline to user mode.
*/
- pcb2->pcb_context[PCB_REG_RA] = (register_t)fork_trampoline;
+ pcb2->pcb_context[PCB_REG_RA] = (register_t)(intptr_t)fork_trampoline;
/* Make sp 64-bit aligned */
pcb2->pcb_context[PCB_REG_SP] = (register_t)(((vm_offset_t)td->td_pcb &
~(sizeof(__int64_t) - 1)) - STAND_FRAME_SIZE);
- pcb2->pcb_context[PCB_REG_S0] = (register_t)fork_return;
- pcb2->pcb_context[PCB_REG_S1] = (register_t)td;
- pcb2->pcb_context[PCB_REG_S2] = (register_t)td->td_frame;
+ pcb2->pcb_context[PCB_REG_S0] = (register_t)(intptr_t)fork_return;
+ pcb2->pcb_context[PCB_REG_S1] = (register_t)(intptr_t)td;
+ pcb2->pcb_context[PCB_REG_S2] = (register_t)(intptr_t)td->td_frame;
/* Dont set IE bit in SR. sched lock release will take care of it */
pcb2->pcb_context[PCB_REG_SR] = SR_INT_MASK & mips_rd_status();
@@ -401,7 +401,7 @@ cpu_set_upcall_kse(struct thread *td, vo
* byte aligned[for compatibility with 64-bit CPUs]
* in ``See MIPS Run'' by D. Sweetman, p. 269
* align stack */
- sp = ((register_t)(stack->ss_sp + stack->ss_size) & ~0x7) -
+ sp = ((register_t)(intptr_t)(stack->ss_sp + stack->ss_size) & ~0x7) -
STAND_FRAME_SIZE;
/*
@@ -410,14 +410,14 @@ cpu_set_upcall_kse(struct thread *td, vo
*/
tf = td->td_frame;
bzero(tf, sizeof(struct trapframe));
- tf->sp = (register_t)sp;
- tf->pc = (register_t)entry;
+ tf->sp = sp;
+ tf->pc = (register_t)(intptr_t)entry;
/*
* MIPS ABI requires T9 to be the same as PC
* in subroutine entry point
*/
- tf->t9 = (register_t)entry;
- tf->a0 = (register_t)arg;
+ tf->t9 = (register_t)(intptr_t)entry;
+ tf->a0 = (register_t)(intptr_t)arg;
/*
* Keep interrupt mask
@@ -447,7 +447,7 @@ kvtop(void *addr)
va = pmap_kextract((vm_offset_t)addr);
if (va == 0)
panic("kvtop: zero page frame");
- return((int)va);
+ return((intptr_t)va);
}
/*
@@ -594,10 +594,10 @@ cpu_throw(struct thread *old, struct thr
#include <ddb/ddb.h>
#define DB_PRINT_REG(ptr, regname) \
- db_printf(" %-12s 0x%lx\n", #regname, (long)((ptr)->regname))
+ db_printf(" %-12s %p\n", #regname, (void *)(intptr_t)((ptr)->regname))
#define DB_PRINT_REG_ARRAY(ptr, arrname, regname) \
- db_printf(" %-12s 0x%lx\n", #regname, (long)((ptr)->arrname[regname]))
+ db_printf(" %-12s %p\n", #regname, (void *)(intptr_t)((ptr)->arrname[regname]))
static void
dump_trapframe(struct trapframe *trapframe)
Modified: user/jmallett/octeon/sys/ufs/ffs/ffs_softdep.c
==============================================================================
--- user/jmallett/octeon/sys/ufs/ffs/ffs_softdep.c Sat Feb 27 03:35:34 2010 (r204390)
+++ user/jmallett/octeon/sys/ufs/ffs/ffs_softdep.c Sat Feb 27 03:38:38 2010 (r204391)
@@ -1161,7 +1161,7 @@ retry_flush:
LIST_HEAD(pagedep_hashhead, pagedep) *pagedep_hashtbl;
u_long pagedep_hash; /* size of hash table - 1 */
#define PAGEDEP_HASH(mp, inum, lbn) \
- (&pagedep_hashtbl[((((register_t)(mp)) >> 13) + (inum) + (lbn)) & \
+ (&pagedep_hashtbl[((((uintptr_t)(mp)) >> 13) + (inum) + (lbn)) & \
pagedep_hash])
static int
@@ -1245,7 +1245,7 @@ LIST_HEAD(inodedep_hashhead, inodedep) *
static u_long inodedep_hash; /* size of hash table - 1 */
static long num_inodedep; /* number of inodedep allocated */
#define INODEDEP_HASH(fs, inum) \
- (&inodedep_hashtbl[((((register_t)(fs)) >> 13) + (inum)) & inodedep_hash])
+ (&inodedep_hashtbl[((((uintptr_t)(fs)) >> 13) + (inum)) & inodedep_hash])
static int
inodedep_find(inodedephd, fs, inum, inodedeppp)
@@ -1333,7 +1333,7 @@ inodedep_lookup(mp, inum, flags, inodede
LIST_HEAD(newblk_hashhead, newblk) *newblk_hashtbl;
u_long newblk_hash; /* size of hash table - 1 */
#define NEWBLK_HASH(fs, inum) \
- (&newblk_hashtbl[((((register_t)(fs)) >> 13) + (inum)) & newblk_hash])
+ (&newblk_hashtbl[((((uintptr_t)(fs)) >> 13) + (inum)) & newblk_hash])
static int
newblk_find(newblkhd, fs, newblkno, newblkpp)
More information about the svn-src-user
mailing list