static __inline void pmap_remove_pv __P((pmap_t, vm_offset_t, struct pv_entry *)); static __inline void pmap_clear_pv __P((vm_offset_t, struct pv_entry *));
static __inline void pmap_remove_pv __P((pmap_t, vaddr_t, struct pv_entry *)); static __inline void pmap_clear_pv __P((vaddr_t, struct pv_entry *));
TAILQ_HEAD(, pmap)	pmap_freelist;	/* list of free pmaps */u_int pmap_nfree;struct simplelock pmap_freelock;	/* and lock */struct simplelock pmap_lock;	/* XXX this is all broken */struct simplelock sid_pid_lock;	/* pids */u_int	pages_per_vm_page;u_int	pid_counter;TAILQ_HEAD(, pv_page) pv_page_freelist;u_int pv_nfree;/* pv_entry operation */static __inline void pmap_insert_pvp __P((struct pv_page *, u_int));static __inline struct pv_entry *pmap_alloc_pv __P((void));static __inline void pmap_free_pv __P((struct pv_entry *));static __inline struct pv_entry *pmap_find_pv __P((vm_offset_t));static __inline void pmap_enter_pv __P((pmap_t, vm_offset_t, u_int, u_int,					struct pv_entry *));static __inline void pmap_remove_pv __P((pmap_t, vm_offset_t,					 struct pv_entry *));static __inline void pmap_clear_pv __P((vm_offset_t, struct pv_entry *));/* hpt_table operation */static __inline void pmap_enter_va __P((pa_space_t, vm_offset_t,					struct pv_entry *));static __inline struct pv_entry *pmap_find_va __P((pa_space_t, vm_offset_t));static __inline void pmap_remove_va __P((struct pv_entry *));static __inline void pmap_clear_va __P((pa_space_t, vm_offset_t));#ifdef PMAPDEBUGvoid pmap_hptdump __P((void));#endif#if FORCE_MAP_KERNELvm_offset_t pmap_map __P((vm_offset_t va, vm_offset_t spa, vm_offset_t epa,	vm_prot_t prot, int wired));#endifu_int	kern_prot[8], user_prot[8];#define	pmap_sid(pmap, va) \	(((va & 0xc0000000) != 0xc0000000)? pmap->pmap_space : HPPA_SID_KERNEL)static __inline voidpmap_enter_va(space, va, pv)	pa_space_t space;	vm_offset_t va;	struct pv_entry *pv;{	register struct hpt_entry *hpt = &hpt_table[pmap_hash(space, va)];#if defined(PMAPDEBUG) || defined(DIAGNOSTIC)	register struct pv_entry *pvp =	hpt->hpt_entry;#endif#ifdef PMAPDEBUG	if (pmapdebug & PDB_FOLLOW && pmapdebug & PDB_VA)		printf("pmap_enter_va(%x,%x,%p): hpt=%p, pvp=%p\n",		       space, va, pv, hpt, pvp);#endif#ifdef DIAGNOSTIC	while(pvp && (pvp->pv_va != va || pvp->pv_space != space))		pvp = pvp->pv_hash;	if (pvp)		panic("pmap_enter_va: pv_entry is already in hpt_table");#endif	/* we assume that normally there are no duplicate entries	   would be inserted (use DIAGNOSTIC should you want a proof) */	pv->pv_hash = hpt->hpt_entry;	hpt->hpt_entry = pv;}