powerpc/mm: Move the DSISR_PROTFAULT sanity check
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 19 Jul 2017 04:49:39 +0000 (14:49 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 3 Aug 2017 06:06:49 +0000 (16:06 +1000)
commit2865d08dd9ea876524652f3900b4b3b9c8b22e77
treeb6d7f97159688c7a2ace2e3f1dc5bd21aa0feea1
parent04aafdc6018feef590517b3900c19d911b8a456c
powerpc/mm: Move the DSISR_PROTFAULT sanity check

This has a page of comment explaining what's going on right in
the middle of do_page_fault() which makes things a bit hard to
follow. Move it to a helper instead. Also do the test earlier
as there's no point waiting until after we found the VMA.

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