All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -V3 1/3] powerpc: Make VSID_BITS* dependency explicit
@ 2013-03-12 12:08 Aneesh Kumar K.V
  2013-03-12 12:08 ` [PATCH -V3 2/3] powerpc: Update kernel VSID range Aneesh Kumar K.V
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Aneesh Kumar K.V @ 2013-03-12 12:08 UTC (permalink / raw)
  To: benh, paulus, David Gibson; +Cc: linuxppc-dev, Aneesh Kumar K.V

From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>

VSID_BITS and VSID_BITS_1T depends on the context bits  and user esid
bits. Make the dependency explicit

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 arch/powerpc/include/asm/mmu-hash64.h |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h
index 2fdb47a..5f8c2bd 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);
  * hash collisions.
  */
 
+#define CONTEXT_BITS		19
+#define USER_ESID_BITS		18
+#define USER_ESID_BITS_1T	6
+
 /*
  * This should be computed such that protovosid * vsid_mulitplier
  * doesn't overflow 64 bits. It should also be co-prime to vsid_modulus
  */
 #define VSID_MULTIPLIER_256M	ASM_CONST(12538073)	/* 24-bit prime */
-#define VSID_BITS_256M		38
+#define VSID_BITS_256M		(CONTEXT_BITS + USER_ESID_BITS + 1)
 #define VSID_MODULUS_256M	((1UL<<VSID_BITS_256M)-1)
 
 #define VSID_MULTIPLIER_1T	ASM_CONST(12538073)	/* 24-bit prime */
-#define VSID_BITS_1T		26
+#define VSID_BITS_1T		(CONTEXT_BITS + USER_ESID_BITS_1T + 1)
 #define VSID_MODULUS_1T		((1UL<<VSID_BITS_1T)-1)
 
-#define CONTEXT_BITS		19
-#define USER_ESID_BITS		18
-#define USER_ESID_BITS_1T	6
 
 #define USER_VSID_RANGE	(1UL << (USER_ESID_BITS + SID_SHIFT))
 
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-03-13 13:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-12 12:08 [PATCH -V3 1/3] powerpc: Make VSID_BITS* dependency explicit Aneesh Kumar K.V
2013-03-12 12:08 ` [PATCH -V3 2/3] powerpc: Update kernel VSID range Aneesh Kumar K.V
2013-03-13  3:42   ` Paul Mackerras
2013-03-13  9:17     ` Aneesh Kumar K.V
2013-03-13  9:49       ` Benjamin Herrenschmidt
2013-03-13 13:44     ` Aneesh Kumar K.V
2013-03-12 12:08 ` [PATCH -V3 3/3] powerpc: rename USER_ESID_BITS* to ESID_BITS* Aneesh Kumar K.V
2013-03-13  3:43   ` Paul Mackerras
2013-03-13  3:43 ` [PATCH -V3 1/3] powerpc: Make VSID_BITS* dependency explicit Paul Mackerras

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.