Module Name:    src
Committed By:   matt
Date:           Wed Aug 26 03:46:40 UTC 2009

Modified Files:
        src/sys/arch/algor/algor [matt-nb5-mips64]: bus_dma.c machdep.c
        src/sys/arch/arc/arc [matt-nb5-mips64]: wired_map_machdep.c
        src/sys/arch/arc/isa [matt-nb5-mips64]: isabus.c
        src/sys/arch/cobalt/cobalt [matt-nb5-mips64]: bus.c
        src/sys/arch/ews4800mips/ews4800mips [matt-nb5-mips64]: sbd.c
        src/sys/arch/ews4800mips/sbd [matt-nb5-mips64]: sbdio.c
        src/sys/arch/hpcmips/hpcmips [matt-nb5-mips64]: bus_dma.c cpu.c
            machdep.c
        src/sys/arch/mips/include [matt-nb5-mips64]: ecoff_machdep.h
        src/sys/arch/mips/mips [matt-nb5-mips64]: cpu_exec.c fp.S
        src/sys/arch/newsmips/apbus [matt-nb5-mips64]: dmac3.c
        src/sys/arch/newsmips/newsmips [matt-nb5-mips64]: bus.c
        src/sys/arch/pmax/pmax [matt-nb5-mips64]: bus_dma.c
        src/sys/arch/sgimips/hpc [matt-nb5-mips64]: hpc.c
        src/sys/compat/irix [matt-nb5-mips64]: irix_exec.c irix_exec.h
        src/sys/dev [matt-nb5-mips64]: kloader.c
        src/sys/sys [matt-nb5-mips64]: exec_ecoff.h

Log Message:
Fixup (all but mipsco) to deal the new realities in mipsland.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.20.16.1 src/sys/arch/algor/algor/bus_dma.c
cvs rdiff -u -r1.38 -r1.38.10.1 src/sys/arch/algor/algor/machdep.c
cvs rdiff -u -r1.5 -r1.5.64.1 src/sys/arch/arc/arc/wired_map_machdep.c
cvs rdiff -u -r1.44 -r1.44.14.1 src/sys/arch/arc/isa/isabus.c
cvs rdiff -u -r1.35 -r1.35.16.1 src/sys/arch/cobalt/cobalt/bus.c
cvs rdiff -u -r1.2 -r1.2.18.1 src/sys/arch/ews4800mips/ews4800mips/sbd.c
cvs rdiff -u -r1.3 -r1.3.18.1 src/sys/arch/ews4800mips/sbd/sbdio.c
cvs rdiff -u -r1.32 -r1.32.16.1 src/sys/arch/hpcmips/hpcmips/bus_dma.c
cvs rdiff -u -r1.15 -r1.15.28.1 src/sys/arch/hpcmips/hpcmips/cpu.c
cvs rdiff -u -r1.96 -r1.96.10.1 src/sys/arch/hpcmips/hpcmips/machdep.c
cvs rdiff -u -r1.19 -r1.19.126.1 src/sys/arch/mips/include/ecoff_machdep.h
cvs rdiff -u -r1.50.54.1.4.3 -r1.50.54.1.4.4 \
    src/sys/arch/mips/mips/cpu_exec.c
cvs rdiff -u -r1.33.38.2 -r1.33.38.3 src/sys/arch/mips/mips/fp.S
cvs rdiff -u -r1.12 -r1.12.14.1 src/sys/arch/newsmips/apbus/dmac3.c
cvs rdiff -u -r1.28 -r1.28.16.1 src/sys/arch/newsmips/newsmips/bus.c
cvs rdiff -u -r1.49 -r1.49.16.1 src/sys/arch/pmax/pmax/bus_dma.c
cvs rdiff -u -r1.60 -r1.60.38.1 src/sys/arch/sgimips/hpc/hpc.c
cvs rdiff -u -r1.52 -r1.52.14.1 src/sys/compat/irix/irix_exec.c
cvs rdiff -u -r1.25 -r1.25.14.1 src/sys/compat/irix/irix_exec.h
cvs rdiff -u -r1.18 -r1.18.16.1 src/sys/dev/kloader.c
cvs rdiff -u -r1.18 -r1.18.94.1 src/sys/sys/exec_ecoff.h

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/algor/algor/bus_dma.c
diff -u src/sys/arch/algor/algor/bus_dma.c:1.20 src/sys/arch/algor/algor/bus_dma.c:1.20.16.1
--- src/sys/arch/algor/algor/bus_dma.c:1.20	Wed Jun  4 12:41:40 2008
+++ src/sys/arch/algor/algor/bus_dma.c	Wed Aug 26 03:46:38 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.20 2008/06/04 12:41:40 ad Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.20.16.1 2009/08/26 03:46:38 matt Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.20 2008/06/04 12:41:40 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.20.16.1 2009/08/26 03:46:38 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -123,6 +123,7 @@
 {
 	bus_size_t sgsize;
 	bus_addr_t curaddr, lastaddr, baddr, bmask;
+	paddr_t pa;
 	vaddr_t vaddr = (vaddr_t)buf;
 	int seg;
 
@@ -135,9 +136,10 @@
 		 */
 		if (!VMSPACE_IS_KERNEL_P(vm))
 			(void) pmap_extract(vm_map_pmap(&vm->vm_map),
-			    vaddr, &curaddr);
+			    vaddr, &pa);
 		else
