Fixed various prototype problems with the pmap functions and the subsequent

problems that fixing them caused.
This commit is contained in:
dg 1994-08-06 10:25:50 +00:00
parent e1ff3868d9
commit d54669e82c
10 changed files with 77 additions and 85 deletions

View File

@ -23,17 +23,17 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: db_trace.c,v 1.4 1994/01/03 07:55:19 davidg Exp $
* $Id: db_trace.c,v 1.6 1994/05/25 08:53:21 rgrimes Exp $
*/
#include "param.h"
#include "systm.h"
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <vm/lock.h>
#include <vm/vm_prot.h>
#include <vm/pmap.h>
#include <machine/pmap.h>
#include "systm.h"
#include "proc.h"
#include "ddb/ddb.h"

View File

@ -38,7 +38,7 @@
*
* from: Utah $Hdr: mem.c 1.13 89/10/08$
* from: @(#)mem.c 7.2 (Berkeley) 5/9/91
* $Id: mem.c,v 1.6 1993/12/19 00:50:06 wollman Exp $
* $Id: mem.c,v 1.8 1994/05/25 08:54:24 rgrimes Exp $
*/
/*
@ -56,6 +56,7 @@
#include <machine/cpu.h>
#include <machine/psl.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <vm/lock.h>
#include <vm/vm_prot.h>

View File

@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
* $Id: pmap.c,v 1.27 1994/08/03 02:45:28 davidg Exp $
* $Id: pmap.c,v 1.28 1994/08/06 09:15:15 davidg Exp $
*/
/*
@ -132,33 +132,28 @@ int protection_codes[8];
struct pmap kernel_pmap_store;
pmap_t kernel_pmap;
vm_offset_t phys_avail[6]; /* 2 entries + 1 null */
vm_offset_t avail_start; /* PA of first available physical page */
vm_offset_t avail_end; /* PA of last available physical page */
vm_size_t mem_size; /* memory size in bytes */
vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss)*/
vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */
vm_offset_t phys_avail[6]; /* 2 entries + 1 null */
vm_offset_t avail_start; /* PA of first available physical page */
vm_offset_t avail_end; /* PA of last available physical page */
vm_size_t mem_size; /* memory size in bytes */
vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss)*/
vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */
int i386pagesperpage; /* PAGE_SIZE / I386_PAGE_SIZE */
boolean_t pmap_initialized = FALSE; /* Has pmap_init completed? */
boolean_t pmap_initialized = FALSE; /* Has pmap_init completed? */
vm_offset_t vm_first_phys, vm_last_phys;
static inline boolean_t pmap_testbit();
static inline void pmap_changebit();
static inline int pmap_is_managed();
static inline void *vm_get_pmap();
static inline void * vm_get_pmap();
static inline void vm_put_pmap();
inline void pmap_use_pt();
inline void pmap_unuse_pt();
inline pt_entry_t * pmap_pte();
static inline pv_entry_t get_pv_entry();
void pmap_alloc_pv_entry();
void pmap_clear_modify();
static void i386_protection_init();
static void pmap_alloc_pv_entry();
static inline pv_entry_t get_pv_entry();
static inline void pmap_use_pt();
static inline void pmap_unuse_pt();
void pmap_kenter __P((vm_offset_t, vm_offset_t));
void pmap_kremove __P((vm_offset_t));
void pmap_qenter __P((vm_offset_t, vm_page_t *, int));
void pmap_qremove __P((vm_offset_t, int));
inline pt_entry_t * pmap_pte();
extern vm_offset_t clean_sva, clean_eva;
extern int cpu_class;
@ -671,7 +666,7 @@ get_pv_entry()
* *possibility* of a malloc failure (*FATAL*) for a pv_entry_t data structure.
* also -- this code is MUCH MUCH faster than the malloc equiv...
*/
void
static void
pmap_alloc_pv_entry()
{
/*

View File

@ -38,7 +38,7 @@
*
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
* $Id: vm_machdep.c,v 1.22 1994/05/25 08:55:23 rgrimes Exp $
* $Id: vm_machdep.c,v 1.23 1994/08/06 09:20:56 davidg Exp $
*/
#include "npx.h"
@ -803,7 +803,7 @@ vunmapbuf(bp)
vm_page_unhold(PHYS_TO_VM_PAGE(pa));
lastv = v;
}
pmap_kremove( addr);
pmap_kremove((vm_offset_t)addr);
}
}

View File

