• Ard Biesheuvel's avatar
    ARM: cacheflush: avoid clobbering the frame pointer · 1f640552
    Ard Biesheuvel authored
    Thumb2 uses R7 rather than R11 as the frame pointer, and even if we
    rarely use a frame pointer to begin with when building in Thumb2 mode,
    there are cases where it is required by the compiler (Clang when
    inserting profiling hooks via -pg)
    
    However, preserving and restoring the frame pointer is risky, as any
    unhandled exceptions raised in the mean time will produce a bogus
    backtrace, and it would be better not to touch the frame pointer at all.
    This is the case even when CONFIG_FRAME_POINTER is not set, as the
    unwind directive used by the unwinder may also use R7 or R11 as the
    unwind anchor, even if the frame pointer is not managed strictly
    according to the frame pointer ABI.
    
    So let's tweak the cacheflush asm code not to clobber R7 or R11 at all,
    so that we can drop R7 from the clobber lists of the inline asm blocks
    that call these routines, and remove the code that preserves/restores
    R11.
    Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
    Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
    1f640552
mcpm-exynos.c 8.34 KB