From: Libor Pechacek <lpechacek@suse.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@ozlabs.org, msuchanek@suse.de
Subject: Re: [PATCH] selftests/powerpc: Only test lwm/stmw on big endian
Date: Tue, 19 Jan 2021 21:01:07 +0100 [thread overview]
Message-ID: <YAc6g2laaVprHX7K@fmn> (raw)
In-Reply-To: <20210119041800.3093047-1-mpe@ellerman.id.au>
On Út 19-01-21 15:18:00, Michael Ellerman wrote:
> Newer binutils (>= 2.36) refuse to assemble lmw/stmw when building in
> little endian mode. That breaks compilation of our alignment handler
> test:
>
> /tmp/cco4l14N.s: Assembler messages:
> /tmp/cco4l14N.s:1440: Error: `lmw' invalid when little-endian
> /tmp/cco4l14N.s:1814: Error: `stmw' invalid when little-endian
> make[2]: *** [../../lib.mk:139: /output/kselftest/powerpc/alignment/alignment_handler] Error 1
>
> These tests do pass on little endian machines, as the kernel will
> still emulate those instructions even when running little
> endian (which is arguably a kernel bug).
>
> But we don't really need to test that case, so ifdef those
> instructions out to get the alignment test building again.
>
> Reported-by: Libor Pechacek <lpechacek@suse.com>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Tested-by: Libor Pechacek <lpechacek@suse.com>
Thanks, Michael, for the fix!
Libor
> ---
> .../testing/selftests/powerpc/alignment/alignment_handler.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/powerpc/alignment/alignment_handler.c b/tools/testing/selftests/powerpc/alignment/alignment_handler.c
> index cb53a8b777e6..c25cf7cd45e9 100644
> --- a/tools/testing/selftests/powerpc/alignment/alignment_handler.c
> +++ b/tools/testing/selftests/powerpc/alignment/alignment_handler.c
> @@ -443,7 +443,6 @@ int test_alignment_handler_integer(void)
> LOAD_DFORM_TEST(ldu);
> LOAD_XFORM_TEST(ldx);
> LOAD_XFORM_TEST(ldux);
> - LOAD_DFORM_TEST(lmw);
> STORE_DFORM_TEST(stb);
> STORE_XFORM_TEST(stbx);
> STORE_DFORM_TEST(stbu);
> @@ -462,7 +461,11 @@ int test_alignment_handler_integer(void)
> STORE_XFORM_TEST(stdx);
> STORE_DFORM_TEST(stdu);
> STORE_XFORM_TEST(stdux);
> +
> +#ifdef __BIG_ENDIAN__
> + LOAD_DFORM_TEST(lmw);
> STORE_DFORM_TEST(stmw);
> +#endif
>
> return rc;
> }
> --
> 2.25.1
>
--
Libor Pechacek
SUSE Labs Remember to have fun...
next prev parent reply other threads:[~2021-01-19 20:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-19 4:18 [PATCH] selftests/powerpc: Only test lwm/stmw on big endian Michael Ellerman
2021-01-19 20:01 ` Libor Pechacek [this message]
2021-01-20 1:12 ` Segher Boessenkool
2021-01-20 4:44 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YAc6g2laaVprHX7K@fmn \
--to=lpechacek@suse.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=msuchanek@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.