@ -23,17 +23,17 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: db_trace.c,v 1.4 1994/01/03 07:55:19 davidg Exp $
* $Id: db_trace.c,v 1.6 1994/05/25 08:53:21 rgrimes Exp $
*/
#include "param.h"
#include "systm.h"
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <vm/lock.h>
#include <vm/vm_prot.h>
#include <vm/pmap.h>
#include <machine/pmap.h>
#include "systm.h"
#include "proc.h"
#include "ddb/ddb.h"

View File

@ -38,7 +38,7 @@
*
* from: Utah $Hdr: mem.c 1.13 89/10/08$
* from: @(#)mem.c 7.2 (Berkeley) 5/9/91
* $Id: mem.c,v 1.6 1993/12/19 00:50:06 wollman Exp $
* $Id: mem.c,v 1.8 1994/05/25 08:54:24 rgrimes Exp $
*/
/*
@ -56,6 +56,7 @@
#include <machine/cpu.h>
#include <machine/psl.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <vm/lock.h>
#include <vm/vm_prot.h>

View File

@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
* $Id: pmap.c,v 1.27 1994/08/03 02:45:28 davidg Exp $
* $Id: pmap.c,v 1.28 1994/08/06 09:15:15 davidg Exp $
*/
/*
@ -132,33 +132,28 @@ int protection_codes[8];
struct pmap kernel_pmap_store;
pmap_t kernel_pmap;
vm_offset_t phys_avail[6]; /* 2 entries + 1 null */
vm_offset_t avail_start; /* PA of first available physical page */
vm_offset_t avail_end; /* PA of last available physical page */
vm_size_t mem_size; /* memory size in bytes */
vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss)*/
vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */
vm_offset_t phys_avail[6]; /* 2 entries + 1 null */
vm_offset_t avail_start; /* PA of first available physical page */
vm_offset_t avail_end; /* PA of last available physical page */
vm_size_t mem_size; /* memory size in bytes */
vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss)*/
vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */
int i386pagesperpage; /* PAGE_SIZE / I386_PAGE_SIZE */
boolean_t pmap_initialized = FALSE; /* Has pmap_init completed? */
boolean_t pmap_initialized = FALSE; /* Has pmap_init completed? */
vm_offset_t vm_first_phys, vm_last_phys;
static inline boolean_t pmap_testbit();
static inline void pmap_changebit();
static inline int pmap_is_managed();
static inline void *vm_get_pmap();
static inline void * vm_get_pmap();
static inline void vm_put_pmap();
inline void pmap_use_pt();
inline void pmap_unuse_pt();
inline pt_entry_t * pmap_pte();
static inline pv_entry_t get_pv_entry();
void pmap_alloc_pv_entry();
void pmap_clear_modify();
static void i386_protection_init();
static void pmap_alloc_pv_entry();
static inline pv_entry_t get_pv_entry();
static inline void pmap_use_pt();
static inline void pmap_unuse_pt();
void pmap_kenter __P((vm_offset_t, vm_offset_t));
void pmap_kremove __P((vm_offset_t));
void pmap_qenter __P((vm_offset_t, vm_page_t *, int));
void pmap_qremove __P((vm_offset_t, int));
inline pt_entry_t * pmap_pte();
extern vm_offset_t clean_sva, clean_eva;
extern int cpu_class;
@ -671,7 +666,7 @@ get_pv_entry()
* *possibility* of a malloc failure (*FATAL*) for a pv_entry_t data structure.
* also -- this code is MUCH MUCH faster than the malloc equiv...
*/
void
static void
pmap_alloc_pv_entry()
{
/*

View File

@ -38,7 +38,7 @@
*
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
* $Id: vm_machdep.c,v 1.22 1994/05/25 08:55:23 rgrimes Exp $
* $Id: vm_machdep.c,v 1.23 1994/08/06 09:20:56 davidg Exp $
*/
#include "npx.h"
@ -803,7 +803,7 @@ vunmapbuf(bp)
vm_page_unhold(PHYS_TO_VM_PAGE(pa));
lastv = v;
}
pmap_kremove( addr);
pmap_kremove((vm_offset_t)addr);
}
}

View File

