OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Nov 2017 08:40:57 +0000 (08:40 +0000)
commit45567ab5983900c5363019c5465b1dc46fa0218d
treeb881511696edd6b93e1a2f5eecf6b5361dbb2975
parentde9c35508f80fc77804402f0d5a50885b43e3339
powerpc/64s/hash: Fix 512T hint detection to use >= 128T

commit 7ece370996b694ae263025e056ad785afc1be5ab upstream.

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: f4ea6dcb08ea ("powerpc/mm: Enable mappings above 128TB")
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/mm/slice.c