powerpc: map vma key-protection bits to pte key bits.
authorRam Pai <linuxram@us.ibm.com>
Fri, 19 Jan 2018 01:50:35 +0000 (17:50 -0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 20 Jan 2018 11:59:02 +0000 (22:59 +1100)
commiteb95d016ce3d3404e061c7c85d4362094dc34b3f
tree045cb71f27e1ef023d930fe74d98c804db1d8871
parent87bbabbed8a77092135f6442b8d5619906a81255
powerpc: map vma key-protection bits to pte key bits.

Map  the  key  protection  bits of the vma to the pkey bits in
the PTE.

The PTE  bits used  for pkey  are  3,4,5,6  and 57. The  first
four bits are the same four bits that were freed up  initially
in this patch series. remember? :-) Without those four bits
this patch wouldn't be possible.

BUT, on 4k kernel, bit 3, and 4 could not be freed up. remember?
Hence we have to be satisfied with 5, 6 and 7.

Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/book3s/64/pgtable.h
arch/powerpc/include/asm/mman.h
arch/powerpc/include/asm/pkeys.h