mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 22:51:35 +00:00
50428fdc53
There are quite a few places where instructions are printed, this is done using a '%x' format specifier. With the introduction of prefixed instructions, this does not work well. Currently in these places, ppc_inst_val() is used for the value for %x so only the first word of prefixed instructions are printed. When the instructions are word instructions, only a single word should be printed. For prefixed instructions both the prefix and suffix should be printed. To accommodate both of these situations, instead of a '%x' specifier use '%s' and introduce a helper, __ppc_inst_as_str() which returns a char *. The char * __ppc_inst_as_str() returns is buffer that is passed to it by the caller. It is cumbersome to require every caller of __ppc_inst_as_str() to now declare a buffer. To make it more convenient to use __ppc_inst_as_str(), wrap it in a macro that uses a compound statement to allocate a buffer on the caller's stack before calling it. Signed-off-by: Jordan Niethe <jniethe5@gmail.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Acked-by: Segher Boessenkool <segher@kernel.crashing.org> [mpe: Drop 0x prefix to match most existings uses, especially xmon] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200602052728.18227-1-jniethe5@gmail.com |
||
---|---|---|
.. | ||
alloc.c | ||
checksum_32.S | ||
checksum_64.S | ||
checksum_wrappers.c | ||
code-patching.c | ||
copy_32.S | ||
copypage_64.S | ||
copypage_power7.S | ||
copyuser_64.S | ||
copyuser_power7.S | ||
crtsavres.S | ||
div64.S | ||
error-inject.c | ||
feature-fixups-test.S | ||
feature-fixups.c | ||
hweight_64.S | ||
inst.c | ||
ldstfp.S | ||
locks.c | ||
Makefile | ||
mem_64.S | ||
memcmp_32.S | ||
memcmp_64.S | ||
memcpy_64.S | ||
memcpy_mcsafe_64.S | ||
memcpy_power7.S | ||
pmem.c | ||
quad.S | ||
rheap.c | ||
sstep.c | ||
string_32.S | ||
string_64.S | ||
string.S | ||
strlen_32.S | ||
test_code-patching.S | ||
test_emulate_step_exec_instr.S | ||
test_emulate_step.c | ||
vmx-helper.c | ||
xor_vmx_glue.c | ||
xor_vmx.c | ||
xor_vmx.h |