Thread (27 messages) flat view 27 messages, 2 authors, 2012-08-01

Re: [PATCH -V5 13/13] arch/powerpc: Update VSID allocation documentation

From: Aneesh Kumar K.V <hidden>
Date: 2012-08-01 10:02:02

Paul Mackerras [off-list ref] writes:
On Mon, Jul 30, 2012 at 04:52:19PM +0530, Aneesh Kumar K.V wrote:
quoted
From: "Aneesh Kumar K.V" <redacted>

This update the proto-VSID and VSID scramble related information
to be more generic by using names instead of current values.
Comments below...
quoted
- * VSID allocation
+ * VSID allocation (256MB segment)
  *
- * We first generate a 36-bit "proto-VSID".  For kernel addresses this
- * is equal to the ESID, for user addresses it is:
- *	(context << 15) | (esid & 0x7fff)
+ * We first generate a 38-bit "proto-VSID".  For kernel addresses this
+ * is equal to the ESID | 1 << 37, for user addresses it is:
+ *	(context << USER_ESID_BITS) | (esid & (1U << USER_ESID_BITS))
					      ^^^^^^^^^^^^^^^^^^^^^^
should be ((1U << USER_ESID_BITS) - 1)
quoted
  *
- * The two forms are distinguishable because the top bit is 0 for user
- * addresses, whereas the top two bits are 1 for kernel addresses.
- * Proto-VSIDs with the top two bits equal to 0b10 are reserved for
- * now.
+ * This splits the proto-VSID into the below range
+ *  0 - (2^(CONTEXT_BITS + USER_ESID_BITS) - 1) : User proto-VSID range
+ *  2^(CONTEXT_BITS + USER_ESID_BITS) - 2^(VSID_BITS) : Kernel proto-VSID range
Perhaps point out also that CONTEXT_BITS + USER_ESID_BITS == VSID_BITS - 1,
that is, you have assigned half of the space to user processes and half
to the kernel.
updated
quoted
-/*
- * WARNING - If you change these you must make sure the asm
- * implementations in slb_allocate (slb_low.S), do_stab_bolted
- * (head.S) and ASM_VSID_SCRAMBLE (below) are changed accordingly.
- */
Are you absolutely sure that nothing in the assembly code would need
to be changed if someone changed these definitions?
As a part of this patchset, i didn't touch any of these and the pathcset
do change these values. 

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