From 3de7a35dc20a10f6f4dd56dd0cfe435f5775561c Mon Sep 17 00:00:00 2001 From: fvdl Date: Mon, 4 Dec 2000 20:40:07 +0000 Subject: [PATCH] More cast / format cleanup to make this compile cleanly in 32bit mode. --- sys/arch/sparc64/sparc64/cache.c | 4 +-- sys/arch/sparc64/sparc64/db_interface.c | 42 ++++++++++++------------- sys/arch/sparc64/sparc64/intr.c | 7 +++-- 3 files changed, 27 insertions(+), 26 deletions(-) diff --git a/sys/arch/sparc64/sparc64/cache.c b/sys/arch/sparc64/sparc64/cache.c index 6f826d6af7b6..73b24a7934ea 100644 --- a/sys/arch/sparc64/sparc64/cache.c +++ b/sys/arch/sparc64/sparc64/cache.c @@ -1,4 +1,4 @@ -/* $NetBSD: cache.c,v 1.3 2000/08/01 00:28:03 eeh Exp $ */ +/* $NetBSD: cache.c,v 1.4 2000/12/04 20:40:07 fvdl Exp $ */ /* * Copyright (c) 1996 @@ -115,7 +115,7 @@ cache_flush_page(pa) ls = cacheinfo.c_linesize; i = NBPG >> cacheinfo.dc_l2linesize; /* Assume E$ takes care of itself*/ - kp = (int *)((pa & (cacheinfo.ec_totalsize - 1)) + KERNBASE); + kp = (int *)(u_long)((pa & (cacheinfo.ec_totalsize - 1)) + KERNBASE); j = 0; /* defeat optimizer? */ for (; --i >= 0; p += ls) { flush(p); /* Take care of I$. */ diff --git a/sys/arch/sparc64/sparc64/db_interface.c b/sys/arch/sparc64/sparc64/db_interface.c index 802678b34b61..875d57014bae 100644 --- a/sys/arch/sparc64/sparc64/db_interface.c +++ b/sys/arch/sparc64/sparc64/db_interface.c @@ -1,4 +1,4 @@ -/* $NetBSD: db_interface.c,v 1.47 2000/12/04 16:01:19 fvdl Exp $ */ +/* $NetBSD: db_interface.c,v 1.48 2000/12/04 20:40:07 fvdl Exp $ */ /* * Mach Operating System @@ -657,26 +657,26 @@ db_dump_pcb(addr, have_addr, count, modif) for (i=0; ipcb_nsaved; i++) { db_printf("win %d: at %llx local, in\n", i, (unsigned long long)pcb->pcb_rw[i+1].rw_in[6]); - db_printf("%16lx %16lx %16lx %16lx\n", - pcb->pcb_rw[i].rw_local[0], - pcb->pcb_rw[i].rw_local[1], - pcb->pcb_rw[i].rw_local[2], - pcb->pcb_rw[i].rw_local[3]); - db_printf("%16lx %16lx %16lx %16lx\n", - pcb->pcb_rw[i].rw_local[4], - pcb->pcb_rw[i].rw_local[5], - pcb->pcb_rw[i].rw_local[6], - pcb->pcb_rw[i].rw_local[7]); - db_printf("%16lx %16lx %16lx %16lx\n", - pcb->pcb_rw[i].rw_in[0], - pcb->pcb_rw[i].rw_in[1], - pcb->pcb_rw[i].rw_in[2], - pcb->pcb_rw[i].rw_in[3]); - db_printf("%16lx %16lx %16lx %16lx\n", - pcb->pcb_rw[i].rw_in[4], - pcb->pcb_rw[i].rw_in[5], - pcb->pcb_rw[i].rw_in[6], - pcb->pcb_rw[i].rw_in[7]); + db_printf("%16llx %16llx %16llx %16llx\n", + (unsigned long long)pcb->pcb_rw[i].rw_local[0], + (unsigned long long)pcb->pcb_rw[i].rw_local[1], + (unsigned long long)pcb->pcb_rw[i].rw_local[2], + (unsigned long long)pcb->pcb_rw[i].rw_local[3]); + db_printf("%16llx %16llx %16llx %16llx\n", + (unsigned long long)pcb->pcb_rw[i].rw_local[4], + (unsigned long long)pcb->pcb_rw[i].rw_local[5], + (unsigned long long)pcb->pcb_rw[i].rw_local[6], + (unsigned long long)pcb->pcb_rw[i].rw_local[7]); + db_printf("%16llx %16llx %16llx %16llx\n", + (unsigned long long)pcb->pcb_rw[i].rw_in[0], + (unsigned long long)pcb->pcb_rw[i].rw_in[1], + (unsigned long long)pcb->pcb_rw[i].rw_in[2], + (unsigned long long)pcb->pcb_rw[i].rw_in[3]); + db_printf("%16llx %16llx %16llx %16llx\n", + (unsigned long long)pcb->pcb_rw[i].rw_in[4], + (unsigned long long)pcb->pcb_rw[i].rw_in[5], + (unsigned long long)pcb->pcb_rw[i].rw_in[6], + (unsigned long long)pcb->pcb_rw[i].rw_in[7]); } } diff --git a/sys/arch/sparc64/sparc64/intr.c b/sys/arch/sparc64/sparc64/intr.c index 35cfe458bf02..0234cedb7728 100644 --- a/sys/arch/sparc64/sparc64/intr.c +++ b/sys/arch/sparc64/sparc64/intr.c @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.36 2000/12/04 16:01:19 fvdl Exp $ */ +/* $NetBSD: intr.c,v 1.37 2000/12/04 20:40:07 fvdl Exp $ */ /* * Copyright (c) 1992, 1993 @@ -103,8 +103,9 @@ strayintr(fp, vectored) /* If we're in polled mode ignore spurious interrupts */ if ((fp->tf_pil == PIL_SER) /* && swallow_zsintrs */) return; - printf("stray interrupt ipl %u pc=%lx npc=%lx pstate=%s vecttored=%d\n", - fp->tf_pil, fp->tf_pc, fp->tf_npc, + printf("stray interrupt ipl %u pc=%llx npc=%llx pstate=%s vecttored=%d\n", + fp->tf_pil, (unsigned long long)fp->tf_pc, + (unsigned long long)fp->tf_npc, bitmask_snprintf((fp->tf_tstate>>TSTATE_PSTATE_SHIFT), PSTATE_BITS, buf, sizeof(buf)), vectored);