diff options
author | Ram Pai <linuxram@us.ibm.com> | 2018-01-18 17:50:44 -0800 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-01-21 01:06:10 +1100 |
commit | cf43d3b26452a332d7e1d64a00079c607613e944 (patch) | |
tree | 1ba0104d42603265673d677bd2206da7383edfa4 /arch/powerpc/include/asm/unistd.h | |
parent | c5cc1f4df6b16646f8fae7aab523c1820bf916e8 (diff) | |
download | linux-stable-cf43d3b26452a332d7e1d64a00079c607613e944.tar.gz linux-stable-cf43d3b26452a332d7e1d64a00079c607613e944.tar.bz2 linux-stable-cf43d3b26452a332d7e1d64a00079c607613e944.zip |
powerpc: Enable pkey subsystem
PAPR defines 'ibm,processor-storage-keys' property. It exports two
values. The first value holds the number of data-access keys and the
second holds the number of instruction-access keys. Due to a bug in
the firmware, instruction-access keys is always reported as zero.
However any key can be configured to disable data-access and/or
disable execution-access. The inavailablity of the second value is not
a big handicap, though it could have been used to determine if the
platform supported disable-execution-access.
Non-PAPR platforms do not define this property in the device tree yet.
Fortunately power8 is the only released Non-PAPR platform that is
supported. Here, we hardcode the number of supported pkey to 32, by
consulting the PowerISA3.0
This patch calculates the number of keys supported by the platform.
Also it determines the platform support for read/write/execution
access support for pkeys.
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
[mpe: Use a PVR check instead of CPU_FTR for execute. Restrict to
Power7/8/9 for now until older CPUs are tested.]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/unistd.h')
0 files changed, 0 insertions, 0 deletions