]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 21 Feb 2019 13:10:14 +0000 (00:10 +1100)
commite6716042b4c4f246463a56962b9ae076f4527aff
treefe00f68990bb9d292c1d9188ef0573b925b29a0a
parentce702b0bbcd507ab116e77483f3c9c201cf2a75d
powerpc/64s/hash: Fix assert_slb_presence() use of the slbfee. instruction

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: 3a2932425c10 ("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>
arch/powerpc/mm/slb.c