]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/mm/hash: Clear the invalid slot information correctly
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Sat, 20 Feb 2016 15:11:54 +0000 (20:41 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 22 Feb 2016 08:27:39 +0000 (19:27 +1100)
commitca7d31897ffd2bc2ccbd7fb45008ac581f65815d
tree8f6c81010f93514c8732bf5c966a3289797dfc36
parentb71dee5159b6ea05b5cfa5a8fbcabfd236c0a397
powerpc/mm/hash: Clear the invalid slot information correctly

We can get a hash pte fault with 4k base page size and find the pte
already inserted with 64K base page size. In that case we need to clear
the existing slot information from the old pte. Fix this correctly

With THP, we also clear the slot information with respect to all
the 64K hash pte mapping that 16MB page. They are all invalid
now. This make sure we don't find the slot valid when we fault with
4k base page size. Finding the slot valid should not result in any wrong
behavior because we do check again in hash page table for the validity.
But we can avoid that check completely.

Fixes: bd9540bfc33edcd ("powerpc/mm: Convert 4k hash insert to C")
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/hash64_64k.c
arch/powerpc/mm/hugepage-hash64.c