Module Name:    src
Committed By:   rmind
Date:           Sun Apr 25 19:39:00 UTC 2010

Modified Files:
        src/sys/arch/acorn26/acorn26 [rmind-uvmplock]: machdep.c
        src/sys/arch/arm/arm32 [rmind-uvmplock]: arm32_machdep.c
        src/sys/arch/hp700/hp700 [rmind-uvmplock]: machdep.c
        src/sys/arch/mips/mips [rmind-uvmplock]: mips_machdep.c
        src/sys/arch/sh3/sh3 [rmind-uvmplock]: vm_machdep.c
        src/sys/arch/sparc/sparc [rmind-uvmplock]: machdep.c
        src/sys/arch/sparc64/sparc64 [rmind-uvmplock]: machdep.c
        src/sys/arch/vax/vax [rmind-uvmplock]: machdep.c

Log Message:
A round of compile and other fixes to previous.


To generate a diff of this commit:
cvs rdiff -u -r1.33.2.2 -r1.33.2.3 src/sys/arch/acorn26/acorn26/machdep.c
cvs rdiff -u -r1.73.2.1 -r1.73.2.2 src/sys/arch/arm/arm32/arm32_machdep.c
cvs rdiff -u -r1.79.2.2 -r1.79.2.3 src/sys/arch/hp700/hp700/machdep.c
cvs rdiff -u -r1.225.4.2 -r1.225.4.3 src/sys/arch/mips/mips/mips_machdep.c
cvs rdiff -u -r1.66.4.2 -r1.66.4.3 src/sys/arch/sh3/sh3/vm_machdep.c
cvs rdiff -u -r1.302.2.2 -r1.302.2.3 src/sys/arch/sparc/sparc/machdep.c
cvs rdiff -u -r1.252.2.2 -r1.252.2.3 src/sys/arch/sparc64/sparc64/machdep.c
cvs rdiff -u -r1.179.2.2 -r1.179.2.3 src/sys/arch/vax/vax/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/acorn26/acorn26/machdep.c
diff -u src/sys/arch/acorn26/acorn26/machdep.c:1.33.2.2 src/sys/arch/acorn26/acorn26/machdep.c:1.33.2.3
--- src/sys/arch/acorn26/acorn26/machdep.c:1.33.2.2	Sun Apr 25 15:27:36 2010
+++ src/sys/arch/acorn26/acorn26/machdep.c	Sun Apr 25 19:38:59 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.33.2.2 2010/04/25 15:27:36 rmind Exp $ */
+/* $NetBSD: machdep.c,v 1.33.2.3 2010/04/25 19:38:59 rmind Exp $ */
 
 /*-
  * Copyright (c) 1998 Ben Harris
@@ -32,7 +32,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.33.2.2 2010/04/25 15:27:36 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.33.2.3 2010/04/25 19:38:59 rmind Exp $");
 
 #include <sys/buf.h>
 #include <sys/kernel.h>
@@ -223,7 +223,7 @@
 int
 mm_md_kernacc(void *ptr, vm_prot_t prot, bool *handled)
 {
-	const vaddr_t v = ptr;
+	const vaddr_t v = (vaddr_t)ptr;
 
 	*handled = (v >= MEMC_PHYS_BASE && v < MEMC_PHYS_BASE + ptoa(physmem));
 	return 0;

Index: src/sys/arch/arm/arm32/arm32_machdep.c
diff -u src/sys/arch/arm/arm32/arm32_machdep.c:1.73.2.1 src/sys/arch/arm/arm32/arm32_machdep.c:1.73.2.2
--- src/sys/arch/arm/arm32/arm32_machdep.c:1.73.2.1	Thu Mar 18 04:36:47 2010
+++ src/sys/arch/arm/arm32/arm32_machdep.c	Sun Apr 25 19:38:59 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: arm32_machdep.c,v 1.73.2.1 2010/03/18 04:36:47 rmind Exp $	*/
+/*	$NetBSD: arm32_machdep.c,v 1.73.2.2 2010/04/25 19:38:59 rmind Exp $	*/
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.73.2.1 2010/03/18 04:36:47 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.73.2.2 2010/04/25 19:38:59 rmind Exp $");
 
 #include "opt_modular.h"
 #include "opt_md.h"
