Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/oea Move powerpc_mmap_flags since pmap.c ca...



details:   https://anonhg.NetBSD.org/src/rev/131bced4cc55
branches:  trunk
changeset: 762276:131bced4cc55
user:      matt <matt%NetBSD.org@localhost>
date:      Fri Feb 18 16:40:50 2011 +0000

description:
Move powerpc_mmap_flags since pmap.c can get compiled multiple time resulting
in multiple defintions of powerpc_mmap_flags.

diffstat:

 sys/arch/powerpc/oea/pmap.c        |  17 ++---------------
 sys/arch/powerpc/oea/pmap_kernel.c |  16 ++++++++++++++--
 2 files changed, 16 insertions(+), 17 deletions(-)

diffs (72 lines):

diff -r 59833645a6fb -r 131bced4cc55 sys/arch/powerpc/oea/pmap.c
--- a/sys/arch/powerpc/oea/pmap.c       Fri Feb 18 16:22:10 2011 +0000
+++ b/sys/arch/powerpc/oea/pmap.c       Fri Feb 18 16:40:50 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.77 2011/02/15 19:39:12 macallan Exp $       */
+/*     $NetBSD: pmap.c,v 1.78 2011/02/18 16:40:50 matt Exp $   */
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -63,7 +63,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.77 2011/02/15 19:39:12 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.78 2011/02/18 16:40:50 matt Exp $");
 
 #define        PMAP_NOOPNAMES
 
@@ -3520,16 +3520,3 @@
        }
 #endif
 }
-
-u_int
-powerpc_mmap_flags(paddr_t pa)
-{
-       u_int flags = PMAP_MD_NOCACHE;
-
-       if (pa & POWERPC_MMAP_FLAG_PREFETCHABLE)
-               flags |= PMAP_MD_PREFETCHABLE;
-       if (pa & POWERPC_MMAP_FLAG_CACHEABLE)
-               flags &= ~PMAP_MD_NOCACHE;
-       return flags;
-}
-
diff -r 59833645a6fb -r 131bced4cc55 sys/arch/powerpc/oea/pmap_kernel.c
--- a/sys/arch/powerpc/oea/pmap_kernel.c        Fri Feb 18 16:22:10 2011 +0000
+++ b/sys/arch/powerpc/oea/pmap_kernel.c        Fri Feb 18 16:40:50 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap_kernel.c,v 1.3 2011/02/12 18:23:10 matt Exp $     */
+/*     $NetBSD: pmap_kernel.c,v 1.4 2011/02/18 16:40:50 matt Exp $     */
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -30,7 +30,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: pmap_kernel.c,v 1.3 2011/02/12 18:23:10 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: pmap_kernel.c,v 1.4 2011/02/18 16:40:50 matt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_pmap.h"
@@ -41,6 +41,18 @@
 extern struct pmap kernel_pmap_;
 struct pmap *const kernel_pmap_ptr = &kernel_pmap_;
 
+u_int
+powerpc_mmap_flags(paddr_t pa)
+{
+       u_int flags = PMAP_MD_NOCACHE;
+
+       if (pa & POWERPC_MMAP_FLAG_PREFETCHABLE)
+               flags |= PMAP_MD_PREFETCHABLE;
+       if (pa & POWERPC_MMAP_FLAG_CACHEABLE)
+               flags &= ~PMAP_MD_NOCACHE;
+       return flags;
+}
+
 #ifdef PMAP_NEEDS_FIXUP
 #include <powerpc/instr.h>
 



Home | Main Index | Thread Index | Old Index