linux/tools/testing/selftests/rseq
Mathieu Desnoyers de6b52a214 selftests/rseq: Fix ppc32 missing instruction selection "u" and "x" for load/store
Building the rseq basic test  with
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12)
Target: powerpc-linux-gnu

leads to these errors:

/tmp/ccieEWxU.s: Assembler messages:
/tmp/ccieEWxU.s:118: Error: syntax error; found `,', expected `('
/tmp/ccieEWxU.s:118: Error: junk at end of line: `,8'
/tmp/ccieEWxU.s:121: Error: syntax error; found `,', expected `('
/tmp/ccieEWxU.s:121: Error: junk at end of line: `,8'
/tmp/ccieEWxU.s:626: Error: syntax error; found `,', expected `('
/tmp/ccieEWxU.s:626: Error: junk at end of line: `,8'
/tmp/ccieEWxU.s:629: Error: syntax error; found `,', expected `('
/tmp/ccieEWxU.s:629: Error: junk at end of line: `,8'
/tmp/ccieEWxU.s:735: Error: syntax error; found `,', expected `('
/tmp/ccieEWxU.s:735: Error: junk at end of line: `,8'
/tmp/ccieEWxU.s:738: Error: syntax error; found `,', expected `('
/tmp/ccieEWxU.s:738: Error: junk at end of line: `,8'
/tmp/ccieEWxU.s:741: Error: syntax error; found `,', expected `('
/tmp/ccieEWxU.s:741: Error: junk at end of line: `,8'
Makefile:581: recipe for target 'basic_percpu_ops_test.o' failed

Based on discussion with Linux powerpc maintainers and review of
the use of the "m" operand in powerpc kernel code, add the missing
%Un%Xn (where n is operand number) to the lwz, stw, ld, and std
instructions when used with "m" operands.

Using "WORD" to mean either a 32-bit or 64-bit type depending on
the architecture is misleading. The term "WORD" really means a
32-bit type in both 32-bit and 64-bit powerpc assembler. The intent
here is to wrap load/store to intptr_t into common macros for both
32-bit and 64-bit.

Rename the macros with a RSEQ_ prefix, and use the terms "INT"
for always 32-bit type, and "LONG" for architecture bitness-sized
type.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20220124171253.22072-10-mathieu.desnoyers@efficios.com
2022-02-02 13:11:36 +01:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
basic_percpu_ops_test.c selftests/rseq: remove ARRAY_SIZE define from individual tests 2021-12-10 17:51:03 -07:00
basic_test.c
Makefile selftests/rseq: Uplift rseq selftests for compatibility with glibc-2.35 2022-02-02 13:11:35 +01:00
param_test.c selftests/rseq: Remove useless assignment to cpu variable 2022-02-02 13:11:34 +01:00
rseq-abi.h selftests/rseq: introduce own copy of rseq uapi header 2022-02-02 13:11:33 +01:00
rseq-arm64.h selftests/rseq: Fix ppc32: wrong rseq_cs 32-bit field pointer on big endian 2022-02-02 13:11:35 +01:00
rseq-arm.h selftests/rseq: Fix ppc32: wrong rseq_cs 32-bit field pointer on big endian 2022-02-02 13:11:35 +01:00
rseq-generic-thread-pointer.h selftests/rseq: Introduce thread pointer getters 2022-02-02 13:11:35 +01:00
rseq-mips.h selftests/rseq: Fix ppc32: wrong rseq_cs 32-bit field pointer on big endian 2022-02-02 13:11:35 +01:00
rseq-ppc-thread-pointer.h selftests/rseq: Introduce thread pointer getters 2022-02-02 13:11:35 +01:00
rseq-ppc.h selftests/rseq: Fix ppc32 missing instruction selection "u" and "x" for load/store 2022-02-02 13:11:36 +01:00
rseq-s390.h selftests/rseq: Fix ppc32: wrong rseq_cs 32-bit field pointer on big endian 2022-02-02 13:11:35 +01:00
rseq-skip.h
rseq-thread-pointer.h selftests/rseq: Introduce thread pointer getters 2022-02-02 13:11:35 +01:00
rseq-x86-thread-pointer.h selftests/rseq: Introduce thread pointer getters 2022-02-02 13:11:35 +01:00
rseq-x86.h selftests/rseq: Introduce rseq_get_abi() helper 2022-02-02 13:11:35 +01:00
rseq.c selftests/rseq: Uplift rseq selftests for compatibility with glibc-2.35 2022-02-02 13:11:35 +01:00
rseq.h selftests/rseq: Uplift rseq selftests for compatibility with glibc-2.35 2022-02-02 13:11:35 +01:00
run_param_test.sh rseq/selftests: Test MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ 2020-09-25 14:23:27 +02:00
settings rseq/selftests: Turn off timeout setting 2019-12-23 10:52:41 -07:00