[PATCH v2] selftests/powerpc: Always test lmw and stmw

Michael Ellerman mpe at ellerman.id.au
Wed Jun 16 11:06:01 AEST 2021


Jordan Niethe <jniethe5 at gmail.com> writes:
> Load Multiple Word (lmw) and Store Multiple Word (stmw) will raise an
> Alignment Exception:
>   - Little Endian mode: always
>   - Big Endian mode: address not word aligned
>
> These conditions do not depend on cache inhibited memory. Test the
> alignment handler emulation of these instructions regardless of if there
> is cache inhibited memory available or not.
>
> Commit dd3a44c06f7b ("selftests/powerpc: Only test lwm/stmw on big
> endian") stopped testing lmw/stmw on little endian because newer
> binutils (>= 2.36) will not assemble them in little endian mode. The
> kernel still emulates these instructions in little endian mode so use
> macros to generate them and test them.
>
> Signed-off-by: Jordan Niethe <jniethe5 at gmail.com>
> ---
> v2: Use macros for lmw/stmw
> ---
>  .../powerpc/alignment/alignment_handler.c     | 101 +++++++++++++++++-
>  .../selftests/powerpc/include/instructions.h  |  10 ++
>  2 files changed, 106 insertions(+), 5 deletions(-)

Fails for me on BE?

test: test_alignment_handler_multiple
tags: git_version:v5.13-rc5-2025-g31e45305e351
        Doing lmw:      FAILED: Wrong Data
        Doing stmw:     FAILED: Wrong Data
failure: test_alignment_handler_multiple

cheers


More information about the Linuxppc-dev mailing list