]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
powerpc/selftests/copyloops: extend selftest to exercise __copy_tofrom_user_power7_vmx
authorSayali Patil <sayalip@linux.ibm.com>
Wed, 4 Mar 2026 12:22:01 +0000 (17:52 +0530)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Thu, 12 Mar 2026 05:33:48 +0000 (11:03 +0530)
commit146c9ab38b48004b40735b6c1e1c2b5adf6436f9
tree9780a93edf83ea0e98d0d0170c2cd1d73fd1f5ef
parent6bc9c0a905228bea5c53ec195fe54f5f0233dccc
powerpc/selftests/copyloops: extend selftest to exercise __copy_tofrom_user_power7_vmx

The new PowerPC VMX fast path (__copy_tofrom_user_power7_vmx) is not
exercised by existing copyloops selftests. This patch updates
the selftest to exercise the VMX variant, ensuring the VMX copy path
is validated.

Changes include:
  - COPY_LOOP=test___copy_tofrom_user_power7_vmx with -D VMX_TEST is used
    in existing selftest build targets.
  - Inclusion of ../utils.c to provide get_auxv_entry() for hardware
    feature detection.
  - At runtime, the test skips execution if Altivec is not available.
  - Copy sizes above VMX_COPY_THRESHOLD are used to ensure the VMX
    path is taken.

This enables validation of the VMX fast path without affecting systems
that do not support Altivec.

Signed-off-by: Sayali Patil <sayalip@linux.ibm.com>
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260304122201.153049-2-sayalip@linux.ibm.com
tools/testing/selftests/powerpc/copyloops/.gitignore
tools/testing/selftests/powerpc/copyloops/Makefile
tools/testing/selftests/powerpc/copyloops/stubs.S
tools/testing/selftests/powerpc/copyloops/validate.c