powerpc/64s/hash: Fix assert_slb_presence() use of the slbfee. instruction
authorNicholas Piggin <npiggin@gmail.com>
Fri, 15 Feb 2019 10:20:20 +0000 (20:20 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 19:11:32 +0000 (20:11 +0100)
commit651db146179376b543d0ee159da8101c4080d3ad
treea76ed076655f9dd8e90fe65640ae37bc2768f522
parent702c1ab420ab4265a98fa5a9eae7db20c2de52ff
powerpc/64s/hash: Fix assert_slb_presence() use of the slbfee. instruction

commit 7104dccfd052fde51eecc9972dad9c40bd3e0d11 upstream.

The slbfee. instruction must have bit 24 of RB clear, failure to do
so can result in false negatives that result in incorrect assertions.

This is not obvious from the ISA v3.0B document, which only says:

    The hardware ignores the contents of RB 36:38 40:63 -- p.1032

This patch fixes the bug and also clears all other bits from PPC bit
36-63, which is good practice when dealing with reserved or ignored
bits.

Fixes: e15a4fea4dee ("powerpc/64s/hash: Add some SLB debugging tests")
Cc: stable@vger.kernel.org # v4.20+
Reported-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Tested-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/mm/slb.c