@@ -489,9 +489,5 @@
 mm_md_physacc(paddr_t pa, vm_prot_t prot)
 {
 
-	if (pa < ctob(physmem))
-		return 0;
-
-	return kauth_authorize_machdep(kauth_cred_get(),
-	    KAUTH_MACHDEP_UNMANAGEDMEM, NULL, NULL, NULL, NULL);
+	return (pa < ctob(physmem)) ? 0 : EFAULT;
 }

Index: src/sys/arch/hp700/hp700/machdep.c
diff -u src/sys/arch/hp700/hp700/machdep.c:1.79.2.2 src/sys/arch/hp700/hp700/machdep.c:1.79.2.3
--- src/sys/arch/hp700/hp700/machdep.c:1.79.2.2	Sun Apr 25 15:27:36 2010
+++ src/sys/arch/hp700/hp700/machdep.c	Sun Apr 25 19:39:00 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.79.2.2 2010/04/25 15:27:36 rmind Exp $	*/
+/*	$NetBSD: machdep.c,v 1.79.2.3 2010/04/25 19:39:00 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.79.2.2 2010/04/25 15:27:36 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.79.2.3 2010/04/25 19:39:00 rmind Exp $");
 
 #include "opt_cputype.h"
 #include "opt_ddb.h"
@@ -1982,7 +1982,7 @@
 mm_md_physacc(paddr_t pa, vm_prot_t prot)
 {
 
-	return (atop(v) > physmem) ? EFAULT : 0;
+	return (atop(pa) > physmem) ? EFAULT : 0;
 }
 
 int
@@ -1990,5 +1990,5 @@
 {
 
 	*handled = false;
-	return mm_md_physacc(ptr, prot);
+	return mm_md_physacc((paddr_t)ptr, prot);
 }

Index: src/sys/arch/mips/mips/mips_machdep.c
diff -u src/sys/arch/mips/mips/mips_machdep.c:1.225.4.2 src/sys/arch/mips/mips/mips_machdep.c:1.225.4.3
--- src/sys/arch/mips/mips/mips_machdep.c:1.225.4.2	Sun Apr 25 15:27:36 2010
+++ src/sys/arch/mips/mips/mips_machdep.c	Sun Apr 25 19:39:00 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_machdep.c,v 1.225.4.2 2010/04/25 15:27:36 rmind Exp $	*/
+/*	$NetBSD: mips_machdep.c,v 1.225.4.3 2010/04/25 19:39:00 rmind 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.225.4.2 2010/04/25 15:27:36 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.225.4.3 2010/04/25 19:39:00 rmind Exp $");
 
 #include "opt_cputype.h"
 #include "opt_compat_netbsd32.h"
@@ -2205,7 +2205,7 @@
 mm_md_kernacc(void *ptr, vm_prot_t prot, bool *handled)
 {
 	extern paddr_t avail_end;
-	const vaddr_t v = ptr;
+	const vaddr_t v = (vaddr_t)ptr;
 
 	if (v < MIPS_KSEG0_START) {
 		return EFAULT;

Index: src/sys/arch/sh3/sh3/vm_machdep.c
diff -u src/sys/arch/sh3/sh3/vm_machdep.c:1.66.4.2 src/sys/arch/sh3/sh3/vm_machdep.c:1.66.4.3
--- src/sys/arch/sh3/sh3/vm_machdep.c:1.66.4.2	Sun Apr 25 15:27:37 2010
+++ src/sys/arch/sh3/sh3/vm_machdep.c	Sun Apr 25 19:39:00 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_machdep.c,v 1.66.4.2 2010/04/25 15:27:37 rmind Exp $	*/
+/*	$NetBSD: vm_machdep.c,v 1.66.4.3 2010/04/25 19:39:00 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved.
@@ -81,7 +81,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.66.4.2 2010/04/25 15:27:37 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.66.4.3 2010/04/25 19:39:00 rmind Exp $");
 
 #include "opt_kstack_debug.h"
 
@@ -417,7 +417,7 @@
 		*handled = true;
 		return 0;
 	}
-	if (va < SH3_P3SEG_BASE)) {
+	if (va < SH3_P3SEG_BASE) {
 		return EFAULT;
 	}
 	*handled = false;

Index: src/sys/arch/sparc/sparc/machdep.c
diff -u src/sys/arch/sparc/sparc/machdep.c:1.302.2.2 src/sys/arch/sparc/sparc/machdep.c:1.302.2.3
--- src/sys/arch/sparc/sparc/machdep.c:1.302.2.2	Sun Apr 25 15:27:37 2010
+++ src/sys/arch/sparc/sparc/machdep.c	Sun Apr 25 19:39:00 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.302.2.2 2010/04/25 15:27:37 rmind Exp $ */
+/*	$NetBSD: machdep.c,v 1.302.2.3 2010/04/25 19:39:00 rmind Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.302.2.2 2010/04/25 15:27:37 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.302.2.3 2010/04/25 19:39:00 rmind Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_compat_sunos.h"
@@ -2204,7 +2204,7 @@
 {
 	extern vaddr_t prom_vstart;
 	extern vaddr_t prom_vend;
-	const vaddr_t v = ptr;
+	const vaddr_t v = (vaddr_t)ptr;
 
 	*handled = (v >= MSGBUF_VA && v < MSGBUF_VA + PAGE_SIZE) ||
 	    (v >= prom_vstart && v < prom_vend && (prot & VM_PROT_WRITE) == 0);

Index: src/sys/arch/sparc64/sparc64/machdep.c
diff -u src/sys/arch/sparc64/sparc64/machdep.c:1.252.2.2 src/sys/arch/sparc64/sparc64/machdep.c:1.252.2.3
--- src/sys/arch/sparc64/sparc64/machdep.c:1.252.2.2	Sun Apr 25 15:27:37 2010
+++ src/sys/arch/sparc64/sparc64/machdep.c	Sun Apr 25 19:39:00 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.252.2.2 2010/04/25 15:27:37 rmind Exp $ */
+/*	$NetBSD: machdep.c,v 1.252.2.3 2010/04/25 19:39:00 rmind Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.252.2.2 2010/04/25 15:27:37 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.252.2.3 2010/04/25 19:39:00 rmind Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -2068,7 +2068,7 @@
 {
 	/* XXX: Don't know where PROMs are on Ultras.  Think it's at f000000 */
 	const vaddr_t prom_vstart = 0xf000000, prom_vend = 0xf0100000;
