powerpc/nohash: Move setup_kuap out of 8xx.c
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 19 Oct 2021 07:29:24 +0000 (09:29 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 9 Dec 2021 11:41:19 +0000 (22:41 +1100)
commit25ae981fafaa140a12e4c830992b4fe997071124
tree0977ef01c11396e2418e0ea5af4b58efdfecc574
parent937fb7003ee1f37faed1f1a4ece46e8a14863d92
powerpc/nohash: Move setup_kuap out of 8xx.c

In order to reuse it on booke/4xx, move KUAP
setup routine out of 8xx.c

Make them usable on SMP by removing the __init tag
as it is called for each CPU.

And use __prevent_user_access() instead of hard
coding initial lock.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/ae35eec3426509efc2b8ae69586c822e2fe2642a.1634627931.git.christophe.leroy@csgroup.eu
arch/powerpc/mm/nohash/8xx.c
arch/powerpc/mm/nohash/Makefile
arch/powerpc/mm/nohash/kup.c [new file with mode: 0644]