Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/ibm4xx introduce evbppc pmap to the uvm_hot...



details:   https://anonhg.NetBSD.org/src/rev/60a006e67c8c
branches:  trunk
changeset: 819959:60a006e67c8c
user:      cherry <cherry%NetBSD.org@localhost>
date:      Sat Dec 24 18:07:31 2016 +0000

description:
introduce evbppc pmap to the uvm_hotplug(9) API

Should fix build.

diffstat:

 sys/arch/powerpc/ibm4xx/pmap.c |  24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)

diffs (65 lines):

diff -r 6951b36cf813 -r 60a006e67c8c sys/arch/powerpc/ibm4xx/pmap.c
--- a/sys/arch/powerpc/ibm4xx/pmap.c    Sat Dec 24 17:44:22 2016 +0000
+++ b/sys/arch/powerpc/ibm4xx/pmap.c    Sat Dec 24 18:07:31 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.74 2016/12/23 07:15:27 cherry Exp $ */
+/*     $NetBSD: pmap.c,v 1.75 2016/12/24 18:07:31 cherry Exp $ */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.74 2016/12/23 07:15:27 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.75 2016/12/24 18:07:31 cherry Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -197,23 +197,25 @@
 struct pv_entry *
 pa_to_pv(paddr_t pa)
 {
-       int bank, pg;
+       uvm_physseg_t bank;
+       psize_t pg;
 
        bank = uvm_physseg_find(atop(pa), &pg);
        if (bank == -1)
                return NULL;
-       return &VM_PHYSMEM_PTR(bank)->pmseg.pvent[pg];
+       return &uvm_physseg_get_pmseg(bank)->pvent[pg];
 }
 
 static inline char *
 pa_to_attr(paddr_t pa)
 {
-       int bank, pg;
+       uvm_physseg_t bank;
+       psize_t pg;
 
        bank = uvm_physseg_find(atop(pa), &pg);
        if (bank == -1)
                return NULL;
-       return &VM_PHYSMEM_PTR(bank)->pmseg.attrs[pg];
+       return &uvm_physseg_get_pmseg(bank)->attrs[pg];
 }
 
 /*
@@ -473,10 +475,12 @@
 
        pv = pv_table;
        attr = pmap_attrib;
-       for (bank = 0; bank < vm_nphysseg; bank++) {
-               sz = VM_PHYSMEM_PTR(bank)->end - VM_PHYSMEM_PTR(bank)->start;
-               VM_PHYSMEM_PTR(bank)->pmseg.pvent = pv;
-               VM_PHYSMEM_PTR(bank)->pmseg.attrs = attr;
+       for (bank = uvm_physseg_get_first();
+            uvm_physseg_valid_p(bank);
+            bank = uvm_physseg_get_next(bank)) {
+               sz = uvm_physseg_get_end(bank) - uvm_physseg_get_start(bank);
+               uvm_physseg_get_pmseg(bank)->pvent = pv;
+               uvm_physseg_get_pmseg(bank)->attrs = attr;
                pv += sz;
                attr += sz;
        }



Home | Main Index | Thread Index | Old Index