summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-12-15 04:54:45 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-12-15 04:54:45 +0000
commitd155b5b226f056026cee7d63493de4034e942a40 (patch)
treea04f70dfc3caa2efa080213686d9c9ed4fa9b34d /sys/arch
parentf61f2ae4bb51d8b7a9ee01c2989522f336618d7d (diff)
move needed macros to pmap.c and delete stale ones. ok guenther
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/pmap.c7
-rw-r--r--sys/arch/amd64/include/pmap.h8
2 files changed, 7 insertions, 8 deletions
diff --git a/sys/arch/amd64/amd64/pmap.c b/sys/arch/amd64/amd64/pmap.c
index f276862d25a..d10599e49db 100644
--- a/sys/arch/amd64/amd64/pmap.c
+++ b/sys/arch/amd64/amd64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.81 2014/11/21 06:41:17 mlarkin Exp $ */
+/* $OpenBSD: pmap.c,v 1.82 2014/12/15 04:54:44 tedu Exp $ */
/* $NetBSD: pmap.c,v 1.3 2003/05/08 18:13:13 thorpej Exp $ */
/*
@@ -216,6 +216,11 @@ pd_entry_t *normal_pdes[] = PDES_INITIALIZER;
#define COUNT(x) /* nothing */
+#define pmap_pte_set(p, n) x86_atomic_testset_u64(p, n)
+#define pmap_pte_clearbits(p, b) x86_atomic_clearbits_u64(p, b)
+#define pmap_pte_setbits(p, b) x86_atomic_setbits_u64(p, b)
+
+
/*
* global data structures
*/
diff --git a/sys/arch/amd64/include/pmap.h b/sys/arch/amd64/include/pmap.h
index ef9ccceb1ce..01554587cdb 100644
--- a/sys/arch/amd64/include/pmap.h
+++ b/sys/arch/amd64/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.49 2014/12/02 18:13:10 tedu Exp $ */
+/* $OpenBSD: pmap.h,v 1.50 2014/12/15 04:54:44 tedu Exp $ */
/* $NetBSD: pmap.h,v 1.1 2003/04/26 18:39:46 fvdl Exp $ */
/*
@@ -525,12 +525,6 @@ kvtopte(vaddr_t va)
return (PTE_BASE + pl1_i(va));
}
-#define pmap_pte_set(p, n) x86_atomic_testset_u64(p, n)
-#define pmap_pte_clearbits(p, b) x86_atomic_clearbits_u64(p, b)
-#define pmap_pte_setbits(p, b) x86_atomic_setbits_u64(p, b)
-#define pmap_cpu_has_pg_n() (1)
-#define pmap_cpu_has_invlpg (1)
-
#define PMAP_DIRECT_MAP(pa) ((vaddr_t)PMAP_DIRECT_BASE + pa)
#define PMAP_DIRECT_UNMAP(va) ((paddr_t)va - PMAP_DIRECT_BASE)
#define pmap_map_direct(pg) PMAP_DIRECT_MAP(VM_PAGE_TO_PHYS(pg))