From 1e2c416c3234d196c56aaf9e497e299a6355a0dd Mon Sep 17 00:00:00 2001 From: tedu Date: Mon, 15 Dec 2014 04:54:44 +0000 Subject: [PATCH] move needed macros to pmap.c and delete stale ones. ok guenther --- sys/arch/amd64/amd64/pmap.c | 7 ++++++- sys/arch/amd64/include/pmap.h | 8 +------- 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)) -- 2.20.1