Comments

From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
This patch enables us to have 78 bit virtual address.
With 1TB segments we use 40 bits of virtual adress as segment offset and
the remaining 24 bits (of the current 64 bit virtual address) are used
to index the virtual segment. Out of the 24 bits we currently use 19 bits
for user context and that leave us with only 4 bits for effective segment
ID. In-order to support more than 16TB of memory we would require more than
4 ESID bits. This patch splits the virtual address to two unsigned long
components, vsid and segment offset thereby allowing us to support 78 bit
virtual address.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/mmu-hash64.h | 62 ++++++++---
arch/powerpc/mm/hash_low_64.S | 191 ++++++++++++++++++---------------
arch/powerpc/mm/hash_native_64.c | 36 ++++---
arch/powerpc/mm/hash_utils_64.c | 6 +-
arch/powerpc/platforms/ps3/htab.c | 13 +--
arch/powerpc/platforms/pseries/lpar.c | 29 ++---
6 files changed, 192 insertions(+), 145 deletions(-)

On Fri, 2012-06-29 at 19:47 +0530, Aneesh Kumar K.V wrote:
> > +/* 78 bit power virtual address */> struct virt_addr {> - unsigned long addr;> + unsigned long vsid;> + unsigned long seg_off;> };
Do we really need to do that ? It's really nasty...
We are trying to add only a few bits, we get 12 for free by just using a
page number (4k based always, not PAGE_SHIFT based btw) no ? That should
get us going for a while....
Cheers,
Ben.

Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> On Fri, 2012-06-29 at 19:47 +0530, Aneesh Kumar K.V wrote:>> >> +/* 78 bit power virtual address */>> struct virt_addr {>> - unsigned long addr;>> + unsigned long vsid;>> + unsigned long seg_off;>> };>> Do we really need to do that ? It's really nasty...>> We are trying to add only a few bits, we get 12 for free by just using a> page number (4k based always, not PAGE_SHIFT based btw) no ? That should> get us going for a while....>
Ok, will update to vpn in the next iteration.
Thanks
-aneesh