Skip to content

Commit

Permalink
powerpc/mm/64s: Only use slbfee on CPUs that support it
Browse files Browse the repository at this point in the history
The slbfee instruction was only added in ISA 2.05 (Power6), it's not
supported on older CPUs. We don't have a CPU feature for that ISA
version though, so just use the ISA 2.06 feature flag.

Fixes: e15a4fe ("powerpc/64s/hash: Add some SLB debugging tests")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Michael Ellerman committed Nov 6, 2018
1 parent 08e6a34 commit 9586d56
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/powerpc/mm/slb.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ static void assert_slb_presence(bool present, unsigned long ea)

WARN_ON_ONCE(mfmsr() & MSR_EE);

if (!cpu_has_feature(CPU_FTR_ARCH_206))
return;

asm volatile(__PPC_SLBFEE_DOT(%0, %1) : "=r"(tmp) : "r"(ea) : "cr0");

WARN_ON(present == (tmp == 0));
Expand Down

0 comments on commit 9586d56

Please sign in to comment.