-			curaddr = kvtophys(vaddr);
+			pa = kvtophys(vaddr);
+		curaddr = pa;
 
 		/*
 		 * If we're beyond the current DMA window, indicate
@@ -585,7 +587,7 @@
 #ifdef DIAGNOSTIC
 		if (curaddr < low || curaddr >= high) {
 			printf("uvm_pglistalloc returned non-sensical"
-			    " address 0x%lx\n", curaddr);
+			    " address %#"PRIxPADDR"\n", curaddr);
 			panic("_bus_dmamem_alloc");
 		}
 #endif

Index: src/sys/arch/algor/algor/machdep.c
diff -u src/sys/arch/algor/algor/machdep.c:1.38 src/sys/arch/algor/algor/machdep.c:1.38.10.1
--- src/sys/arch/algor/algor/machdep.c:1.38	Wed Jul  2 17:28:54 2008
+++ src/sys/arch/algor/algor/machdep.c	Wed Aug 26 03:46:38 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.38 2008/07/02 17:28:54 ad Exp $	*/
+/*	$NetBSD: machdep.c,v 1.38.10.1 2009/08/26 03:46:38 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -106,7 +106,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.38 2008/07/02 17:28:54 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.38.10.1 2009/08/26 03:46:38 matt Exp $");
 
 #include "opt_algor_p4032.h"
 #include "opt_algor_p5064.h" 
@@ -214,7 +214,7 @@
 	const char *cp;
 	char *cp0;
 	void *v;
-	int i;
+	size_t i;
 
 	/* Disable interrupts. */
 	(void) splhigh();
@@ -473,11 +473,11 @@
 	 * it's already in bytes, not megabytes.
 	 */
 	if (size < 1024) {
-		printf("Memory size: 0x%08lx (0x%08lx)\n", size * 1024 * 1024,
-		    size);
+		printf("Memory size: %#"PRIxVSIZE" (%"PRIxVSIZE")\n",
+		    size * 1024 * 1024, size);
 		size *= 1024 * 1024;
 	} else
-		printf("Memory size: 0x%08lx\n", size);
+		printf("Memory size: %#"PRIxVSIZE"\n", size);
 
 	mem_clusters[mem_cluster_cnt].start = PAGE_SIZE;
 	mem_clusters[mem_cluster_cnt].size =
@@ -508,7 +508,7 @@
 			 * within the segment.
 			 */
 #if 1
-			printf("Cluster %d contains kernel\n", i);
+			printf("Cluster %zu contains kernel\n", i);
 #endif
 			if (pfn0 < kernstartpfn) {
 				/*
@@ -516,7 +516,8 @@
 				 */
 #if 1
 				printf("Loading chunk before kernel: "
-				    "0x%lx / 0x%lx\n", pfn0, kernstartpfn);
+				    "%#"PRIxPADDR" / %#"PRIxPADDR"\n",
+				    pfn0, kernstartpfn);
 #endif
 				uvm_page_physload(pfn0, kernstartpfn,
 				    pfn0, kernstartpfn, VM_FREELIST_DEFAULT);
@@ -527,7 +528,8 @@
 				 */
 #if 1
 				printf("Loading chunk after kernel: "
-				    "0x%lx / 0x%lx\n", kernendpfn, pfn1);
+				    "%#"PRIxPADDR" / %#"PRIxPADDR"\n",
+				    kernendpfn, pfn1);
 #endif
 				uvm_page_physload(kernendpfn, pfn1,
 				    kernendpfn, pfn1, VM_FREELIST_DEFAULT);
@@ -537,8 +539,8 @@
 			 * Just load this cluster as one chunk.
 			 */
 #if 1
-			printf("Loading cluster %d: 0x%lx / 0x%lx\n", i,
-			    pfn0, pfn1);
+			printf("Loading cluster %zu: %#"PRIxPADDR
+			    " / %#"PRIxPADDR"\n", i, pfn0, pfn1);
 #endif
 			uvm_page_physload(pfn0, pfn1, pfn0, pfn1,
 			    VM_FREELIST_DEFAULT);

