• W
    arm64: preempt: Fix big-endian when checking preempt count in assembly · 7faa313f
    Will Deacon 提交于
    Commit 39624469 ("arm64: preempt: Provide our own implementation of
    asm/preempt.h") extended the preempt count field in struct thread_info
    to 64 bits, so that it consists of a 32-bit count plus a 32-bit flag
    indicating whether or not the current task needs rescheduling.
    
    Whilst the asm-offsets definition of TSK_TI_PREEMPT was updated to point
    to this new field, the assembly usage was left untouched meaning that a
    32-bit load from TSK_TI_PREEMPT on a big-endian machine actually returns
    the reschedule flag instead of the count.
    
    Whilst we could fix this by pointing TSK_TI_PREEMPT at the count field,
    we're actually better off reworking the two assembly users so that they
    operate on the whole 64-bit value in favour of inspecting the thread
    flags separately in order to determine whether a reschedule is needed.
    Acked-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
    Reported-by: N"kernelci.org bot" <bot@kernelci.org>
    Tested-by: NKevin Hilman <khilman@baylibre.com>
    Signed-off-by: NWill Deacon <will.deacon@arm.com>
    7faa313f
assembler.h 17.3 KB