Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/uebayasi-xip]: src/sys/uvm Put back vm_page::phys_addr for now, because ...
details: https://anonhg.NetBSD.org/src/rev/5217c143dd95
branches: uebayasi-xip
changeset: 751596:5217c143dd95
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Tue Feb 23 15:38:30 2010 +0000
description:
Put back vm_page::phys_addr for now, because removing it involves some random
parts in the tree. I'll revisit this after merging the branch.
diffstat:
sys/uvm/uvm_page.c | 21 ++++++++++++++++-----
sys/uvm/uvm_page.h | 6 +++++-
2 files changed, 21 insertions(+), 6 deletions(-)
diffs (89 lines):
diff -r fd48cd29da2d -r 5217c143dd95 sys/uvm/uvm_page.c
--- a/sys/uvm/uvm_page.c Tue Feb 23 15:27:55 2010 +0000
+++ b/sys/uvm/uvm_page.c Tue Feb 23 15:38:30 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_page.c,v 1.153.2.14 2010/02/23 08:46:17 uebayasi Exp $ */
+/* $NetBSD: uvm_page.c,v 1.153.2.15 2010/02/23 15:38:30 uebayasi Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.153.2.14 2010/02/23 08:46:17 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.153.2.15 2010/02/23 15:38:30 uebayasi Exp $");
#include "opt_ddb.h"
#include "opt_uvmhist.h"
@@ -452,6 +452,9 @@
/* init and free vm_pages (we've already zeroed them) */
paddr = ptoa(vm_physmem[lcv].start);
for (i = 0 ; i < n ; i++, paddr += PAGE_SIZE) {
+#if 1
+ vm_physmem[lcv].pgs[i].phys_addr = paddr;
+#endif
#ifdef __HAVE_VM_PAGE_MD
VM_MDPAGE_INIT(&vm_physmem[lcv].pgs[i].mdpage, paddr);
#endif
@@ -835,10 +838,13 @@
printf("\tignoring 0x%lx -> 0x%lx\n", start, end);
return;
}
- /* zero data, init free_list, and free pages */
+ /* zero data, init phys_addr, free_list, and free pages */
memset(pgs, 0, sizeof(struct vm_page) * npages);
for (lcv = 0, paddr = ptoa(start) ;
lcv < npages ; lcv++, paddr += PAGE_SIZE) {
+#if 1
+ pgs[lcv].phys_addr = paddr;
+#endif
pgs[lcv].free_list = free_list;
if (atop(paddr) >= avail_start &&
atop(paddr) <= avail_end)
@@ -1142,18 +1148,23 @@
paddr_t
uvm_vm_page_to_phys(const struct vm_page *pg)
{
- const struct vm_physseg *seg;
- int psi;
#ifdef DEVICE_PAGE
if (uvm_pageisdevice_p(pg)) {
return VM_PAGE_DEVICE_TO_PHYS(pg);
}
#endif
+#if 1
+ return pg->phys_addr;
+#else
+ const struct vm_physseg *seg;
+ int psi;
+
psi = VM_PHYSSEG_FIND(vm_physmem, vm_nphysmem, VM_PHYSSEG_OP_PG, 0, pg, NULL);
KASSERT(psi != -1);
seg = &vm_physmem[psi];
return (seg->start + pg - seg->pgs) * PAGE_SIZE;
+#endif
}
diff -r fd48cd29da2d -r 5217c143dd95 sys/uvm/uvm_page.h
--- a/sys/uvm/uvm_page.h Tue Feb 23 15:27:55 2010 +0000
+++ b/sys/uvm/uvm_page.h Tue Feb 23 15:38:30 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_page.h,v 1.59.2.14 2010/02/23 08:46:17 uebayasi Exp $ */
+/* $NetBSD: uvm_page.h,v 1.59.2.15 2010/02/23 15:38:30 uebayasi Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -142,6 +142,10 @@
* to modify: [O _and_ P] */
uint16_t wire_count; /* wired down map refs [P] */
uint16_t pqflags; /* page queue flags [P] */
+#if 1
+ paddr_t phys_addr; /* physical address of page */
+#endif
+
#ifdef __HAVE_VM_PAGE_MD
struct vm_page_md mdpage; /* pmap-specific data */
Home |
Main Index |
Thread Index |
Old Index