Index: src/sys/arch/arc/arc/wired_map_machdep.c
diff -u src/sys/arch/arc/arc/wired_map_machdep.c:1.5 src/sys/arch/arc/arc/wired_map_machdep.c:1.5.64.1
--- src/sys/arch/arc/arc/wired_map_machdep.c:1.5	Thu Feb 22 05:09:01 2007
+++ src/sys/arch/arc/arc/wired_map_machdep.c	Wed Aug 26 03:46:38 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: wired_map_machdep.c,v 1.5 2007/02/22 05:09:01 thorpej Exp $	*/
+/*	$NetBSD: wired_map_machdep.c,v 1.5.64.1 2009/08/26 03:46:38 matt Exp $	*/
 
 /*-
  * Copyright (C) 2000 Shuichiro URATA.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wired_map_machdep.c,v 1.5 2007/02/22 05:09:01 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wired_map_machdep.c,v 1.5.64.1 2009/08/26 03:46:38 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -166,6 +166,7 @@
 }
 
 /* Allocate new wired entries */
+CTASSERT(sizeof(vaddr_t) == sizeof(u_long));
 vaddr_t
 arc_map_wired(paddr_t pa, vsize_t size)
 {
@@ -191,7 +192,7 @@
 	}
 
 	error = extent_alloc(arc_wired_map_ex, size, MIPS3_WIRED_SIZE,
-	    0, EX_NOWAIT, &va);
+	    0, EX_NOWAIT, (u_long *)&va);
 	if (error) {
 #ifdef DIAGNOSTIC
 		printf("arc_map_wired: can't allocate region\n");

Index: src/sys/arch/arc/isa/isabus.c
diff -u src/sys/arch/arc/isa/isabus.c:1.44 src/sys/arch/arc/isa/isabus.c:1.44.14.1
--- src/sys/arch/arc/isa/isabus.c:1.44	Sat Jul  5 08:46:25 2008
+++ src/sys/arch/arc/isa/isabus.c	Wed Aug 26 03:46:38 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: isabus.c,v 1.44 2008/07/05 08:46:25 tsutsui Exp $	*/
+/*	$NetBSD: isabus.c,v 1.44.14.1 2009/08/26 03:46:38 matt Exp $	*/
 /*	$OpenBSD: isabus.c,v 1.15 1998/03/16 09:38:46 pefo Exp $	*/
 /*	NetBSD: isa.c,v 1.33 1995/06/28 04:30:51 cgd Exp 	*/
 
@@ -120,7 +120,7 @@
 */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isabus.c,v 1.44 2008/07/05 08:46:25 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isabus.c,v 1.44.14.1 2009/08/26 03:46:38 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -215,7 +215,7 @@
 
         if (pnp)
                 aprint_normal("isa at %s", pnp);
-        aprint_verbose(" isa_io_base 0x%lx isa_mem_base 0x%lx",
+        aprint_verbose(" isa_io_base %#"PRIxVADDR" isa_mem_base %#"PRIxVADDR,
 	    arc_bus_io.bs_vbase, arc_bus_mem.bs_vbase);
         return UNCONF;
 }

Index: src/sys/arch/cobalt/cobalt/bus.c
diff -u src/sys/arch/cobalt/cobalt/bus.c:1.35 src/sys/arch/cobalt/cobalt/bus.c:1.35.16.1
--- src/sys/arch/cobalt/cobalt/bus.c:1.35	Wed Jun  4 12:41:40 2008
+++ src/sys/arch/cobalt/cobalt/bus.c	Wed Aug 26 03:46:39 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus.c,v 1.35 2008/06/04 12:41:40 ad Exp $	*/
+/*	$NetBSD: bus.c,v 1.35.16.1 2009/08/26 03:46:39 matt Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.35 2008/06/04 12:41:40 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.35.16.1 2009/08/26 03:46:39 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -189,6 +189,7 @@
 	bus_size_t sgsize;
 	bus_addr_t curaddr, lastaddr, baddr, bmask;
 	vaddr_t vaddr = (vaddr_t)buf;
+	paddr_t pa;
 	int seg;
 
 	lastaddr = *lastaddrp;
@@ -200,14 +201,15 @@
 		 */
 		if (!VMSPACE_IS_KERNEL_P(vm))
 			(void)pmap_extract(vm_map_pmap(&vm->vm_map),
-			    vaddr, &curaddr);
+			    vaddr, &pa);
 		else
-			curaddr = kvtophys(vaddr);
+			pa = kvtophys(vaddr);
+		curaddr = pa;
 
 		/*
 		 * Compute the segment size, and adjust counts.
 		 */
-		sgsize = PAGE_SIZE - ((u_long)vaddr & PGOFSET);
+		sgsize = PAGE_SIZE - (vaddr & PGOFSET);
 		if (buflen < sgsize)
 			sgsize = buflen;
 

