summaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/mmu-hash64.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-05-10 15:28:44 +1000
committerPaul Mackerras <paulus@samba.org>2007-05-10 21:28:13 +1000
commit2454c7e98c0dd0aff29dfe1ee369801507f4d6a5 (patch)
tree3f95e3254d698a84cab15059ad4819919e99f593 /include/asm-powerpc/mmu-hash64.h
parentde1132173a81ae11aaa6af11ed9ded5f0c565c87 (diff)
downloadop-kernel-dev-2454c7e98c0dd0aff29dfe1ee369801507f4d6a5.zip
op-kernel-dev-2454c7e98c0dd0aff29dfe1ee369801507f4d6a5.tar.gz
[POWERPC] Fix warning in hpte_decode(), and generalize it
This adds the necessary support to hpte_decode() to handle 1TB segments and 16GB pages, and removes an uninitialized value warning on avpn. We don't have any code to generate HPTEs for 1TB segments or 16GB pages yet, so this is mostly for completeness, and to fix the warning. Signed-off-by: Paul Mackerras <paulus@samba.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'include/asm-powerpc/mmu-hash64.h')
-rw-r--r--include/asm-powerpc/mmu-hash64.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/asm-powerpc/mmu-hash64.h b/include/asm-powerpc/mmu-hash64.h
index e2ca55b..b8dca30 100644
--- a/include/asm-powerpc/mmu-hash64.h
+++ b/include/asm-powerpc/mmu-hash64.h
@@ -73,8 +73,9 @@ extern char initial_stab[];
#define HPTES_PER_GROUP 8
+#define HPTE_V_SSIZE_SHIFT 62
#define HPTE_V_AVPN_SHIFT 7
-#define HPTE_V_AVPN ASM_CONST(0xffffffffffffff80)
+#define HPTE_V_AVPN ASM_CONST(0x3fffffffffffff80)
#define HPTE_V_AVPN_VAL(x) (((x) & HPTE_V_AVPN) >> HPTE_V_AVPN_SHIFT)
#define HPTE_V_COMPARE(x,y) (!(((x) ^ (y)) & HPTE_V_AVPN))
#define HPTE_V_BOLTED ASM_CONST(0x0000000000000010)
@@ -151,6 +152,15 @@ struct mmu_psize_def
#define MMU_PAGE_16G 5 /* 16G */
#define MMU_PAGE_COUNT 6
+/*
+ * Segment sizes.
+ * These are the values used by hardware in the B field of
+ * SLB entries and the first dword of MMU hashtable entries.
+ * The B field is 2 bits; the values 2 and 3 are unused and reserved.
+ */
+#define MMU_SEGSIZE_256M 0
+#define MMU_SEGSIZE_1T 1
+
#ifndef __ASSEMBLY__
/*
OpenPOWER on IntegriCloud