selftests/powerpc: Remove -flto from common CFLAGS
Michael Ellerman
mpe at ellerman.id.au
Mon Feb 29 22:10:13 AEDT 2016
Hi Suraj,
On Mon, 2016-29-02 at 06:29:55 UTC, Suraj Jitindar Singh wrote:
> LTO can cause GCC to inline some functions which have attributes set. The
You should define what LTO is the first time you use it.
> act of inlining the functions can lead to GCC forgetting about the
> attributes which leads to incorrect tests.
> Notable example being: __attribute__((__target__("no-vsx")))
That is probably a GCC bug, but we still need to work around it for now.
> LTO can also interact strangely with custom assembly functions and cause
> tests to intermittently fail.
That's probably Cyril writing bad asm :)
> Both these cases are hard to detect and require manual inspection of
> binaries which is unlikely to happen for all tests. Furthermore, LTO
> optimisations are not necessary for selftests and correctness is paramount
> and as such it is best to disable LTO.
>
> LTO can be enabled on a per test basis.
>
> A pseries_le_defconfig kernel on a POWER8 was used to determine that the
> same subset of selftests pass and fail with and without -flto in the
> common Makefile.
>
> These tests always fail:
> selftests: per_event_excludes [FAIL]
> selftests: event_attributes_test [FAIL]
> selftests: ebb_vs_cpu_event_test [FAIL]
> selftests: cpu_event_vs_ebb_test [FAIL]
> selftests: cpu_event_pinned_vs_ebb_test [FAIL]
They shouldn't :)
Are you running as root? Bare metal or guest?
> selftests: ipc_unmuxed [FAIL]
That one is expected.
cheers
More information about the Linuxppc-dev
mailing list