Index: src/sys/arch/ews4800mips/ews4800mips/sbd.c
diff -u src/sys/arch/ews4800mips/ews4800mips/sbd.c:1.2 src/sys/arch/ews4800mips/ews4800mips/sbd.c:1.2.18.1
--- src/sys/arch/ews4800mips/ews4800mips/sbd.c:1.2	Mon Apr 28 20:23:18 2008
+++ src/sys/arch/ews4800mips/ews4800mips/sbd.c	Wed Aug 26 03:46:39 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sbd.c,v 1.2 2008/04/28 20:23:18 martin Exp $	*/
+/*	$NetBSD: sbd.c,v 1.2.18.1 2009/08/26 03:46:39 matt Exp $	*/
 
 /*-
  * Copyright (c) 2004, 2005 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sbd.c,v 1.2 2008/04/28 20:23:18 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbd.c,v 1.2.18.1 2009/08/26 03:46:39 matt Exp $");
 
 /* System board */
 #include "opt_sbd.h"
@@ -153,15 +153,15 @@
 	phys_ram_seg_t *p;
 	paddr_t start;
 	size_t size;
-	int i, j;
+	size_t i, j;
 
 	/* Very slow */
 	for (i = 1; i < mem_cluster_cnt; i++) {
 		p = &mem_clusters[i];
 		start = p->start;
 		size = p->size;
-		printf("[%d] %#lx-%#lx, %#x (%dMB)\n", i, start, start + size,
-		    size, size >>20);
+		printf("[%u] %#"PRIxPADDR"-%#"PRIxPADDR", %#x (%uMB)\n",
+		    i, start, start + size, size, size >>20);
 		m = (uint32_t *)MIPS_PHYS_TO_KSEG1(start);
 		mend = (uint32_t *)MIPS_PHYS_TO_KSEG1(start + size);
 		for (; m < mend; m++) {

Index: src/sys/arch/ews4800mips/sbd/sbdio.c
diff -u src/sys/arch/ews4800mips/sbd/sbdio.c:1.3 src/sys/arch/ews4800mips/sbd/sbdio.c:1.3.18.1
--- src/sys/arch/ews4800mips/sbd/sbdio.c:1.3	Mon Apr 28 20:23:18 2008
+++ src/sys/arch/ews4800mips/sbd/sbdio.c	Wed Aug 26 03:46:39 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sbdio.c,v 1.3 2008/04/28 20:23:18 martin Exp $	*/
+/*	$NetBSD: sbdio.c,v 1.3.18.1 2009/08/26 03:46:39 matt Exp $	*/
 
 /*-
  * Copyright (c) 2004, 2005 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sbdio.c,v 1.3 2008/04/28 20:23:18 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbdio.c,v 1.3.18.1 2009/08/26 03:46:39 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -112,9 +112,9 @@
 	struct sbdio_attach_args *sa = aux;
 
 	if (sa->sa_addr1 != (paddr_t)-1) {
-		aprint_normal(" at 0x%lx", sa->sa_addr1);
+		aprint_normal(" at %#"PRIxPADDR, sa->sa_addr1);
 		if (sa->sa_addr2 != (paddr_t)-1)
-			aprint_normal(", 0x%lx", sa->sa_addr2);
+			aprint_normal(", %#"PRIxPADDR, sa->sa_addr2);
 	}
 	if (sa->sa_irq != -1)
 		aprint_normal(" irq %d", sa->sa_irq);

Index: src/sys/arch/hpcmips/hpcmips/bus_dma.c
diff -u src/sys/arch/hpcmips/hpcmips/bus_dma.c:1.32 src/sys/arch/hpcmips/hpcmips/bus_dma.c:1.32.16.1
--- src/sys/arch/hpcmips/hpcmips/bus_dma.c:1.32	Wed Jun  4 12:41:41 2008
+++ src/sys/arch/hpcmips/hpcmips/bus_dma.c	Wed Aug 26 03:46:39 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.32 2008/06/04 12:41:41 ad Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.32.16.1 2009/08/26 03:46:39 matt Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.32 2008/06/04 12:41:41 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.32.16.1 2009/08/26 03:46:39 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -145,6 +145,7 @@
 	bus_size_t sgsize;
 	bus_addr_t curaddr, lastaddr, baddr, bmask;
 	vaddr_t vaddr = (vaddr_t)buf;
+	paddr_t pa;
 	int seg;
 
 	lastaddr = *lastaddrp;
@@ -156,9 +157,10 @@
 		 */
 		if (!VMSPACE_IS_KERNEL_P(vm))
 			(void) pmap_extract(vm_map_pmap(&vm->vm_map),
-			    vaddr, &curaddr);
+			    vaddr, &pa);
 		else
-			curaddr = kvtophys(vaddr);
+			pa = kvtophys(vaddr);
+		curaddr = pa;
 
 		/*
 		 * Compute the segment size, and adjust counts.
@@ -567,7 +569,7 @@
 #ifdef DIAGNOSTIC
 		if (curaddr < low || curaddr >= high) {
 			printf("uvm_pglistalloc returned non-sensical"
-			    " address 0x%lx\n", curaddr);
+			    " address %#"PRIxVADDR"\n", curaddr);
 			panic("_hpcmips_bd_mem_alloc");
 		}
 #endif

Index: src/sys/arch/hpcmips/hpcmips/cpu.c
diff -u src/sys/arch/hpcmips/hpcmips/cpu.c:1.15 src/sys/arch/hpcmips/hpcmips/cpu.c:1.15.28.1
--- src/sys/arch/hpcmips/hpcmips/cpu.c:1.15	Fri Jan  4 22:13:55 2008
+++ src/sys/arch/hpcmips/hpcmips/cpu.c	Wed Aug 26 03:46:39 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.15 2008/01/04 22:13:55 ad Exp $	*/
+/*	$NetBSD: cpu.c,v 1.15.28.1 2009/08/26 03:46:39 matt Exp $	*/
 /*-
  * Copyright (c) 1999 Shin Takemura, All rights reserved.
  * Copyright (c) 1999-2001 SATO Kazumi, All rights reserved.
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.15 2008/01/04 22:13:55 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.15.28.1 2009/08/26 03:46:39 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -94,5 +94,5 @@
 
 	/* install CPU specific idle routine if any. */
 	if (platform.cpu_idle != NULL)
-		CPU_IDLE = (long *)platform.cpu_idle;
+		mips_locoresw.lsw_cpu_idle = platform.cpu_idle;
 }

