mbox series

[v2,0/6] selftests: arm64: Add floating point selftests

Message ID 20200819114837.51466-1-broonie@kernel.org
Headers show
Series selftests: arm64: Add floating point selftests | expand

Message

Mark Brown Aug. 19, 2020, 11:48 a.m. UTC
This series imports a series of tests for FPSIMD and SVE originally
written by Dave Martin to the tree. Since these extensions have some
overlap in terms of register usage and must sometimes be tested together
they're dropped into a single directory. I've adapted some of the tests
to run within the kselftest framework but there are also some stress
tests here that are intended to be run as soak tests so aren't suitable
for running by default and are mostly just integrated with the build
system. There doesn't seem to be a more suitable home for those stress
tests and they are very useful for work on these areas of the code so it
seems useful to have them somewhere in tree.

v2: Rebased onto v5.9-rc1

Mark Brown (6):
  selftests: arm64: Test case for enumeration of SVE vector lengths
  selftests: arm64: Add test for the SVE ptrace interface
  selftests: arm64: Add stress tests for FPSMID and SVE context
    switching
  selftests: arm64: Add utility to set SVE vector lengths
  selftests: arm64: Add wrapper scripts for stress tests
  selftests: arm64: Add build and documentation for FP tests

 tools/testing/selftests/arm64/Makefile        |   2 +-
 tools/testing/selftests/arm64/fp/.gitignore   |   5 +
 tools/testing/selftests/arm64/fp/Makefile     |  17 +
 tools/testing/selftests/arm64/fp/README       | 100 +++
 .../testing/selftests/arm64/fp/asm-offsets.h  |  11 +
 tools/testing/selftests/arm64/fp/assembler.h  |  57 ++
 .../testing/selftests/arm64/fp/fpsimd-stress  |  60 ++
 .../testing/selftests/arm64/fp/fpsimd-test.S  | 482 +++++++++++++
 .../selftests/arm64/fp/sve-probe-vls.c        |  58 ++
 .../selftests/arm64/fp/sve-ptrace-asm.S       |  33 +
 tools/testing/selftests/arm64/fp/sve-ptrace.c | 336 +++++++++
 tools/testing/selftests/arm64/fp/sve-stress   |  59 ++
 tools/testing/selftests/arm64/fp/sve-test.S   | 672 ++++++++++++++++++
 tools/testing/selftests/arm64/fp/vlset.c      | 155 ++++
 14 files changed, 2046 insertions(+), 1 deletion(-)
 create mode 100644 tools/testing/selftests/arm64/fp/.gitignore
 create mode 100644 tools/testing/selftests/arm64/fp/Makefile
 create mode 100644 tools/testing/selftests/arm64/fp/README
 create mode 100644 tools/testing/selftests/arm64/fp/asm-offsets.h
 create mode 100644 tools/testing/selftests/arm64/fp/assembler.h
 create mode 100755 tools/testing/selftests/arm64/fp/fpsimd-stress
 create mode 100644 tools/testing/selftests/arm64/fp/fpsimd-test.S
 create mode 100644 tools/testing/selftests/arm64/fp/sve-probe-vls.c
 create mode 100644 tools/testing/selftests/arm64/fp/sve-ptrace-asm.S
 create mode 100644 tools/testing/selftests/arm64/fp/sve-ptrace.c
 create mode 100755 tools/testing/selftests/arm64/fp/sve-stress
 create mode 100644 tools/testing/selftests/arm64/fp/sve-test.S
 create mode 100644 tools/testing/selftests/arm64/fp/vlset.c

-- 
2.20.1

Comments

Shuah Khan Aug. 31, 2020, 9:45 p.m. UTC | #1
On 8/19/20 5:48 AM, Mark Brown wrote:
> This series imports a series of tests for FPSIMD and SVE originally

> written by Dave Martin to the tree. Since these extensions have some

> overlap in terms of register usage and must sometimes be tested together

> they're dropped into a single directory. I've adapted some of the tests

> to run within the kselftest framework but there are also some stress

> tests here that are intended to be run as soak tests so aren't suitable

> for running by default and are mostly just integrated with the build

> system. There doesn't seem to be a more suitable home for those stress

> tests and they are very useful for work on these areas of the code so it

> seems useful to have them somewhere in tree.

> 

> v2: Rebased onto v5.9-rc1

> 

> Mark Brown (6):

>    selftests: arm64: Test case for enumeration of SVE vector lengths

>    selftests: arm64: Add test for the SVE ptrace interface

