]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
powerpc/mm/subpage: Initialise user psize correctly
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Mon, 2 May 2016 10:51:50 +0000 (16:21 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 11 May 2016 11:53:59 +0000 (21:53 +1000)
commit2d566537dd2c69bd6898ef5d95ecccdfbab97eef
tree8d83e670e1a0d93efd3f2d5b76fe5bbd91779d5d
parentbb03efe2b7409d83a279ea1ef2317c26dbfb0c6c
powerpc/mm/subpage: Initialise user psize correctly

As part of the radix support we switched Book3s64 to use a value of ~0
for MMU_NO_CONTEXT. That is because id 0 is special on radix.

However that broke the logic in init_new_context(). The code there needs
to differentiate between a newly allocated context and one inherited via
fork. Previously it worked because a newly allocated context has an id
of zero (because it was just memset() to zero), which used to match
MMU_NO_CONTEXT, and therefore slice_mm_new_context() did the right
thing.

Instead check against a context.id value of zero instead of using
slice_mm_new_context().

Without this patch we never call slice_set_user_psize(), and end up with
a slice psize value of zero and we always end up using 4K HPTE.

Fixes: 1a472c9dba6b ("powerpc/mm/radix: Add tlbflush routines")
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/mmu_context_book3s64.c