@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id$
* $Id: pmap.h,v 1.2 1994/08/02 07:55:12 davidg Exp $
*/
/*
@ -88,36 +88,36 @@ typedef struct pmap_statistics *pmap_statistics_t;
#ifdef KERNEL
__BEGIN_DECLS
void *pmap_bootstrap_alloc __P((int));
void pmap_bootstrap( /* machine dependent */ );
void pmap_change_wiring __P((pmap_t, vm_offset_t, boolean_t));
void pmap_clear_modify __P((vm_offset_t pa));
void pmap_clear_reference __P((vm_offset_t pa));
void pmap_collect __P((pmap_t));
void pmap_copy __P((pmap_t,
pmap_t, vm_offset_t, vm_size_t, vm_offset_t));
void pmap_copy_page __P((vm_offset_t, vm_offset_t));
pmap_t pmap_create __P((vm_size_t));
void pmap_destroy __P((pmap_t));
void pmap_enter __P((pmap_t,
vm_offset_t, vm_offset_t, vm_prot_t, boolean_t));
vm_offset_t pmap_extract __P((pmap_t, vm_offset_t));
void pmap_init __P((vm_offset_t, vm_offset_t));
boolean_t pmap_is_modified __P((vm_offset_t pa));
boolean_t pmap_is_referenced __P((vm_offset_t pa));
vm_offset_t pmap_map __P((vm_offset_t, vm_offset_t, vm_offset_t, int));
void pmap_page_protect __P((vm_offset_t, vm_prot_t));
void pmap_pageable __P((pmap_t,
vm_offset_t, vm_offset_t, boolean_t));
vm_offset_t pmap_phys_address __P((int));
void pmap_pinit __P((pmap_t));
void pmap_protect __P((pmap_t,
vm_offset_t, vm_offset_t, vm_prot_t));
void pmap_reference __P((pmap_t));
void pmap_release __P((pmap_t));
void pmap_remove __P((pmap_t, vm_offset_t, vm_offset_t));
void pmap_update __P((void));
void pmap_zero_page __P((vm_offset_t));
void * pmap_bootstrap_alloc __P((int));
void pmap_bootstrap __P((/* machine dependent */));
void pmap_change_wiring __P((pmap_t, vm_offset_t, boolean_t));
void pmap_clear_modify __P((vm_offset_t pa));
void pmap_clear_reference __P((vm_offset_t pa));
void pmap_collect __P((pmap_t));
void pmap_copy __P((pmap_t, pmap_t, vm_offset_t, vm_size_t, vm_offset_t));
void pmap_copy_page __P((vm_offset_t, vm_offset_t));
pmap_t pmap_create __P((vm_size_t));
void pmap_destroy __P((pmap_t));
void pmap_enter __P((pmap_t, vm_offset_t, vm_offset_t, vm_prot_t, boolean_t));
vm_offset_t pmap_extract __P((pmap_t, vm_offset_t));
void pmap_init __P((vm_offset_t, vm_offset_t));
boolean_t pmap_is_modified __P((vm_offset_t pa));
boolean_t pmap_is_referenced __P((vm_offset_t pa));
void pmap_kenter __P((vm_offset_t, vm_offset_t));
void pmap_kremove __P((vm_offset_t));
vm_offset_t pmap_map __P((vm_offset_t, vm_offset_t, vm_offset_t, int));
void pmap_page_protect __P((vm_offset_t, vm_prot_t));
void pmap_pageable __P((pmap_t, vm_offset_t, vm_offset_t, boolean_t));
vm_offset_t pmap_phys_address __P((int));
void pmap_pinit __P((pmap_t));
void pmap_protect __P((pmap_t, vm_offset_t, vm_offset_t, vm_prot_t));
void pmap_qenter __P((vm_offset_t, vm_page_t *, int));
void pmap_qremove __P((vm_offset_t, int));
void pmap_reference __P((pmap_t));
void pmap_release __P((pmap_t));
void pmap_remove __P((pmap_t, vm_offset_t, vm_offset_t));
void pmap_update __P((void));
void pmap_zero_page __P((vm_offset_t));
__END_DECLS
#endif

View File

@ -37,7 +37,7 @@
* SUCH DAMAGE.
*
* from: @(#)vnode_pager.c 7.5 (Berkeley) 4/20/91
* $Id: vnode_pager.c,v 1.3 1994/08/04 03:06:48 davidg Exp $
* $Id: vnode_pager.c,v 1.4 1994/08/06 09:15:42 davidg Exp $
*/
/*
@ -1043,7 +1043,7 @@ vnode_pager_input(vnp, m, count, reqpage)
for(i=0;i<counta;i++) {
vm_page_deactivate(m[count+i]);
}
pmap_qenter(bpa->b_data, &m[count], counta);
pmap_qenter((vm_offset_t)bpa->b_data, &m[count], counta);
++m[count]->object->paging_in_progress;
VHOLD(vp);
bpa->b_flags = B_BUSY | B_READ | B_CALL | B_ASYNC;