>    selftests: arm64: Add stress tests for FPSMID and SVE context

>      switching

>    selftests: arm64: Add utility to set SVE vector lengths

>    selftests: arm64: Add wrapper scripts for stress tests

>    selftests: arm64: Add build and documentation for FP tests

> 

>   tools/testing/selftests/arm64/Makefile        |   2 +-

>   tools/testing/selftests/arm64/fp/.gitignore   |   5 +

>   tools/testing/selftests/arm64/fp/Makefile     |  17 +

>   tools/testing/selftests/arm64/fp/README       | 100 +++

>   .../testing/selftests/arm64/fp/asm-offsets.h  |  11 +

>   tools/testing/selftests/arm64/fp/assembler.h  |  57 ++

>   .../testing/selftests/arm64/fp/fpsimd-stress  |  60 ++

>   .../testing/selftests/arm64/fp/fpsimd-test.S  | 482 +++++++++++++

>   .../selftests/arm64/fp/sve-probe-vls.c        |  58 ++

>   .../selftests/arm64/fp/sve-ptrace-asm.S       |  33 +

>   tools/testing/selftests/arm64/fp/sve-ptrace.c | 336 +++++++++

>   tools/testing/selftests/arm64/fp/sve-stress   |  59 ++

>   tools/testing/selftests/arm64/fp/sve-test.S   | 672 ++++++++++++++++++

>   tools/testing/selftests/arm64/fp/vlset.c      | 155 ++++

>   14 files changed, 2046 insertions(+), 1 deletion(-)

>   create mode 100644 tools/testing/selftests/arm64/fp/.gitignore

>   create mode 100644 tools/testing/selftests/arm64/fp/Makefile

>   create mode 100644 tools/testing/selftests/arm64/fp/README

>   create mode 100644 tools/testing/selftests/arm64/fp/asm-offsets.h

>   create mode 100644 tools/testing/selftests/arm64/fp/assembler.h

>   create mode 100755 tools/testing/selftests/arm64/fp/fpsimd-stress

>   create mode 100644 tools/testing/selftests/arm64/fp/fpsimd-test.S

>   create mode 100644 tools/testing/selftests/arm64/fp/sve-probe-vls.c

>   create mode 100644 tools/testing/selftests/arm64/fp/sve-ptrace-asm.S

>   create mode 100644 tools/testing/selftests/arm64/fp/sve-ptrace.c

>   create mode 100755 tools/testing/selftests/arm64/fp/sve-stress

>   create mode 100644 tools/testing/selftests/arm64/fp/sve-test.S

>   create mode 100644 tools/testing/selftests/arm64/fp/vlset.c

> 



Will,

Patches look good to me from selftests perspective. My acked by
for these patches to go through arm64.

Acked-by: Shuah Khan <skhan@linuxfoundation.org>


If you would like me to take these through kselftest tree, give
me your Acks. I can queue these up for 5.10-rc1

thanks,
-- Shuah
Will Deacon Sept. 1, 2020, 1:21 p.m. UTC | #2
On Mon, Aug 31, 2020 at 03:45:46PM -0600, Shuah Khan wrote:
> On 8/19/20 5:48 AM, Mark Brown wrote:

> > This series imports a series of tests for FPSIMD and SVE originally

> > written by Dave Martin to the tree. Since these extensions have some

> > overlap in terms of register usage and must sometimes be tested together

> > they're dropped into a single directory. I've adapted some of the tests

> > to run within the kselftest framework but there are also some stress

> > tests here that are intended to be run as soak tests so aren't suitable

> > for running by default and are mostly just integrated with the build

> > system. There doesn't seem to be a more suitable home for those stress

> > tests and they are very useful for work on these areas of the code so it

> > seems useful to have them somewhere in tree.

> > 

> > v2: Rebased onto v5.9-rc1

> > 

> > Mark Brown (6):

> >    selftests: arm64: Test case for enumeration of SVE vector lengths

> >    selftests: arm64: Add test for the SVE ptrace interface

> >    selftests: arm64: Add stress tests for FPSMID and SVE context

> >      switching

> >    selftests: arm64: Add utility to set SVE vector lengths

> >    selftests: arm64: Add wrapper scripts for stress tests

> >    selftests: arm64: Add build and documentation for FP tests

> 

> Patches look good to me from selftests perspective. My acked by

> for these patches to go through arm64.

> 

> Acked-by: Shuah Khan <skhan@linuxfoundation.org>


