History log of /external/linux-kselftest/tools/testing/selftests/powerpc/benchmarks/context_switch.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
15ec3997aa3bffc461f7b47ca9365d4b0323c671 30-Sep-2016 Simon Guo <wei.guo.simon@gmail.com> selftests/powerpc: Move shared headers into new include dir

There are some functions, especially register related, which can
be shared across multiple selftests/powerpc test directories.

This patch creates a new include directory to store those shared
files, so that the file layout becomes more neat.

Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
[mpe: Reworked to move the headers only]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
/external/linux-kselftest/tools/testing/selftests/powerpc/benchmarks/context_switch.c
f2418ae8a81760b4dec8d5e3e7f1faf45c422e9d 04-Mar-2016 Cyril Bur <cyrilbur@gmail.com> selftests/powerpc: Fix generation of vector instructions/types in context_switch

Currently it doesn't appear the resulting binary actually uses any
Altivec or VSX instructions the solution is to explicitly tell GCC to
use vector instructions and use vector types in the code.

Part of this this issue can be GCC version specific:

GCC 4.9.x is happy to use Altivec and VSX instructions if altivec.h is
includedi (and possibly if vector types are used), this also means that
4.9.x will use VSX instructions even if only -maltivec is passed. It is
also possible that Altivec instructions will be used even without
-maltivec or -mabi=altivec.

GCC 5.2.x complains about the lack of -maltivec parameter if altivec.h
is included and will not use VSX unless -mvsx is present on commandline.

GCC 5.3.0 has a regression that means __attribute__((__target__("no-vsx"))
fails to build. A fix is targeted for 5.4.

Furthermore LTO (Link Time Optimisation) doesn't play well with
__attribute__((__target__("no-vsx")), LTO can cause GCC to forget about
the attribute and compile with VSX instructions regardless. Be wary when
enabling -flfo for this test.

Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
/external/linux-kselftest/tools/testing/selftests/powerpc/benchmarks/context_switch.c
94fa56a96a39914551694673fdb483b8924b0e56 04-Mar-2016 Cyril Bur <cyrilbur@gmail.com> selftests/powerpc: Fix usage message in context_switch

When we inverted the behaviour of the flags we forgot to update the
usage message.

Fixes: 51c21e72eb99 ("selftests/powerpc: Make context_switch touch FP/altivec/vector by default")
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
/external/linux-kselftest/tools/testing/selftests/powerpc/benchmarks/context_switch.c
51c21e72eb99d1136614135d633baae269893778 02-Dec-2015 Michael Ellerman <mpe@ellerman.id.au> selftests/powerpc: Make context_switch touch FP/altivec/vector by default

Simply because it touches more code paths that way, and therefore tests
more things.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Anton Blanchard <anton@samba.org>
/external/linux-kselftest/tools/testing/selftests/powerpc/benchmarks/context_switch.c
ea0c321784565c681507e02acf900deaa1e9e952 02-Dec-2015 Michael Ellerman <mpe@ellerman.id.au> selftests/powerpc: Make context_switch do something with no args

For ease of use make the context_switch test do something useful when
called with no arguments.

Default to a 30 second run, using threads, doing yield, and use any
online cpu. Make it print out what it's doing to avoid confusion.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Anton Blanchard <anton@samba.org>
/external/linux-kselftest/tools/testing/selftests/powerpc/benchmarks/context_switch.c
00b7ec5c9cf338902faea2e40801573a384e45be 02-Dec-2015 Michael Ellerman <mpe@ellerman.id.au> selftests/powerpc: Import Anton's context_switch2 benchmark

This gets referred to a lot in commit messages, so let's pull it into
the selftests.

Almost vanilla from: http://ozlabs.org/~anton/junkcode/context_switch2.c

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Anton Blanchard <anton@samba.org>
/external/linux-kselftest/tools/testing/selftests/powerpc/benchmarks/context_switch.c