Index: src/sys/arch/hpcmips/hpcmips/machdep.c
diff -u src/sys/arch/hpcmips/hpcmips/machdep.c:1.96 src/sys/arch/hpcmips/hpcmips/machdep.c:1.96.10.1
--- src/sys/arch/hpcmips/hpcmips/machdep.c:1.96	Wed Jul  2 17:28:55 2008
+++ src/sys/arch/hpcmips/hpcmips/machdep.c	Wed Aug 26 03:46:39 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.96 2008/07/02 17:28:55 ad Exp $	*/
+/*	$NetBSD: machdep.c,v 1.96.10.1 2009/08/26 03:46:39 matt Exp $	*/
 
 /*-
  * Copyright (c) 1999 Shin Takemura, All rights reserved.
@@ -108,7 +108,7 @@
  */
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.96 2008/07/02 17:28:55 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.96.10.1 2009/08/26 03:46:39 matt Exp $");
 
 #include "opt_vr41xx.h"
 #include "opt_tx39xx.h"
@@ -502,20 +502,21 @@
 	printf("mem_cluster_cnt = %d\n", mem_cluster_cnt);
 	physmem = 0;
 	for (i = 0; i < mem_cluster_cnt; i++) {
-		printf("mem_clusters[%d] = {0x%lx,0x%lx}\n", i,
+		printf("mem_clusters[%d] = {%#"PRIxPADDR",%#"PRIxPSIZE"}\n", i,
 		    (paddr_t)mem_clusters[i].start,
-		    (paddr_t)mem_clusters[i].size);
+		    (psize_t)mem_clusters[i].size);
 		physmem += atop(mem_clusters[i].size);
 	}
 
 	/* Cluster 0 is always the kernel, which doesn't get loaded. */
 	for (i = 1; i < mem_cluster_cnt; i++) {
-		paddr_t start, size;
+		paddr_t start;
+		psize_t size;
 
 		start = (paddr_t)mem_clusters[i].start;
-		size = (paddr_t)mem_clusters[i].size;
+		size = (psize_t)mem_clusters[i].size;
 
-		printf("loading 0x%lx,0x%lx\n", start, size);
+		printf("loading %#"PRIxPADDR",%#"PRIxPSIZE"\n", start, size);
 
 		memset((void *)MIPS_PHYS_TO_KSEG1(start), 0, size);
 
@@ -544,7 +545,7 @@
 {
 	vaddr_t minaddr, maxaddr;
 	char pbuf[9];
-	u_int i;
+	size_t i;
 #ifdef DEBUG
 	extern int pmapdebug;
 	int opmapdebug = pmapdebug;
@@ -564,10 +565,11 @@
 		/* show again when verbose mode */
 		printf("total memory banks = %d\n", mem_cluster_cnt);
 		for (i = 0; i < mem_cluster_cnt; i++) {
-			printf("memory bank %d = 0x%08lx %ldKB(0x%08lx)\n", i,
+			printf("memory bank %zu = "
+			    "0x%08"PRIxPADDR" %"PRIdPSIZE"KB(0x%08"PRIxPSIZE")\n", i,
 			    (paddr_t)mem_clusters[i].start,
-			    (paddr_t)mem_clusters[i].size/1024,
-			    (paddr_t)mem_clusters[i].size);
+			    (psize_t)mem_clusters[i].size/1024,
+			    (psize_t)mem_clusters[i].size);
 		}
 	}
 

Index: src/sys/arch/mips/include/ecoff_machdep.h
diff -u src/sys/arch/mips/include/ecoff_machdep.h:1.19 src/sys/arch/mips/include/ecoff_machdep.h:1.19.126.1
--- src/sys/arch/mips/include/ecoff_machdep.h:1.19	Fri Jan 17 23:36:08 2003
+++ src/sys/arch/mips/include/ecoff_machdep.h	Wed Aug 26 03:46:39 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ecoff_machdep.h,v 1.19 2003/01/17 23:36:08 thorpej Exp $	*/
+/*	$NetBSD: ecoff_machdep.h,v 1.19.126.1 2009/08/26 03:46:39 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Jonathan Stone
@@ -71,7 +71,7 @@
 #ifdef _KERNEL
 struct proc;
 struct exec_package;
-void	cpu_exec_ecoff_setregs(struct lwp *, struct exec_package *, u_long);
+void	cpu_exec_ecoff_setregs(struct lwp *, struct exec_package *, vaddr_t);
 #endif	/* _KERNEL */
 
 

Index: src/sys/arch/mips/mips/cpu_exec.c
diff -u src/sys/arch/mips/mips/cpu_exec.c:1.50.54.1.4.3 src/sys/arch/mips/mips/cpu_exec.c:1.50.54.1.4.4
--- src/sys/arch/mips/mips/cpu_exec.c:1.50.54.1.4.3	Sun Aug 23 03:24:08 2009
+++ src/sys/arch/mips/mips/cpu_exec.c	Wed Aug 26 03:46:39 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_exec.c,v 1.50.54.1.4.3 2009/08/23 03:24:08 matt Exp $	*/
+/*	$NetBSD: cpu_exec.c,v 1.50.54.1.4.4 2009/08/26 03:46:39 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_exec.c,v 1.50.54.1.4.3 2009/08/23 03:24:08 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_exec.c,v 1.50.54.1.4.4 2009/08/26 03:46:39 matt Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_compat_ultrix.h"
@@ -127,7 +127,7 @@
 cpu_exec_ecoff_setregs(l, epp, stack)
 	struct lwp *l;
 	struct exec_package *epp;
-	u_long stack;
+	vaddr_t stack;
 {
 	struct ecoff_exechdr *execp = (struct ecoff_exechdr *)epp->ep_hdr;
 	struct frame *f = l->l_md.md_regs;

Index: src/sys/arch/mips/mips/fp.S
diff -u src/sys/arch/mips/mips/fp.S:1.33.38.2 src/sys/arch/mips/mips/fp.S:1.33.38.3
--- src/sys/arch/mips/mips/fp.S:1.33.38.2	Sun Aug 23 13:29:09 2009
+++ src/sys/arch/mips/mips/fp.S	Wed Aug 26 03:46:39 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: fp.S,v 1.33.38.2 2009/08/23 13:29:09 uebayasi Exp $	*/
+/*	$NetBSD: fp.S,v 1.33.38.3 2009/08/26 03:46:39 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -1645,6 +1645,7 @@
 	xor	t0, t0, 1			# reverse sign
 	b	result_fs_d
 
+#ifdef MIPS3_PLUS
 /*
  * Single precision mips2 rounding.  Explicit case of cvt_w_s.
  */
@@ -1676,6 +1677,7 @@
 floor_w_d:
 	li	v1,3
 	b	_cvt_w_d
+#endif /* MIPS3_PLUS */
 
 /*
  * Convert double to single.

Index: src/sys/arch/newsmips/apbus/dmac3.c
diff -u src/sys/arch/newsmips/apbus/dmac3.c:1.12 src/sys/arch/newsmips/apbus/dmac3.c:1.12.14.1
--- src/sys/arch/newsmips/apbus/dmac3.c:1.12	Fri Jun 13 12:26:35 2008
+++ src/sys/arch/newsmips/apbus/dmac3.c	Wed Aug 26 03:46:39 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: dmac3.c,v 1.12 2008/06/13 12:26:35 cegger Exp $	*/
+/*	$NetBSD: dmac3.c,v 1.12.14.1 2009/08/26 03:46:39 matt Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dmac3.c,v 1.12 2008/06/13 12:26:35 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dmac3.c,v 1.12.14.1 2009/08/26 03:46:39 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -103,7 +103,7 @@
 	dmac3_reset(sc);
 
 	aprint_normal(" slot%d addr 0x%lx", apa->apa_slotno, apa->apa_hwbase);
-	aprint_normal(": ctlnum = %d, map = %p, va = %lx",
+	aprint_normal(": ctlnum = %d, map = %p, va = %#"PRIxVADDR,
 	       apa->apa_ctlnum, sc->sc_dmamap, sc->sc_dmaaddr);
 	aprint_normal("\n");
 }

Index: src/sys/arch/newsmips/newsmips/bus.c
diff -u src/sys/arch/newsmips/newsmips/bus.c:1.28 src/sys/arch/newsmips/newsmips/bus.c:1.28.16.1
--- src/sys/arch/newsmips/newsmips/bus.c:1.28	Wed Jun  4 12:41:41 2008
+++ src/sys/arch/newsmips/newsmips/bus.c	Wed Aug 26 03:46:40 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus.c,v 1.28 2008/06/04 12:41:41 ad Exp $	*/
+/*	$NetBSD: bus.c,v 1.28.16.1 2009/08/26 03:46:40 matt Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.28 2008/06/04 12:41:41 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.28.16.1 2009/08/26 03:46:40 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -201,7 +201,8 @@
 	bus_size_t sgsize;
 	bus_addr_t curaddr, lastaddr, baddr, bmask;
 	vaddr_t vaddr = (vaddr_t)buf;
-	int seg;
+	paddr_t pa;
+	size_t seg;
 
 	lastaddr = *lastaddrp;
 	bmask  = ~(map->_dm_boundary - 1);
@@ -212,9 +213,10 @@
 		 */
 		if (!VMSPACE_IS_KERNEL_P(vm))
 			(void) pmap_extract(vm_map_pmap(&vm->vm_map),
-			    vaddr, &curaddr);
+			    vaddr, &pa);
 		else
