Thread (11 messages) 11 messages, 5 authors, 2013-02-13

RE: [PATCH 2/2] powerpc: Make context bits depend on virtual addr size.

From: David Laight <hidden>
Date: 2013-02-13 13:34:57

+#define CONTEXT_BITS		19
+#define USER_ESID_BITS		18
+#define USER_ESID_BITS_1T	6
+
+/*
+ * 256MB segment
+ * The proto-VSID space has 2^(CONTEX_BITS + USER_ESID_BITS) - 1 =
segments
+ * available for user + kernel mapping. The top 4 contexts are used =
for
+ * kernel mapping. Each segment contains 2^28 bytes. Each
+ * context maps 2^46 bytes (64TB) so we can support 2^19-1 contexts
+ * (19 =3D=3D 37 + 28 - 46).
+ */
I can't help feeling this would be easier to understand if a full
64? 80? bit address was shown with the various bit ranges identified.

Given the comment, I'd have expected CONTEXT_BITS to be calculated
from three other named constants - rather than being set to 19.

	David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help