Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/rmind-uvmplock]: src/sys/arch A round of compile and other fixes to prev...



details:   https://anonhg.NetBSD.org/src/rev/0d68daba4ade
branches:  rmind-uvmplock
changeset: 753051:0d68daba4ade
user:      rmind <rmind%NetBSD.org@localhost>
date:      Sun Apr 25 19:38:59 2010 +0000

description:
A round of compile and other fixes to previous.

diffstat:

 sys/arch/acorn26/acorn26/machdep.c |   6 +++---
 sys/arch/arm/arm32/arm32_machdep.c |  10 +++-------
 sys/arch/hp700/hp700/machdep.c     |   8 ++++----
 sys/arch/mips/mips/mips_machdep.c  |   6 +++---
 sys/arch/sh3/sh3/vm_machdep.c      |   6 +++---
 sys/arch/sparc/sparc/machdep.c     |   6 +++---
 sys/arch/sparc64/sparc64/machdep.c |  13 ++++++++++---
 sys/arch/vax/vax/machdep.c         |   7 ++++---
 8 files changed, 33 insertions(+), 29 deletions(-)

diffs (244 lines):

diff -r 540b7f64bb07 -r 0d68daba4ade sys/arch/acorn26/acorn26/machdep.c
--- a/sys/arch/acorn26/acorn26/machdep.c        Sun Apr 25 15:51:38 2010 +0000
+++ b/sys/arch/acorn26/acorn26/machdep.c        Sun Apr 25 19:38:59 2010 +0000
@@ -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;
diff -r 540b7f64bb07 -r 0d68daba4ade sys/arch/arm/arm32/arm32_machdep.c
--- a/sys/arch/arm/arm32/arm32_machdep.c        Sun Apr 25 15:51:38 2010 +0000
+++ b/sys/arch/arm/arm32/arm32_machdep.c        Sun Apr 25 19:38:59 2010 +0000
@@ -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;
 }
diff -r 540b7f64bb07 -r 0d68daba4ade sys/arch/hp700/hp700/machdep.c
--- a/sys/arch/hp700/hp700/machdep.c    Sun Apr 25 15:51:38 2010 +0000
+++ b/sys/arch/hp700/hp700/machdep.c    Sun Apr 25 19:38:59 2010 +0000
@@ -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);
 }
diff -r 540b7f64bb07 -r 0d68daba4ade sys/arch/mips/mips/mips_machdep.c
--- a/sys/arch/mips/mips/mips_machdep.c Sun Apr 25 15:51:38 2010 +0000
+++ b/sys/arch/mips/mips/mips_machdep.c Sun Apr 25 19:38:59 2010 +0000
@@ -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;
diff -r 540b7f64bb07 -r 0d68daba4ade sys/arch/sh3/sh3/vm_machdep.c
--- a/sys/arch/sh3/sh3/vm_machdep.c     Sun Apr 25 15:51:38 2010 +0000
+++ b/sys/arch/sh3/sh3/vm_machdep.c     Sun Apr 25 19:38:59 2010 +0000
@@ -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;
diff -r 540b7f64bb07 -r 0d68daba4ade sys/arch/sparc/sparc/machdep.c
--- a/sys/arch/sparc/sparc/machdep.c    Sun Apr 25 15:51:38 2010 +0000
+++ b/sys/arch/sparc/sparc/machdep.c    Sun Apr 25 19:38:59 2010 +0000
@@ -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);
diff -r 540b7f64bb07 -r 0d68daba4ade sys/arch/sparc64/sparc64/machdep.c
--- a/sys/arch/sparc64/sparc64/machdep.c        Sun Apr 25 15:51:38 2010 +0000
+++ b/sys/arch/sparc64/sparc64/machdep.c        Sun Apr 25 19:38:59 2010 +0000
@@ -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;
+}
diff -r 540b7f64bb07 -r 0d68daba4ade sys/arch/vax/vax/machdep.c
--- a/sys/arch/vax/vax/machdep.c        Sun Apr 25 15:51:38 2010 +0000
+++ b/sys/arch/vax/vax/machdep.c        Sun Apr 25 19:38:59 2010 +0000
@@ -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];
 
        /*



Home | Main Index | Thread Index | Old Index