diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2004-06-09 20:17:25 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2004-06-09 20:17:25 +0000 |
commit | 9637ef0a1e557491619d6e5e20fe656ae1780859 (patch) | |
tree | 6274c62878e66896eb7333b4a5173622a0aabb07 /sys/arch | |
parent | 53fb7c67e695643c91d9cfcbd9c85786ac8e5038 (diff) |
rename POOLPAGE macros to pmap_map_direct
break out uvm_km_page bits for this case, no thread here
lots of testing tech@, deraadt@, naddy@, mickey@, ...
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/alpha/include/pmap.h | 6 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/pmap.c | 32 | ||||
-rw-r--r-- | sys/arch/hppa/include/pmap.h | 6 | ||||
-rw-r--r-- | sys/arch/powerpc/include/pmap.h | 6 | ||||
-rw-r--r-- | sys/arch/vax/include/pmap.h | 6 |
5 files changed, 14 insertions, 42 deletions
diff --git a/sys/arch/alpha/include/pmap.h b/sys/arch/alpha/include/pmap.h index ca60221e62a..e61bba6497d 100644 --- a/sys/arch/alpha/include/pmap.h +++ b/sys/arch/alpha/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.16 2004/05/20 09:20:41 kettenis Exp $ */ +/* $OpenBSD: pmap.h,v 1.17 2004/06/09 20:17:23 tedu Exp $ */ /* $NetBSD: pmap.h,v 1.37 2000/11/19 03:16:35 thorpej Exp $ */ /*- @@ -201,8 +201,8 @@ extern pt_entry_t *VPT; /* Virtual Page Table */ /* * Alternate mapping hooks for pool pages. Avoids thrashing the TLB. */ -#define PMAP_MAP_POOLPAGE(pg) ALPHA_PHYS_TO_K0SEG(VM_PAGE_TO_PHYS(pg)) -#define PMAP_UNMAP_POOLPAGE(va) PHYS_TO_VM_PAGE(ALPHA_K0SEG_TO_PHYS((va))) +#define pmap_map_direct(pg) ALPHA_PHYS_TO_K0SEG(VM_PAGE_TO_PHYS(pg)) +#define pmap_unmap_direct(va) PHYS_TO_VM_PAGE(ALPHA_K0SEG_TO_PHYS((va))) paddr_t vtophys(vaddr_t); diff --git a/sys/arch/hppa/hppa/pmap.c b/sys/arch/hppa/hppa/pmap.c index 035817fc8fe..6a934e460d2 100644 --- a/sys/arch/hppa/hppa/pmap.c +++ b/sys/arch/hppa/hppa/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.111 2004/05/27 21:04:07 tedu Exp $ */ +/* $OpenBSD: pmap.c,v 1.112 2004/06/09 20:17:23 tedu Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -99,34 +99,6 @@ int pmap_initialized; u_int hppa_prot[8]; -/* - * workaround until the uvm_km_getpage can be used this early. - */ -void *hppa_pool_page_alloc(struct pool *, int); -void hppa_pool_page_free(struct pool *, void *); - -void * -hppa_pool_page_alloc(struct pool *pp, int flags) -{ - boolean_t waitok = (flags & PR_WAITOK) ? TRUE : FALSE; - - return ((void *)uvm_km_alloc_poolpage1(kmem_map, uvmexp.kmem_object, - waitok)); -} - -void -hppa_pool_page_free(struct pool *pp, void *v) -{ - - uvm_km_free_poolpage1(kmem_map, (vaddr_t)v); -} - -struct pool_allocator hppa_pool_allocator = { - hppa_pool_page_alloc, hppa_pool_page_free, 0, -}; - - - #define pmap_sid(pmap, va) \ (((va & 0xc0000000) != 0xc0000000)? pmap->pmap_space : HPPA_SID_KERNEL) @@ -616,7 +588,7 @@ pmap_init() pool_init(&pmap_pmap_pool, sizeof(struct pmap), 0, 0, 0, "pmappl", &pool_allocator_nointr); pool_init(&pmap_pv_pool, sizeof(struct pv_entry), 0, 0, 0, "pmappv", - &hppa_pool_allocator); + NULL); pmap_initialized = 1; diff --git a/sys/arch/hppa/include/pmap.h b/sys/arch/hppa/include/pmap.h index 234b48230c4..fc8989bb30d 100644 --- a/sys/arch/hppa/include/pmap.h +++ b/sys/arch/hppa/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.30 2004/05/20 09:20:42 kettenis Exp $ */ +/* $OpenBSD: pmap.h,v 1.31 2004/06/09 20:17:23 tedu Exp $ */ /* * Copyright (c) 2002-2004 Michael Shalayeff @@ -83,8 +83,8 @@ extern struct pdc_hwtlb pdc_hwtlb; /* * pool quickmaps */ -#define PMAP_MAP_POOLPAGE(pg) ((vaddr_t)VM_PAGE_TO_PHYS(pg)) -#define PMAP_UNMAP_POOLPAGE(va) PHYS_TO_VM_PAGE((paddr_t)(va)) +#define pmap_map_direct(pg) ((vaddr_t)VM_PAGE_TO_PHYS(pg)) +#define pmap_unmap_direct(va) PHYS_TO_VM_PAGE((paddr_t)(va)) /* * according to the parisc manual aliased va's should be diff --git a/sys/arch/powerpc/include/pmap.h b/sys/arch/powerpc/include/pmap.h index d68eaa69ec6..e3725de4621 100644 --- a/sys/arch/powerpc/include/pmap.h +++ b/sys/arch/powerpc/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.35 2004/05/20 09:20:42 kettenis Exp $ */ +/* $OpenBSD: pmap.h,v 1.36 2004/06/09 20:17:23 tedu Exp $ */ /* $NetBSD: pmap.h,v 1.1 1996/09/30 16:34:29 ws Exp $ */ /*- @@ -119,8 +119,8 @@ boolean_t pteclrbits(paddr_t pa, u_int mask, u_int clear); * Really simple. 0x0->0x80000000 contain 1->1 mappings of the physical * memory. - XXX */ -#define PMAP_MAP_POOLPAGE(pg) ((vaddr_t)VM_PAGE_TO_PHYS(pg)) -#define PMAP_UNMAP_POOLPAGE(va) PHYS_TO_VM_PAGE((paddr_t)va) +#define pmap_map_direct(pg) ((vaddr_t)VM_PAGE_TO_PHYS(pg)) +#define pmap_unmap_direct(va) PHYS_TO_VM_PAGE((paddr_t)va) void pmap_bootstrap(u_int kernelstart, u_int kernelend); diff --git a/sys/arch/vax/include/pmap.h b/sys/arch/vax/include/pmap.h index 77409fe25de..86115c91dca 100644 --- a/sys/arch/vax/include/pmap.h +++ b/sys/arch/vax/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.21 2004/05/20 09:20:42 kettenis Exp $ */ +/* $OpenBSD: pmap.h,v 1.22 2004/06/09 20:17:24 tedu Exp $ */ /* $NetBSD: pmap.h,v 1.37 1999/08/01 13:48:07 ragge Exp $ */ /* @@ -108,8 +108,8 @@ extern struct pmap kernel_pmap_store; * Real nice (fast) routines to get the virtual address of a physical page * (and vice versa). */ -#define PMAP_MAP_POOLPAGE(pg) (VM_PAGE_TO_PHYS(pg) | KERNBASE) -#define PMAP_UNMAP_POOLPAGE(va) PHYS_TO_VM_PAGE((va) & ~KERNBASE) +#define pmap_map_direct(pg) (VM_PAGE_TO_PHYS(pg) | KERNBASE) +#define pmap_unmap_direct(va) PHYS_TO_VM_PAGE((va) & ~KERNBASE) #define PMAP_STEAL_MEMORY |