-			curaddr = kvtophys(vaddr);
+			pa = kvtophys(vaddr);
+		curaddr = pa;
 
 		/*
 		 * Compute the segment size, and adjust counts.

Index: src/sys/arch/pmax/pmax/bus_dma.c
diff -u src/sys/arch/pmax/pmax/bus_dma.c:1.49 src/sys/arch/pmax/pmax/bus_dma.c:1.49.16.1
--- src/sys/arch/pmax/pmax/bus_dma.c:1.49	Wed Jun  4 12:41:41 2008
+++ src/sys/arch/pmax/pmax/bus_dma.c	Wed Aug 26 03:46:40 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.49 2008/06/04 12:41:41 ad Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.49.16.1 2009/08/26 03:46:40 matt Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.49 2008/06/04 12:41:41 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.49.16.1 2009/08/26 03:46:40 matt Exp $");
 
 #include "opt_cputype.h"
 
@@ -169,6 +169,7 @@
 	int first;
 {
 	bus_size_t sgsize;
+	paddr_t pa;
 	bus_addr_t curaddr, lastaddr, baddr, bmask;
 	vaddr_t vaddr = (vaddr_t)buf;
 	int seg;
@@ -182,14 +183,15 @@
 		 */
 		if (!VMSPACE_IS_KERNEL_P(vm))
 			(void) pmap_extract(vm_map_pmap(&vm->vm_map),
-			    vaddr, &curaddr);
+			    vaddr, &pa);
 		else