-	const vaddr_t msgbufpv = (vaddr_t)msgbufp, v = ptr;
+	const vaddr_t msgbufpv = (vaddr_t)msgbufp, v = (vaddr_t)ptr;
 	const size_t msgbufsz = msgbufp->msg_bufs +
 	    offsetof(struct kern_msgbuf, msg_bufc);
 
@@ -2076,3 +2076,10 @@
 	    (v >= prom_vstart && v < prom_vend && (prot & VM_PROT_WRITE) == 0);
 	return 0;
 }
+
+int
+mm_md_readwrite(dev_t dev, struct uio *uio)
+{
+
+	return ENXIO;
+}

Index: src/sys/arch/vax/vax/machdep.c
diff -u src/sys/arch/vax/vax/machdep.c:1.179.2.2 src/sys/arch/vax/vax/machdep.c:1.179.2.3
--- src/sys/arch/vax/vax/machdep.c:1.179.2.2	Sun Apr 25 15:27:37 2010
+++ src/sys/arch/vax/vax/machdep.c	Sun Apr 25 19:39:00 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.179.2.2 2010/04/25 15:27:37 rmind Exp $	 */
+/* $NetBSD: machdep.c,v 1.179.2.3 2010/04/25 19:39:00 rmind Exp $	 */
 
 /*
  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -83,7 +83,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.179.2.2 2010/04/25 15:27:37 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.179.2.3 2010/04/25 19:39:00 rmind Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -144,6 +144,8 @@
 #define DEV_LEDS	13	/* minor device 13 is leds */
 
 extern vaddr_t virtual_avail, virtual_end;
+extern paddr_t avail_end;
+
 /*
  * We do these external declarations here, maybe they should be done
  * somewhere else...
@@ -180,7 +182,6 @@
 #if VAX46 || VAX48 || VAX49 || VAX53 || VAXANY
 	vaddr_t		minaddr, maxaddr;
 #endif
-	extern paddr_t avail_end;
 	char pbuf[9];
 
 	/*

Reply via email to