• Ard Biesheuvel's avatar
    arm64: mmu: Make __cpu_replace_ttbr1() out of line · 82ca151d
    Ard Biesheuvel authored
    __cpu_replace_ttbr1() is a static inline, and so it gets instantiated
    wherever it is used. This is not really necessary, as it is never called
    on a hot path. It also has the unfortunate side effect that the symbol
    idmap_cpu_replace_ttbr1 may never be referenced from kCFI enabled C
    code, and this means the type id symbol may not exist either.  This will
    result in a build error once we start referring to this symbol from asm
    code as well. (Note that this problem only occurs when CnP, KAsan and
    suspend/resume are all disabled in the Kconfig but that is a valid
    config, if unusual).
    
    So let's just move it out of line so all callers will share the same
    implementation, which will reference idmap_cpu_replace_ttbr1
    unconditionally.
    Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
    Link: https://lore.kernel.org/r/20240214122845.2033971-62-ardb+git@google.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    82ca151d
mmu.c 39.8 KB