summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorskra <skra@FreeBSD.org>2016-02-19 09:23:32 +0000
committerskra <skra@FreeBSD.org>2016-02-19 09:23:32 +0000
commit10a4549d3c32f5290b4dc2b5e46253b76b0f577d (patch)
tree25a31e9d8ee15aadc5ba70b4bca172e1aa519f2c /lib
parent2f3384530caf42a4c2bc7069ddf8dcd9ae64ffcc (diff)
downloadFreeBSD-src-10a4549d3c32f5290b4dc2b5e46253b76b0f577d.zip
FreeBSD-src-10a4549d3c32f5290b4dc2b5e46253b76b0f577d.tar.gz
Rename pte.h to pte-v4.h and start including directly either pte-v4.h
or pte-v6.h in files which needs it. There are quite internal definitions in pte-v4.h and pte-v6.h headers specific for corresponding pmap implementation. These headers should be included only in very few files and an intention is to not hide for which implementation such files are. Further, sys/arm/arm/elf_trampoline.c is an example of file which uses armv4 like pmap implementation for both armv4 and armv6 platforms. This is another reason why pte.h which includes specific header according to __ARM_ARCH is not created.
Diffstat (limited to 'lib')
-rw-r--r--lib/libkvm/kvm_arm.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/libkvm/kvm_arm.h b/lib/libkvm/kvm_arm.h
index 404d63a..38d05cd 100644
--- a/lib/libkvm/kvm_arm.h
+++ b/lib/libkvm/kvm_arm.h
@@ -29,10 +29,6 @@
#ifndef __KVM_ARM_H__
#define __KVM_ARM_H__
-#ifdef __arm__
-#include <machine/pte.h>
-#endif
-
typedef uint32_t arm_physaddr_t;
typedef uint32_t arm_pd_entry_t;
typedef uint32_t arm_pt_entry_t;
@@ -75,6 +71,12 @@ typedef uint32_t arm_pt_entry_t;
#ifdef __arm__
#include <machine/acle-compat.h>
+#if __ARM_ARCH >= 6
+#include <machine/pte-v6.h>
+#else
+#include <machine/pte-v4.h>
+#endif
+
_Static_assert(PAGE_SHIFT == ARM_PAGE_SHIFT, "PAGE_SHIFT mismatch");
_Static_assert(PAGE_SIZE == ARM_PAGE_SIZE, "PAGE_SIZE mismatch");
_Static_assert(PAGE_MASK == ARM_PAGE_MASK, "PAGE_MASK mismatch");
OpenPOWER on IntegriCloud