-			curaddr = kvtophys(vaddr);
+			pa = kvtophys(vaddr);
+		curaddr = pa;
 
 		/*
 		 * Compute the segment size, and adjust counts.
 		 */
-		sgsize = PAGE_SIZE - ((u_long)vaddr & PGOFSET);
+		sgsize = PAGE_SIZE - (vaddr & PGOFSET);
 		if (buflen < sgsize)
 			sgsize = buflen;
 

Index: src/sys/arch/sgimips/hpc/hpc.c
diff -u src/sys/arch/sgimips/hpc/hpc.c:1.60 src/sys/arch/sgimips/hpc/hpc.c:1.60.38.1
--- src/sys/arch/sgimips/hpc/hpc.c:1.60	Wed Oct 17 19:57:04 2007
+++ src/sys/arch/sgimips/hpc/hpc.c	Wed Aug 26 03:46:40 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: hpc.c,v 1.60 2007/10/17 19:57:04 garbled Exp $	*/
+/*	$NetBSD: hpc.c,v 1.60.38.1 2009/08/26 03:46:40 matt Exp $	*/
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hpc.c,v 1.60 2007/10/17 19:57:04 garbled Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpc.c,v 1.60.38.1 2009/08/26 03:46:40 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -659,7 +659,7 @@
 	if (pnp)
 		printf("%s at %s", ha->ha_name, pnp);
 
-	printf(" offset 0x%lx", (vaddr_t)ha->ha_devoff);
+	printf(" offset %#" PRIxVADDR, (vaddr_t)ha->ha_devoff);
 
 	return (UNCONF);
 }

Index: src/sys/compat/irix/irix_exec.c
diff -u src/sys/compat/irix/irix_exec.c:1.52 src/sys/compat/irix/irix_exec.c:1.52.14.1
--- src/sys/compat/irix/irix_exec.c:1.52	Tue Apr 29 15:56:11 2008
+++ src/sys/compat/irix/irix_exec.c	Wed Aug 26 03:46:40 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: irix_exec.c,v 1.52 2008/04/29 15:56:11 ad Exp $ */
+/*	$NetBSD: irix_exec.c,v 1.52.14.1 2009/08/26 03:46:40 matt Exp $ */
 
 /*-
  * Copyright (c) 2001-2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: irix_exec.c,v 1.52 2008/04/29 15:56:11 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: irix_exec.c,v 1.52.14.1 2009/08/26 03:46:40 matt Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_syscall_debug.h"
@@ -122,9 +122,9 @@
  * set registers on exec for N32 applications
  */
 void
