powerpc: Fix DABR match on hash based systems
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 10 Nov 2017 01:15:00 +0000 (12:15 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Feb 2018 14:42:17 +0000 (15:42 +0100)
commit40be210c830e80642ce5f4e3d726864ec22d5f50
tree33dc5eeca8dbb24f0be251b7754d571373b72c86
parent3b09911d3beb326a117bfb05c717c3021e5458ca
powerpc: Fix DABR match on hash based systems

commit f23ab3efb1b30cc5c5ef5ae4ef294ed467f30675 upstream.

Commit 398a719d34a1 ("powerpc/mm: Update bits used to skip hash_page")
mistakenly dropped the DSISR_DABRMATCH bit from the mask of bit tested
to skip trying to hash a page.

As a result, the DABR matches would no longer be detected.

This adds it back. We open code it in the 2 places where it matters
rather than fold it into DSISR_BAD_FAULT_32S/64S because this isn't
technically a bad fault and while we would never hit it with the
current code, I prefer if page_fault_is_bad() didn't trigger on these.

Fixes: 398a719d34a1 ("powerpc/mm: Update bits used to skip hash_page")
Cc: stable@vger.kernel.org # v4.14
Tested-by: Pedro Miraglia Franco de Carvalho <pedromfc@br.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/kernel/head_32.S