powerpc/64s: Move dcbt/dcbtst sequence into a macro
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 29 Feb 2024 12:25:17 +0000 (23:25 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 3 Mar 2024 12:05:21 +0000 (23:05 +1100)
commit8488cdcb00fd5f238754005a43a3a7445860d344
tree162e49f3dae81701e48520d340fc4f00e2f2a588
parentd9cf600ecb7b053345aa76c1988cf374260cfdaf
powerpc/64s: Move dcbt/dcbtst sequence into a macro

There's an almost identical code sequence to specify load/store access
hints in __copy_tofrom_user_power7(), copypage_power7() and
memcpy_power7().

Move the sequence into a common macro, which is passed the registers to
use as they differ slightly.

There also needs to be a copy in the selftests, it could be shared in
future if the headers are cleaned up / refactored.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240229122521.762431-1-mpe@ellerman.id.au
arch/powerpc/include/asm/ppc_asm.h
arch/powerpc/lib/copypage_power7.S
arch/powerpc/lib/copyuser_power7.S
arch/powerpc/lib/memcpy_power7.S
tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h