diff options
author | alc <alc@FreeBSD.org> | 1999-06-22 07:18:20 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 1999-06-22 07:18:20 +0000 |
commit | f972513d8f41cbaf423ae23089fae989c21f2851 (patch) | |
tree | b44a1e7b6e279da7aab3beca5a5dcdc4f4557afb | |
parent | 1f87f11ed638911382d337fa5dd73ff478e23335 (diff) | |
download | FreeBSD-src-f972513d8f41cbaf423ae23089fae989c21f2851.zip FreeBSD-src-f972513d8f41cbaf423ae23089fae989c21f2851.tar.gz |
Remove (1) "extern" declarations for variables that were previously
made "static" and (2) initialized but unused variables.
-rw-r--r-- | sys/vm/vm_page.c | 17 | ||||
-rw-r--r-- | sys/vm/vm_page.h | 5 | ||||
-rw-r--r-- | sys/vm/vm_param.h | 37 |
3 files changed, 5 insertions, 54 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 9b98353..67acefa 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91 - * $Id: vm_page.c,v 1.131 1999/06/20 04:55:27 alc Exp $ + * $Id: vm_page.c,v 1.132 1999/06/20 21:47:02 alc Exp $ */ /* @@ -141,9 +141,6 @@ vm_page_queue_init(void) { vm_page_t vm_page_array = 0; static int vm_page_array_size = 0; long first_page = 0; -static long last_page; -static vm_size_t page_mask; -static int page_shift; int vm_page_zero_count = 0; static __inline int vm_page_hash __P((vm_object_t object, vm_pindex_t pindex)); @@ -155,21 +152,14 @@ static void vm_page_free_wakeup __P((void)); * Sets the page size, perhaps based upon the memory * size. Must be called before any use of page-size * dependent functions. - * - * Sets page_shift and page_mask from cnt.v_page_size. */ void vm_set_page_size() { - if (cnt.v_page_size == 0) cnt.v_page_size = PAGE_SIZE; - page_mask = cnt.v_page_size - 1; - if ((page_mask & cnt.v_page_size) != 0) + if (((cnt.v_page_size - 1) & cnt.v_page_size) != 0) panic("vm_set_page_size: page size not a power of two"); - for (page_shift = 0;; page_shift++) - if ((1 << page_shift) == cnt.v_page_size) - break; } /* @@ -284,9 +274,8 @@ vm_page_startup(starta, enda, vaddr) */ first_page = phys_avail[0] / PAGE_SIZE; - last_page = phys_avail[(nblocks - 1) * 2 + 1] / PAGE_SIZE; - page_range = last_page - (phys_avail[0] / PAGE_SIZE); + page_range = phys_avail[(nblocks - 1) * 2 + 1] / PAGE_SIZE - first_page; npages = (total - (page_range * sizeof(struct vm_page)) - (start - phys_avail[biggestone])) / PAGE_SIZE; diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 39e4524..5595891 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_page.h,v 1.60 1999/05/02 23:57:14 alc Exp $ + * $Id: vm_page.h,v 1.61 1999/06/19 18:42:53 alc Exp $ */ /* @@ -276,9 +276,6 @@ extern int vm_page_zero_count; extern vm_page_t vm_page_array; /* First resident page in table */ extern long first_page; /* first physical page number */ - /* ... represented in vm_page_array */ -extern long last_page; /* last physical page number */ - #define VM_PAGE_TO_PHYS(entry) ((entry)->phys_addr) #define PHYS_TO_VM_PAGE(pa) \ diff --git a/sys/vm/vm_param.h b/sys/vm/vm_param.h index 2f953c6..a3680c4 100644 --- a/sys/vm/vm_param.h +++ b/sys/vm/vm_param.h @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_param.h,v 1.9 1998/07/22 06:21:55 phk Exp $ + * $Id: vm_param.h,v 1.10 1999/06/20 04:55:29 alc Exp $ */ /* @@ -73,37 +73,6 @@ #include <machine/vmparam.h> -#if 0 - -/* - * The machine independent pages are refered to as PAGES. A page - * is some number of hardware pages, depending on the target machine. - */ -#define DEFAULT_PAGE_SIZE 4096 - -/* - * All references to the size of a page should be done with PAGE_SIZE - * or PAGE_SHIFT. The fact they are variables is hidden here so that - * we can easily make them constant if we so desire. - */ -#ifndef PAGE_SIZE -#define PAGE_SIZE cnt.v_page_size /* size of page */ -#endif -#ifndef PAGE_MASK -#define PAGE_MASK page_mask /* size of page - 1 */ -#endif -#ifndef PAGE_SHIFT -#define PAGE_SHIFT page_shift /* bits to shift for pages */ -#endif - -#endif - -#ifdef KERNEL -extern vm_size_t page_mask; -extern int page_shift; - -#endif - /* * CTL_VM identifiers */ @@ -152,10 +121,6 @@ extern int page_shift; #ifdef KERNEL #define num_pages(x) \ ((vm_offset_t)((((vm_offset_t)(x)) + PAGE_MASK) >> PAGE_SHIFT)) - -extern vm_size_t mem_size; /* size of physical memory (bytes) */ -extern vm_offset_t first_addr; /* first physical page */ -extern vm_offset_t last_addr; /* last physical page */ #endif /* KERNEL */ #endif /* ASSEMBLER */ #endif /* _VM_PARAM_ */ |