diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2020-11-24 16:24:59 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-12-09 13:48:13 +0100 |
commit | 70b588a068668dd7a92ed19cf0373ba92847957c (patch) | |
tree | 3e96b07163f00bdee334df1eb6a8ff3bfb3c1aeb /arch/powerpc/perf | |
parent | powerpc/8xx: Use SPRN_SPRG_SCRATCH2 in DTLB miss exception (diff) | |
download | linux-70b588a068668dd7a92ed19cf0373ba92847957c.tar.xz linux-70b588a068668dd7a92ed19cf0373ba92847957c.zip |
powerpc/ppc-opcode: Add PPC_RAW_MFSPR()
Add PPC_RAW_MFSPR() to replace open coding done in 8xx-pmu.c
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/e281e3a611eead8817c49cf06a60072a021af823.1606231483.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/perf')
-rw-r--r-- | arch/powerpc/perf/8xx-pmu.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/powerpc/perf/8xx-pmu.c b/arch/powerpc/perf/8xx-pmu.c index 93004ee586a1..f970d1510d3d 100644 --- a/arch/powerpc/perf/8xx-pmu.c +++ b/arch/powerpc/perf/8xx-pmu.c @@ -153,10 +153,7 @@ static void mpc8xx_pmu_read(struct perf_event *event) static void mpc8xx_pmu_del(struct perf_event *event, int flags) { - struct ppc_inst insn; - - /* mfspr r10, SPRN_SPRG_SCRATCH2 */ - insn = ppc_inst(PPC_INST_MFSPR | __PPC_RS(R10) | __PPC_SPR(SPRN_SPRG_SCRATCH2)); + struct ppc_inst insn = ppc_inst(PPC_RAW_MFSPR(10, SPRN_SPRG_SCRATCH2)); mpc8xx_pmu_read(event); |