summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2014-03-23 21:08:18 +0000
committerandrew <andrew@FreeBSD.org>2014-03-23 21:08:18 +0000
commit30470cc7be33594faec8c2232763469b827acaa4 (patch)
treef9a3156920266d11f3cc7ec51afc93a8d1587e38
parent6c25bbf931728d31509cfe699a3dea3cd60bbec7 (diff)
downloadFreeBSD-src-30470cc7be33594faec8c2232763469b827acaa4.zip
FreeBSD-src-30470cc7be33594faec8c2232763469b827acaa4.tar.gz
Reorder the pmap macros so "ARM_MMU_V6 + ARM_MMU_V7" is first. As they are
identical this allows us to build for both v6 and v7 together.
-rw-r--r--sys/arm/include/pmap.h83
1 files changed, 42 insertions, 41 deletions
diff --git a/sys/arm/include/pmap.h b/sys/arm/include/pmap.h
index 00080b9..4c8f506 100644
--- a/sys/arm/include/pmap.h
+++ b/sys/arm/include/pmap.h
@@ -341,47 +341,7 @@ extern int pmap_needs_pte_sync;
#define L2_AP(x) (L2_AP0(x) | L2_AP1(x) | L2_AP2(x) | L2_AP3(x))
#endif
-#if ARM_NMMUS > 1
-/* More than one MMU class configured; use variables. */
-#define L2_S_PROT_U pte_l2_s_prot_u
-#define L2_S_PROT_W pte_l2_s_prot_w
-#define L2_S_PROT_MASK pte_l2_s_prot_mask
-
-#define L1_S_CACHE_MASK pte_l1_s_cache_mask
-#define L2_L_CACHE_MASK pte_l2_l_cache_mask
-#define L2_S_CACHE_MASK pte_l2_s_cache_mask
-
-#define L1_S_PROTO pte_l1_s_proto
-#define L1_C_PROTO pte_l1_c_proto
-#define L2_S_PROTO pte_l2_s_proto
-
-#elif ARM_MMU_GENERIC != 0
-#define L2_S_PROT_U L2_S_PROT_U_generic
-#define L2_S_PROT_W L2_S_PROT_W_generic
-#define L2_S_PROT_MASK L2_S_PROT_MASK_generic
-
-#define L1_S_CACHE_MASK L1_S_CACHE_MASK_generic
-#define L2_L_CACHE_MASK L2_L_CACHE_MASK_generic
-#define L2_S_CACHE_MASK L2_S_CACHE_MASK_generic
-
-#define L1_S_PROTO L1_S_PROTO_generic
-#define L1_C_PROTO L1_C_PROTO_generic
-#define L2_S_PROTO L2_S_PROTO_generic
-
-#elif ARM_MMU_XSCALE == 1
-#define L2_S_PROT_U L2_S_PROT_U_xscale
-#define L2_S_PROT_W L2_S_PROT_W_xscale
-#define L2_S_PROT_MASK L2_S_PROT_MASK_xscale
-
-#define L1_S_CACHE_MASK L1_S_CACHE_MASK_xscale
-#define L2_L_CACHE_MASK L2_L_CACHE_MASK_xscale
-#define L2_S_CACHE_MASK L2_S_CACHE_MASK_xscale
-
-#define L1_S_PROTO L1_S_PROTO_xscale
-#define L1_C_PROTO L1_C_PROTO_xscale
-#define L2_S_PROTO L2_S_PROTO_xscale
-
-#elif (ARM_MMU_V6 + ARM_MMU_V7) != 0
+#if (ARM_MMU_V6 + ARM_MMU_V7) != 0
/*
* AP[2:1] access permissions model:
*
@@ -461,6 +421,47 @@ extern int pmap_needs_pte_sync;
#define ARM_L2S_NRML_IWT_OWT (L2_C)
#define ARM_L2S_NRML_IWB_OWB (L2_C|L2_B)
#define ARM_L2S_NRML_IWBA_OWBA (L2_S_TEX(1)|L2_C|L2_B)
+
+#elif ARM_NMMUS > 1
+/* More than one MMU class configured; use variables. */
+#define L2_S_PROT_U pte_l2_s_prot_u
+#define L2_S_PROT_W pte_l2_s_prot_w
+#define L2_S_PROT_MASK pte_l2_s_prot_mask
+
+#define L1_S_CACHE_MASK pte_l1_s_cache_mask
+#define L2_L_CACHE_MASK pte_l2_l_cache_mask
+#define L2_S_CACHE_MASK pte_l2_s_cache_mask
+
+#define L1_S_PROTO pte_l1_s_proto
+#define L1_C_PROTO pte_l1_c_proto
+#define L2_S_PROTO pte_l2_s_proto
+
+#elif ARM_MMU_GENERIC != 0
+#define L2_S_PROT_U L2_S_PROT_U_generic
+#define L2_S_PROT_W L2_S_PROT_W_generic
+#define L2_S_PROT_MASK L2_S_PROT_MASK_generic
+
+#define L1_S_CACHE_MASK L1_S_CACHE_MASK_generic
+#define L2_L_CACHE_MASK L2_L_CACHE_MASK_generic
+#define L2_S_CACHE_MASK L2_S_CACHE_MASK_generic
+
+#define L1_S_PROTO L1_S_PROTO_generic
+#define L1_C_PROTO L1_C_PROTO_generic
+#define L2_S_PROTO L2_S_PROTO_generic
+
+#elif ARM_MMU_XSCALE == 1
+#define L2_S_PROT_U L2_S_PROT_U_xscale
+#define L2_S_PROT_W L2_S_PROT_W_xscale
+#define L2_S_PROT_MASK L2_S_PROT_MASK_xscale
+
+#define L1_S_CACHE_MASK L1_S_CACHE_MASK_xscale
+#define L2_L_CACHE_MASK L2_L_CACHE_MASK_xscale
+#define L2_S_CACHE_MASK L2_S_CACHE_MASK_xscale
+
+#define L1_S_PROTO L1_S_PROTO_xscale
+#define L1_C_PROTO L1_C_PROTO_xscale
+#define L2_S_PROTO L2_S_PROTO_xscale
+
#else
#define ARM_L1S_STRONG_ORD (0)
#define ARM_L1S_DEVICE_NOSHARE (L1_S_TEX(2))
OpenPOWER on IntegriCloud