]> git.baikalelectronics.ru Git - kernel.git/commitdiff
selftests/powerpc: Don't save CR by default in asm helpers
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 27 Jun 2022 14:02:30 +0000 (00:02 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 25 Jul 2022 02:05:15 +0000 (12:05 +1000)
Thare are some asm helpers for creating/popping stack frames in
basic_asm.h. They always save/restore CR, but none of the selftests
tests touch non-volatile CR fields, so it's unnecessary to save them by
default.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220627140239.2464900-4-mpe@ellerman.id.au
tools/testing/selftests/powerpc/include/basic_asm.h

index 807e83e821ec9d5bba07fdf2efffa684df971710..faec7b11c041dfc89188e3edc697b37f4af62f27 100644 (file)
        mflr    r0; \
        std     r0, STACK_FRAME_LR_POS(%r1); \
        stdu    %r1, -(((_extra + 15) & ~15) + STACK_FRAME_MIN_SIZE)(%r1); \
-       mfcr    r0; \
-       stw     r0, STACK_FRAME_CR_POS(%r1); \
        std     %r2, STACK_FRAME_TOC_POS(%r1);
 
 #define POP_BASIC_STACK(_extra) \
        ld      %r2, STACK_FRAME_TOC_POS(%r1); \
-       lwz     r0, STACK_FRAME_CR_POS(%r1); \
-       mtcr    r0; \
        addi    %r1, %r1, (((_extra + 15) & ~15) + STACK_FRAME_MIN_SIZE); \
        ld      r0, STACK_FRAME_LR_POS(%r1); \
        mtlr    r0;