Thanks, Shuah.

> If you would like me to take these through kselftest tree, give

> me your Acks. I can queue these up for 5.10-rc1


Given there are a few arm64 kselftests series pending at the moment, I'll
queue them in the arm64 tree, but on their own branch in case you end up
needing to pull it in as well. I'll drop you a note once I've done that
(I'm just starting to queue stuff this week).

Will
Dave Martin Sept. 1, 2020, 3:27 p.m. UTC | #3
On Tue, Sep 01, 2020 at 02:21:59PM +0100, Will Deacon wrote:
> On Mon, Aug 31, 2020 at 03:45:46PM -0600, Shuah Khan wrote:

> > On 8/19/20 5:48 AM, Mark Brown wrote:

> > > This series imports a series of tests for FPSIMD and SVE originally

> > > written by Dave Martin to the tree. Since these extensions have some

> > > overlap in terms of register usage and must sometimes be tested together

> > > they're dropped into a single directory. I've adapted some of the tests

> > > to run within the kselftest framework but there are also some stress

> > > tests here that are intended to be run as soak tests so aren't suitable

> > > for running by default and are mostly just integrated with the build

> > > system. There doesn't seem to be a more suitable home for those stress

> > > tests and they are very useful for work on these areas of the code so it

> > > seems useful to have them somewhere in tree.

> > > 

> > > v2: Rebased onto v5.9-rc1

> > > 

> > > Mark Brown (6):

> > >    selftests: arm64: Test case for enumeration of SVE vector lengths

> > >    selftests: arm64: Add test for the SVE ptrace interface

> > >    selftests: arm64: Add stress tests for FPSMID and SVE context

> > >      switching

> > >    selftests: arm64: Add utility to set SVE vector lengths

> > >    selftests: arm64: Add wrapper scripts for stress tests

> > >    selftests: arm64: Add build and documentation for FP tests

> > 

> > Patches look good to me from selftests perspective. My acked by

> > for these patches to go through arm64.

> > 

> > Acked-by: Shuah Khan <skhan@linuxfoundation.org>

> 

> Thanks, Shuah.

> 

> > If you would like me to take these through kselftest tree, give

> > me your Acks. I can queue these up for 5.10-rc1

> 

> Given there are a few arm64 kselftests series pending at the moment, I'll

> queue them in the arm64 tree, but on their own branch in case you end up

> needing to pull it in as well. I'll drop you a note once I've done that

> (I'm just starting to queue stuff this week).

> 

> Will


FWIW,

Acked-by: Dave Martin <Dave.Martin@arm.com>


I haven't gone through the integration in detail, but nothing leaps out
as disastrously wrong.


I'm not sure how useful these tests are to people in general, but
they've been valuable for maintaining the FP context switch code on
arm64.  I think it makes sense to keep them alongside the kernel so that
they don't get get lost.

Cheers
---Dave
Will Deacon Sept. 18, 2020, 4:17 p.m. UTC | #4
On Wed, 19 Aug 2020 12:48:31 +0100, Mark Brown wrote:
> This series imports a series of tests for FPSIMD and SVE originally

> written by Dave Martin to the tree. Since these extensions have some

> overlap in terms of register usage and must sometimes be tested together

> they're dropped into a single directory. I've adapted some of the tests

> to run within the kselftest framework but there are also some stress

> tests here that are intended to be run as soak tests so aren't suitable

> for running by default and are mostly just integrated with the build

> system. There doesn't seem to be a more suitable home for those stress

> tests and they are very useful for work on these areas of the code so it

> seems useful to have them somewhere in tree.

> 

> [...]


Applied to arm64 (for-next/selftests), thanks!

[1/6] selftests: arm64: Test case for enumeration of SVE vector lengths
      https://git.kernel.org/arm64/c/ca765153eb90
[2/6] selftests: arm64: Add test for the SVE ptrace interface
      https://git.kernel.org/arm64/c/0dca276ac4d2
[3/6] selftests: arm64: Add stress tests for FPSMID and SVE context switching
      https://git.kernel.org/arm64/c/5e992c638ea5
[4/6] selftests: arm64: Add utility to set SVE vector lengths
      https://git.kernel.org/arm64/c/fc7e611f9f38
[5/6] selftests: arm64: Add wrapper scripts for stress tests
      https://git.kernel.org/arm64/c/25f47e3eb66e
[6/6] selftests: arm64: Add build and documentation for FP tests
      https://git.kernel.org/arm64/c/e093256d14fb

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev