• D
    arm64/sve: Write ZCR_EL1 on context switch only if changed · 159fd7b8
    Dave Martin 提交于
    Writes to ZCR_EL1 are self-synchronising, and so may be expensive
    in typical implementations.
    
    This patch adopts the approach used for costly system register
    writes elsewhere in the kernel: the system register write is
    suppressed if it would not change the stored value.
    
    Since the common case will be that of switching between tasks that
    use the same vector length as one another, prediction hit rates on
    the conditional branch should be reasonably good, with lower
    expected amortised cost than the unconditional execution of a
    heavyweight self-synchronising instruction.
    Signed-off-by: NDave Martin <Dave.Martin@arm.com>
    Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
    159fd7b8
fpsimdmacros.h 5.7 KB