-irix_n32_setregs(struct lwp *l, struct exec_package *pack, u_long stack)
+irix_n32_setregs(struct lwp *l, struct exec_package *pack, vaddr_t stack)
 {
-	struct frame *f = (struct frame *)l->l_md.md_regs;
+	struct frame *f = l->l_md.md_regs;
 
 	/* Enable 64 bit instructions (eg: sd) */
 	f->f_regs[_R_SR] |= MIPS3_SR_UX;

Index: src/sys/compat/irix/irix_exec.h
diff -u src/sys/compat/irix/irix_exec.h:1.25 src/sys/compat/irix/irix_exec.h:1.25.14.1
--- src/sys/compat/irix/irix_exec.h:1.25	Mon Apr 28 20:23:41 2008
+++ src/sys/compat/irix/irix_exec.h	Wed Aug 26 03:46:40 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: irix_exec.h,v 1.25 2008/04/28 20:23:41 martin Exp $ */
+/*	$NetBSD: irix_exec.h,v 1.25.14.1 2009/08/26 03:46:40 matt Exp $ */
 
 /*-
  * Copyright (c) 2001-2002 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
     char *, vaddr_t *);
 #endif
 
-void irix_n32_setregs(struct lwp *, struct exec_package *, u_long);
+void irix_n32_setregs(struct lwp *, struct exec_package *, vaddr_t);
 
 extern const struct emul emul_irix;
 

Index: src/sys/dev/kloader.c
diff -u src/sys/dev/kloader.c:1.18 src/sys/dev/kloader.c:1.18.16.1
--- src/sys/dev/kloader.c:1.18	Wed Jun  4 12:41:40 2008
+++ src/sys/dev/kloader.c	Wed Aug 26 03:46:40 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: kloader.c,v 1.18 2008/06/04 12:41:40 ad Exp $	*/
+/*	$NetBSD: kloader.c,v 1.18.16.1 2009/08/26 03:46:40 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2004 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kloader.c,v 1.18 2008/06/04 12:41:40 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kloader.c,v 1.18.16.1 2009/08/26 03:46:40 matt Exp $");
 
 #include "debug_kloader.h"
 
@@ -510,7 +510,7 @@
 		if (freesz > sz)
 			freesz = sz;
 
-		DPRINTFN(1, "0x%08lx + 0x%zx <- 0x%lx\n", dst, freesz,
+		DPRINTFN(1, "0x%08"PRIxVADDR" + 0x%zx <- 0x%lx\n", dst, freesz,
 		    (unsigned long)ofs);
 		kloader_read(ofs, freesz, (void *)(tag->src + tag->sz));
 
@@ -535,7 +535,7 @@
 		if (freesz > sz)
 			freesz = sz;
 
-		DPRINTFN(1, "0x%08lx + 0x%zx <- %p\n", dst, freesz, src);
+		DPRINTFN(1, "0x%08"PRIxVADDR" + 0x%zx <- %p\n", dst, freesz, src);
 		memcpy((void *)(tag->src + tag->sz), src, freesz);
 
 		tag->sz += freesz;
@@ -559,7 +559,7 @@
 		if (freesz > sz)
 			freesz = sz;
 
-		DPRINTFN(1, "0x%08lx + 0x%zx\n", dst, freesz);
+		DPRINTFN(1, "0x%08"PRIxVADDR" + 0x%zx\n", dst, freesz);
 		memset((void *)(tag->src + tag->sz), 0, freesz);
 
 		tag->sz += freesz;

Index: src/sys/sys/exec_ecoff.h
diff -u src/sys/sys/exec_ecoff.h:1.18 src/sys/sys/exec_ecoff.h:1.18.94.1
--- src/sys/sys/exec_ecoff.h:1.18	Sun Dec 11 12:25:20 2005
+++ src/sys/sys/exec_ecoff.h	Wed Aug 26 03:46:40 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_ecoff.h,v 1.18 2005/12/11 12:25:20 christos Exp $	*/
+/*	$NetBSD: exec_ecoff.h,v 1.18.94.1 2009/08/26 03:46:40 matt Exp $	*/
 
 /*
  * Copyright (c) 1994 Adam Glass
@@ -105,7 +105,7 @@
 #ifdef _KERNEL
 int	exec_ecoff_makecmds(struct lwp *, struct exec_package *);
 int	cpu_exec_ecoff_probe(struct lwp *, struct exec_package *);
-void	cpu_exec_ecoff_setregs(struct lwp *, struct exec_package *, u_long);
+void	cpu_exec_ecoff_setregs(struct lwp *, struct exec_package *, vaddr_t);
 
 int	exec_ecoff_prep_omagic __P((struct lwp *, struct exec_package *,
 	    struct ecoff_exechdr *, struct vnode *));

Reply via email to