OSDN Git Service

powerpc/mm: Overhaul handling of bad page faults
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 19 Jul 2017 04:49:31 +0000 (14:49 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 3 Aug 2017 06:06:45 +0000 (16:06 +1000)
commitf3d96e698ed0f83d8faa35071ea9ca0a57e74c50
tree6597a1cf1224d3aa81eefd1b3a507e1b9bb317f5
parente6c8290a894bcaf0d8f06c504a04da3412a3cf55
powerpc/mm: Overhaul handling of bad page faults

A bad page fault is when the HW signals an error such as a bad
copy/paste, an AMO error, or some other type of error that will
not be fixed by updating the PTE.

Use a helper page_fault_is_bad() to check for bad page faults thus
removing the per-processor family open-coding in __do_page_fault()
and trigger a SIGBUS rather than a SIGSEGV which is more appropriate.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/fault.c