Module Name: src Committed By: uebayasi Date: Thu Apr 29 03:07:54 UTC 2010
Modified Files: src/sys/uvm [uebayasi-xip]: uvm_page.c Log Message: Revert previous; unintended changes mixed. To generate a diff of this commit: cvs rdiff -u -r1.153.2.32 -r1.153.2.33 src/sys/uvm/uvm_page.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/uvm/uvm_page.c diff -u src/sys/uvm/uvm_page.c:1.153.2.32 src/sys/uvm/uvm_page.c:1.153.2.33 --- src/sys/uvm/uvm_page.c:1.153.2.32 Thu Apr 29 03:00:47 2010 +++ src/sys/uvm/uvm_page.c Thu Apr 29 03:07:53 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_page.c,v 1.153.2.32 2010/04/29 03:00:47 uebayasi Exp $ */ +/* $NetBSD: uvm_page.c,v 1.153.2.33 2010/04/29 03:07:53 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.32 2010/04/29 03:00:47 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.153.2.33 2010/04/29 03:07:53 uebayasi Exp $"); #include "opt_ddb.h" #include "opt_uvmhist.h" @@ -757,9 +757,8 @@ */ static struct vm_physseg * -uvm_page_physload_common(struct vm_physseg_freelist * const, - struct vm_physseg **, int, - const paddr_t, const paddr_t, const paddr_t, const paddr_t); +uvm_page_physload_common(struct vm_physseg_freelist * const, struct vm_physseg **, int, + const paddr_t, const paddr_t, const paddr_t, const paddr_t, const int); static void uvm_page_physunload_common(struct vm_physseg_freelist *, struct vm_physseg **, struct vm_physseg *); @@ -779,11 +778,8 @@ struct vm_physseg *seg; int lcv; - if (free_list >= VM_NFREELIST || free_list < VM_FREELIST_DEFAULT) - panic("uvm_page_physload: bad free list %d", free_list); - seg = uvm_page_physload_common(&vm_physmem_freelist, vm_physmem_ptrs, - vm_nphysmem, start, end, avail_start, avail_end); + vm_nphysmem, start, end, avail_start, avail_end, free_list); KASSERT(seg != NULL); seg->avail_start = avail_start; @@ -824,16 +820,14 @@ #ifdef DEVICE_PAGE void * uvm_page_physload_device(paddr_t start, paddr_t end, paddr_t avail_start, - paddr_t avail_end, int prot, int flags) + paddr_t avail_end, int free_list) { struct vm_physseg *seg; seg = uvm_page_physload_common(&vm_physdev_freelist, vm_physdev_ptrs, - vm_nphysdev, start, end, avail_start, avail_end); + vm_nphysdev, start, end, avail_start, avail_end, free_list); KASSERT(seg != NULL); - seg->prot = prot; - seg->flags = flags; /* XXXUEBS BUS_SPACE_MAP_* */ for (paddr_t pf = start; pf < end; pf++) vm_page_device_mdpage_insert(pf); vm_nphysdev++; @@ -856,13 +850,15 @@ uvm_page_physload_common(struct vm_physseg_freelist *freelist, struct vm_physseg **segs, int nsegs, const paddr_t start, const paddr_t end, - const paddr_t avail_start, const paddr_t avail_end) + const paddr_t avail_start, const paddr_t avail_end, const int free_list) { struct vm_physseg *ps; static int uvm_page_physseg_inited; if (uvmexp.pagesize == 0) panic("uvm_page_physload: page size not set!"); + if (free_list >= VM_NFREELIST || free_list < VM_FREELIST_DEFAULT) + panic("uvm_page_physload: bad free list %d", free_list); if (start >= end) panic("uvm_page_physload: start >= end"); if (nsegs == VM_PHYSSEG_MAX) @@ -972,7 +968,7 @@ *segp = *(segp + 1); segp++; } - *segp = NULL; + *(segp + VM_PHYSSEG_MAX - 1) = NULL; } /*