]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/64s/radix: Fix radix segment exception handling
authorNicholas Piggin <npiggin@gmail.com>
Fri, 29 Mar 2019 07:42:57 +0000 (17:42 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 8 Apr 2019 11:46:11 +0000 (21:46 +1000)
commit30cc72a9d1c6445865379e6c252d826a67b39a9f
tree9f11f315e15bcbb9a8d88ae9fa2b1648bbf34191
parent9cb07e262a469333d10d41edb2ab088002d852fa
powerpc/64s/radix: Fix radix segment exception handling

Commit e45d5ac017 ("powerpc/64s/hash: Convert SLB miss handlers to C")
broke the radix-mode segment exception handler. In radix mode, this is
exception is not an SLB miss, rather it signals that the EA is outside
the range translated by any page table.

The commit lost the radix feature alternate code patch, which can
cause faults to some EAs to kernel BUG at arch/powerpc/mm/slb.c:639!

The original radix code would send faults to slb_miss_large_addr,
which would end up faulting due to slb_addr_limit being 0. This patch
sends radix directly to do_bad_slb_fault, which is a bit clearer.

Fixes: e45d5ac017a5 ("powerpc/64s/hash: Convert SLB miss handlers to C")
Cc: stable@vger.kernel.org # v4.20+
Reported-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/exceptions-64s.S