powerpc/mm: Set fault flags earlier
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 19 Jul 2017 04:49:42 +0000 (14:49 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 3 Aug 2017 06:06:50 +0000 (16:06 +1000)
commitd2e0d2c51adf348683e9f87da8298042a519deec
tree4e928b134ad6a4109f83d4945806135a56f6a14a
parentb15021d994f09e9309ad37c1821ce4e3ee0cd62d
powerpc/mm: Set fault flags earlier

Move out the code that sets FAULT_FLAG_WRITE so the block that check
access permissions can be extracted. While at it also set
FAULT_FLAG_INSTRUCTION which will be used for protection keys.

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