summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/inst.h
diff options
context:
space:
mode:
authorJordan Niethe <jniethe5@gmail.com>2020-05-06 13:40:33 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2020-05-19 00:10:37 +1000
commit7ba68b2172c19031fdc2a2caf37328edd146e299 (patch)
tree308fb5c5231ef35c900818c159b58b7410cb3d18 /arch/powerpc/include/asm/inst.h
parentf8faaffaa7d99028e457ef2d1dcb43a98f736938 (diff)
powerpc: Add a probe_user_read_inst() function
Introduce a probe_user_read_inst() function to use in cases where probe_user_read() is used for getting an instruction. This will be more useful for prefixed instructions. Signed-off-by: Jordan Niethe <jniethe5@gmail.com> Reviewed-by: Alistair Popple <alistair@popple.id.au> [mpe: Don't write to *inst on error, fold in __user annotations] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200506034050.24806-14-jniethe5@gmail.com
Diffstat (limited to 'arch/powerpc/include/asm/inst.h')
-rw-r--r--arch/powerpc/include/asm/inst.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/inst.h b/arch/powerpc/include/asm/inst.h
index f9cbb24d2e34..4db0ecee2698 100644
--- a/arch/powerpc/include/asm/inst.h
+++ b/arch/powerpc/include/asm/inst.h
@@ -37,4 +37,7 @@ static inline bool ppc_inst_equal(struct ppc_inst x, struct ppc_inst y)
return ppc_inst_val(x) == ppc_inst_val(y);
}
+int probe_user_read_inst(struct ppc_inst *inst,
+ struct ppc_inst __user *nip);
+
#endif /* _ASM_POWERPC_INST_H */