selftests/rseq: x86: Template memory ordering and percpu access mode
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 22 Nov 2022 20:39:13 +0000 (15:39 -0500)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 27 Dec 2022 11:52:12 +0000 (12:52 +0100)
commitae31573843028ad17b1a807081c542d17fa9a83a
tree99062d94df5f08a2deb7d0fd79d9e41d7cff3560
parent18c2355838e76788f61849f4d83513b103d68b95
selftests/rseq: x86: Template memory ordering and percpu access mode

Introduce a rseq-x86-bits.h template header which is internally included
to generate the static inline functions covering:

- relaxed and release memory ordering,
- per-cpu-id and per-mm-cid per-cpu data access.

This introduces changes to the rseq.h selftests API which require to
update the rseq selftest programs. Similar API/templating changes need
to be done for other architectures.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20221122203932.231377-12-mathieu.desnoyers@efficios.com
tools/testing/selftests/rseq/compiler.h
tools/testing/selftests/rseq/rseq-bits-reset.h [new file with mode: 0644]
tools/testing/selftests/rseq/rseq-bits-template.h [new file with mode: 0644]
tools/testing/selftests/rseq/rseq-x86-bits.h [new file with mode: 0644]
tools/testing/selftests/rseq/rseq-x86.h
tools/testing/selftests/rseq/rseq.h