powerpc/book3s64/pkeys: Use PVR check instead of cpu feature
authorAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Thu, 9 Jul 2020 03:29:24 +0000 (08:59 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:23:56 +0000 (08:23 +0200)
commitea18925e347c8ddad71253b34b3fdba2e034ead0
treec31951c095af41ec4975934dc041aa3edfb5ec6a
parentcecbf1fe6ccaec8348dde32e968c35dc5122b9f9
powerpc/book3s64/pkeys: Use PVR check instead of cpu feature

[ Upstream commit d79e7a5f26f1d179cbb915a8bf2469b6d7431c29 ]

We are wrongly using CPU_FTRS_POWER8 to check for P8 support. Instead, we should
use PVR value. Now considering we are using CPU_FTRS_POWER8, that
implies we returned true for P9 with older firmware. Keep the same behavior
by checking for P9 PVR value.

Fixes: cf43d3b26452 ("powerpc: Enable pkey subsystem")
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200709032946.881753-2-aneesh.kumar@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/mm/book3s64/pkeys.c