WSL2-Linux-Kernel/arch/powerpc/lib
Anders Roxell 45948a4b1f powerpc/lib/sstep: fix 'ptesync' build error
commit fe663df782 upstream.

Building tinyconfig with gcc (Debian 11.2.0-16) and assembler (Debian
2.37.90.20220207) the following build error shows up:

  {standard input}: Assembler messages:
  {standard input}:2088: Error: unrecognized opcode: `ptesync'
  make[3]: *** [/builds/linux/scripts/Makefile.build:287: arch/powerpc/lib/sstep.o] Error 1

Add the 'ifdef CONFIG_PPC64' around the 'ptesync' in function
'emulate_update_regs()' to like it is in 'analyse_instr()'. Since it looks like
it got dropped inadvertently by commit 3cdfcbfd32 ("powerpc: Change
analyse_instr so it doesn't modify *regs").

A key detail is that analyse_instr() will never recognise lwsync or
ptesync on 32-bit (because of the existing ifdef), and as a result
emulate_update_regs() should never be called with an op specifying
either of those on 32-bit. So removing them from emulate_update_regs()
should be a nop in terms of runtime behaviour.

Fixes: 3cdfcbfd32 ("powerpc: Change analyse_instr so it doesn't modify *regs")
Cc: stable@vger.kernel.org # v4.14+
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
[mpe: Add last paragraph of change log mentioning analyse_instr() details]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220211005113.1361436-1-anders.roxell@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-23 12:03:14 +01:00
..
Makefile powerpc/32: Fix boot failure with GCC latent entropy plugin 2022-02-01 17:27:06 +01:00
alloc.c
checksum_32.S
checksum_64.S
checksum_wrappers.c powerpc/net: Switch csum_and_copy_{to/from}_user to user_access block 2021-03-26 23:19:43 +11:00
code-patching.c powerpc/lib: Add helper to check if offset is within conditional branch range 2021-10-07 18:52:33 +11:00
copy_32.S
copy_mc_64.S
copypage_64.S
copypage_power7.S
copyuser_64.S
copyuser_power7.S
crtsavres.S
div64.S
error-inject.c powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
feature-fixups-test.S
feature-fixups.c powerpc/security: Use a mutex for interrupt exit code patching 2021-11-18 19:17:19 +01:00
hweight_64.S
ldstfp.S
locks.c
mem_64.S
memcmp_32.S
memcmp_64.S
memcpy_64.S
memcpy_power7.S
pmem.c
quad.S
restart_table.c powerpc/64s: add a table of implicit soft-masked addresses 2021-06-30 22:21:20 +10:00
rheap.c
sstep.c powerpc/lib/sstep: fix 'ptesync' build error 2022-02-23 12:03:14 +01:00
string.S
string_32.S
string_64.S
strlen_32.S
test_code-patching.S
test_emulate_step.c powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
test_emulate_step_exec_instr.S
vmx-helper.c
xor_vmx.c
xor_vmx.h
xor_vmx_glue.c