diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2018-11-06 03:25:18 -0500 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-11-06 03:29:52 -0500 |
commit | 08e6a3434e2125e4b21d0d3f84678d427345bc0d (patch) | |
tree | 4b1e48802d2aeb89f3b01a1353d8f8f68ef2c1f4 | |
parent | 0ae790683fc28bb718d74f87cdf753c6445fe28d (diff) |
powerpc/mm/64s: Use PPC_SLBFEE macro
Old toolchains don't know about slbfee and break the build, eg:
{standard input}:37: Error: Unrecognized opcode: `slbfee.'
Fix it by using the macro version. We need to add an underscore
version that takes raw register numbers from the inline asm, rather
than our Rx macros.
Fixes: e15a4fea4dee ("powerpc/64s/hash: Add some SLB debugging tests")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r-- | arch/powerpc/include/asm/ppc-opcode.h | 2 | ||||
-rw-r--r-- | arch/powerpc/mm/slb.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h index 6093bc8f74e5..a6e9e314c707 100644 --- a/arch/powerpc/include/asm/ppc-opcode.h +++ b/arch/powerpc/include/asm/ppc-opcode.h | |||
@@ -493,6 +493,8 @@ | |||
493 | __PPC_RS(t) | __PPC_RA0(a) | __PPC_RB(b)) | 493 | __PPC_RS(t) | __PPC_RA0(a) | __PPC_RB(b)) |
494 | #define PPC_SLBFEE_DOT(t, b) stringify_in_c(.long PPC_INST_SLBFEE | \ | 494 | #define PPC_SLBFEE_DOT(t, b) stringify_in_c(.long PPC_INST_SLBFEE | \ |
495 | __PPC_RT(t) | __PPC_RB(b)) | 495 | __PPC_RT(t) | __PPC_RB(b)) |
496 | #define __PPC_SLBFEE_DOT(t, b) stringify_in_c(.long PPC_INST_SLBFEE | \ | ||
497 | ___PPC_RT(t) | ___PPC_RB(b)) | ||
496 | #define PPC_ICBT(c,a,b) stringify_in_c(.long PPC_INST_ICBT | \ | 498 | #define PPC_ICBT(c,a,b) stringify_in_c(.long PPC_INST_ICBT | \ |
497 | __PPC_CT(c) | __PPC_RA0(a) | __PPC_RB(b)) | 499 | __PPC_CT(c) | __PPC_RA0(a) | __PPC_RB(b)) |
498 | /* PASemi instructions */ | 500 | /* PASemi instructions */ |
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c index f3e002ee457b..457fd29448b1 100644 --- a/arch/powerpc/mm/slb.c +++ b/arch/powerpc/mm/slb.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <asm/mmu.h> | 19 | #include <asm/mmu.h> |
20 | #include <asm/mmu_context.h> | 20 | #include <asm/mmu_context.h> |
21 | #include <asm/paca.h> | 21 | #include <asm/paca.h> |
22 | #include <asm/ppc-opcode.h> | ||
22 | #include <asm/cputable.h> | 23 | #include <asm/cputable.h> |
23 | #include <asm/cacheflush.h> | 24 | #include <asm/cacheflush.h> |
24 | #include <asm/smp.h> | 25 | #include <asm/smp.h> |
@@ -65,7 +66,7 @@ static void assert_slb_presence(bool present, unsigned long ea) | |||
65 | 66 | ||
66 | WARN_ON_ONCE(mfmsr() & MSR_EE); | 67 | WARN_ON_ONCE(mfmsr() & MSR_EE); |
67 | 68 | ||
68 | asm volatile("slbfee. %0, %1" : "=r"(tmp) : "r"(ea) : "cr0"); | 69 | asm volatile(__PPC_SLBFEE_DOT(%0, %1) : "=r"(tmp) : "r"(ea) : "cr0"); |
69 | 70 | ||
70 | WARN_ON(present == (tmp == 0)); | 71 | WARN_ON(present == (tmp == 0)); |
71 | #endif | 72 | #endif |