diff options
| author | thorpej <thorpej@NetBSD.org> | 2001-04-25 17:35:00 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 2001-04-25 17:35:00 +0000 |
| commit | fe664428c898faaa36e5baf6af67a080bb6c8e17 (patch) | |
| tree | 1e0c880227f70543a7ab16ff16041d018a7deb72 /sys | |
| parent | 875a9af4877e33a0cced317659ff476dfaae5a41 (diff) | |
Garbage-collect pmap_page_index().
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/arch/arm/arm32/pmap.c | 3 | ||||
| -rw-r--r-- | sys/arch/hp300/include/pmap.h | 3 | ||||
| -rw-r--r-- | sys/arch/news68k/include/pmap.h | 3 | ||||
| -rw-r--r-- | sys/arch/sun2/include/pmap.h | 5 | ||||
| -rw-r--r-- | sys/arch/sun2/sun2/pmap.c | 31 | ||||
| -rw-r--r-- | sys/arch/sun3/include/pmap3.h | 5 | ||||
| -rw-r--r-- | sys/arch/sun3/sun3/pmap.c | 31 | ||||
| -rw-r--r-- | sys/arch/sun3/sun3x/pmap.c | 33 |
8 files changed, 8 insertions, 106 deletions
diff --git a/sys/arch/arm/arm32/pmap.c b/sys/arch/arm/arm32/pmap.c index c0b4a7f0d26..e0864966686 100644 --- a/sys/arch/arm/arm32/pmap.c +++ b/sys/arch/arm/arm32/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.7 2001/04/24 04:30:53 thorpej Exp $ */ +/* $NetBSD: pmap.c,v 1.8 2001/04/25 17:35:01 thorpej Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -173,7 +173,6 @@ int l1pt_reuse_count; /* stat - L1's reused count */ /* Local function prototypes (not used outside this file) */ pt_entry_t *pmap_pte __P((pmap_t pmap, vaddr_t va)); -int pmap_page_index __P((paddr_t pa)); void map_pagetable __P((vaddr_t pagetable, vaddr_t va, paddr_t pa, unsigned int flags)); void pmap_copy_on_write __P((paddr_t pa)); diff --git a/sys/arch/hp300/include/pmap.h b/sys/arch/hp300/include/pmap.h index 65f28cc95da..3e050913243 100644 --- a/sys/arch/hp300/include/pmap.h +++ b/sys/arch/hp300/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.28 2001/04/22 23:19:27 thorpej Exp $ */ +/* $NetBSD: pmap.h,v 1.29 2001/04/25 17:35:00 thorpej Exp $ */ /* * Copyright (c) 1987 Carnegie-Mellon University @@ -143,7 +143,6 @@ extern struct pmap kernel_pmap_store; extern struct pv_entry *pv_table; /* array of entries, one per page */ -#define pmap_page_index(pa) atop(pa - vm_first_phys) #define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count) #define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count) diff --git a/sys/arch/news68k/include/pmap.h b/sys/arch/news68k/include/pmap.h index b4afb1981fa..bd2c364ef57 100644 --- a/sys/arch/news68k/include/pmap.h +++ b/sys/arch/news68k/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.6 2001/04/22 23:19:29 thorpej Exp $ */ +/* $NetBSD: pmap.h,v 1.7 2001/04/25 17:35:01 thorpej Exp $ */ /* * Copyright (c) 1987 Carnegie-Mellon University @@ -134,7 +134,6 @@ extern struct pmap kernel_pmap_store; extern struct pv_entry *pv_table; /* array of entries, one per page */ -#define pmap_page_index(pa) atop(pa - vm_first_phys) #define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count) #define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count) diff --git a/sys/arch/sun2/include/pmap.h b/sys/arch/sun2/include/pmap.h index 4c1d6101b2b..cdd172d8661 100644 --- a/sys/arch/sun2/include/pmap.h +++ b/sys/arch/sun2/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.5 2001/04/22 23:19:30 thorpej Exp $ */ +/* $NetBSD: pmap.h,v 1.6 2001/04/25 17:35:01 thorpej Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -87,9 +87,6 @@ extern segsz_t pmap_wired_pages(pmap_t); #define pmap_update() /* nothing (yet) */ -/* Our memory is contiguous (or nearly so). */ -#define pmap_page_index(pa) (atop(pa)) - /* Map a given physical region to a virtual region */ extern vm_offset_t pmap_map __P((vm_offset_t, vm_offset_t, vm_offset_t, int)); diff --git a/sys/arch/sun2/sun2/pmap.c b/sys/arch/sun2/sun2/pmap.c index 501221e741b..43d6edc6ab0 100644 --- a/sys/arch/sun2/sun2/pmap.c +++ b/sys/arch/sun2/sun2/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.7 2001/04/24 04:31:13 thorpej Exp $ */ +/* $NetBSD: pmap.c,v 1.8 2001/04/25 17:35:02 thorpej Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -1885,35 +1885,6 @@ pmap_page_upload() } /* - * pmap_page_index() - * - * Given a physical address, return a page index. - * - * There can be some values that we never return (i.e. a hole) - * as long as the range of indices returned by this function - * is smaller than the value returned by pmap_free_pages(). - * The returned index does NOT need to start at zero. - * (This is normally a macro in pmap.h) - */ -#ifndef pmap_page_index -int -pmap_page_index(pa) - vm_offset_t pa; -{ - int idx; - -#ifdef DIAGNOSTIC - if (pa < avail_start || pa >= avail_end) - panic("pmap_page_index: pa=0x%lx", pa); -#endif /* DIAGNOSTIC */ - - idx = atop(pa); - return (idx); -} -#endif /* !pmap_page_index */ - - -/* * Initialize the pmap module. * Called by vm_init, to initialize any structures that the pmap * system needs to map virtual memory. diff --git a/sys/arch/sun3/include/pmap3.h b/sys/arch/sun3/include/pmap3.h index 5fea404c85f..68a423c684d 100644 --- a/sys/arch/sun3/include/pmap3.h +++ b/sys/arch/sun3/include/pmap3.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap3.h,v 1.29 2001/04/22 23:19:30 thorpej Exp $ */ +/* $NetBSD: pmap3.h,v 1.30 2001/04/25 17:35:01 thorpej Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -78,9 +78,6 @@ extern segsz_t pmap_wired_pages(pmap_t); #define pmap_update() /* nothing (yet) */ -/* Our memory is contiguous (or nearly so). */ -#define pmap_page_index(pa) (atop(pa)) - /* Map a given physical region to a virtual region */ extern vm_offset_t pmap_map __P((vm_offset_t, vm_offset_t, vm_offset_t, int)); diff --git a/sys/arch/sun3/sun3/pmap.c b/sys/arch/sun3/sun3/pmap.c index e96741804e1..e18737cdc65 100644 --- a/sys/arch/sun3/sun3/pmap.c +++ b/sys/arch/sun3/sun3/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.127 2001/04/24 04:31:14 thorpej Exp $ */ +/* $NetBSD: pmap.c,v 1.128 2001/04/25 17:35:02 thorpej Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -1912,35 +1912,6 @@ pmap_page_upload() } /* - * pmap_page_index() - * - * Given a physical address, return a page index. - * - * There can be some values that we never return (i.e. a hole) - * as long as the range of indices returned by this function - * is smaller than the value returned by pmap_free_pages(). - * The returned index does NOT need to start at zero. - * (This is normally a macro in pmap.h) - */ -#ifndef pmap_page_index -int -pmap_page_index(pa) - vm_offset_t pa; -{ - int idx; - -#ifdef DIAGNOSTIC - if (pa < avail_start || pa >= avail_end) - panic("pmap_page_index: pa=0x%lx", pa); -#endif /* DIAGNOSTIC */ - - idx = atop(pa); - return (idx); -} -#endif /* !pmap_page_index */ - - -/* * Initialize the pmap module. * Called by vm_init, to initialize any structures that the pmap * system needs to map virtual memory. diff --git a/sys/arch/sun3/sun3x/pmap.c b/sys/arch/sun3/sun3x/pmap.c index 4bdac1b109f..edb77ffd969 100644 --- a/sys/arch/sun3/sun3x/pmap.c +++ b/sys/arch/sun3/sun3x/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.65 2001/04/24 04:31:15 thorpej Exp $ */ +/* $NetBSD: pmap.c,v 1.66 2001/04/25 17:35:03 thorpej Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -579,7 +579,6 @@ static void pmap_page_upload __P((void)); ** - functions required by the Mach VM Pmap interface, with MACHINE_CONTIG ** defined. **/ -int pmap_page_index __P((vm_offset_t)); void pmap_pinit __P((pmap_t)); void pmap_release __P((pmap_t)); @@ -3694,36 +3693,6 @@ pmap_page_upload() } } -/* pmap_page_index INTERFACE - ** - * Return the index of the given physical page in a list of useable - * physical pages in the system. Holes in physical memory may be counted - * if so desired. As long as pmap_free_pages() and pmap_page_index() - * agree as to whether holes in memory do or do not count as valid pages, - * it really doesn't matter. However, if you like to save a little - * memory, don't count holes as valid pages. This is even more true when - * the holes are large. - * - * We will not count holes as valid pages. We can generate page indices - * that conform to this by using the memory bank structures initialized - * in pmap_alloc_pv(). - */ -int -pmap_page_index(pa) - vm_offset_t pa; -{ - struct pmap_physmem_struct *bank = avail_mem; - vm_offset_t off; - - /* Search for the memory bank with this page. */ - /* XXX - What if it is not physical memory? */ - while (pa > bank->pmem_end) - bank = bank->pmem_next; - off = pa - bank->pmem_start; - - return (bank->pmem_pvbase + m68k_btop(off)); -} - /* pmap_count INTERFACE ** * Return the number of resident (valid) pages in the given pmap. |
