• Will Deacon's avatar
    arm64: alternatives: ensure secondary CPUs execute ISB after patching · 04b8637b
    Will Deacon authored
    In order to guarantee that the patched instruction stream is visible to
    a CPU, that CPU must execute an isb instruction after any related cache
    maintenance has completed.
    
    The instruction patching routines in kernel/insn.c get this right for
    things like jump labels and ftrace, but the alternatives patching omits
    it entirely leaving secondary cores in a potential limbo between the old
    and the new code.
    
    This patch adds an isb following the secondary polling loop in the
    altenatives patching.
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    04b8637b
alternative.c 3.97 KB