aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2013-03-12 23:34:53 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-03-16 21:38:15 -0400
commite39d1a471484662620651cd9520250d33843f235 (patch)
treedcb784f679ce0ecc6b70cdf8aa6206abf08b37e2 /arch/powerpc
parentd812c0e1f90b7b86ff8e06b500cd8b8a03f3dbe6 (diff)
powerpc: Make VSID_BITS* dependency explicit
VSID_BITS and VSID_BITS_1T depends on the context bits and user esid bits. Make the dependency explicit Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: <stable@vger.kernel.org> [v3.8]
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/include/asm/mmu-hash64.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h
index 2fdb47a19efd..5f8c2bd58818 100644
--- a/arch/powerpc/include/asm/mmu-hash64.h
+++ b/arch/powerpc/include/asm/mmu-hash64.h
@@ -381,21 +381,22 @@ extern void slb_set_size(u16 size);
381 * hash collisions. 381 * hash collisions.
382 */ 382 */
383 383
384#define CONTEXT_BITS 19
385#define USER_ESID_BITS 18
386#define USER_ESID_BITS_1T 6
387
384/* 388/*
385 * This should be computed such that protovosid * vsid_mulitplier 389 * This should be computed such that protovosid * vsid_mulitplier
386 * doesn't overflow 64 bits. It should also be co-prime to vsid_modulus 390 * doesn't overflow 64 bits. It should also be co-prime to vsid_modulus
387 */ 391 */
388#define VSID_MULTIPLIER_256M ASM_CONST(12538073) /* 24-bit prime */ 392#define VSID_MULTIPLIER_256M ASM_CONST(12538073) /* 24-bit prime */
389#define VSID_BITS_256M 38 393#define VSID_BITS_256M (CONTEXT_BITS + USER_ESID_BITS + 1)
390#define VSID_MODULUS_256M ((1UL<<VSID_BITS_256M)-1) 394#define VSID_MODULUS_256M ((1UL<<VSID_BITS_256M)-1)
391 395
392#define VSID_MULTIPLIER_1T ASM_CONST(12538073) /* 24-bit prime */ 396#define VSID_MULTIPLIER_1T ASM_CONST(12538073) /* 24-bit prime */
393#define VSID_BITS_1T 26 397#define VSID_BITS_1T (CONTEXT_BITS + USER_ESID_BITS_1T + 1)
394#define VSID_MODULUS_1T ((1UL<<VSID_BITS_1T)-1) 398#define VSID_MODULUS_1T ((1UL<<VSID_BITS_1T)-1)
395 399
396#define CONTEXT_BITS 19
397#define USER_ESID_BITS 18
398#define USER_ESID_BITS_1T 6
399 400
400#define USER_VSID_RANGE (1UL << (USER_ESID_BITS + SID_SHIFT)) 401#define USER_VSID_RANGE (1UL << (USER_ESID_BITS + SID_SHIFT))
401 402