]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/64s/hash: Fix 512T hint detection to use >= 128T
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 13 Nov 2017 12:17:28 +0000 (23:17 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 13 Nov 2017 12:34:06 +0000 (23:34 +1100)
commit5ef59d746daf30024303a475652f9d0ea5d62b9b
treeb17550158c0e7bc6010630a5fbbd25e595d1a03f
parent417cc82ae62e912355bb670eb3f57ea9d7066aa8
powerpc/64s/hash: Fix 512T hint detection to use >= 128T

Currently userspace is able to request mmap() search between 128T-512T
by specifying a hint address that is greater than 128T. But that means
a hint of 128T exactly will return an address below 128T, which is
confusing and wrong.

So fix the logic to check the hint is greater than *or equal* to 128T.

Fixes: 13c0cf9060ea ("powerpc/mm: Enable mappings above 128TB")
Cc: stable@vger.kernel.org # v4.12+
Suggested-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Suggested-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Split out of Nick's bigger patch]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/slice.c