]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
powerpc/64s/hash: Convert SLB miss handlers to C
authorNicholas Piggin <npiggin@gmail.com>
Fri, 14 Sep 2018 15:30:51 +0000 (01:30 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 14 Oct 2018 07:04:09 +0000 (18:04 +1100)
commit48e7b76957457f9a6f086ca2bbe49ec1ffd75f84
treedb169b7d3654d9371cca93c9d4ed166836952583
parent4c2de74cc8696154b283f241d74ec0bb24438e22
powerpc/64s/hash: Convert SLB miss handlers to C

This patch moves SLB miss handlers completely to C, using the standard
exception handler macros to set up the stack and branch to C.

This can be done because the segment containing the kernel stack is
always bolted, so accessing it with relocation on will not cause an
SLB exception.

Arbitrary kernel memory must not be accessed when handling kernel
space SLB misses, so care should be taken there. However user SLB
misses can access any kernel memory, which can be used to move some
fields out of the paca (in later patches).

User SLB misses could quite easily reconcile IRQs and set up a first
class kernel environment and exit via ret_from_except, however that
doesn't seem to be necessary at the moment, so we only do that if a
bad fault is encountered.

[ Credit to Aneesh for bug fixes, error checks, and improvements to
  bad address handling, etc ]

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Disallow tracing for all of slb.c for now.]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/asm-prototypes.h
arch/powerpc/include/asm/exception-64s.h
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/mm/Makefile
arch/powerpc/mm/slb.c
arch/powerpc/mm/slb_low.S [deleted file]