• Jeenu Viswambharan's avatar
    Rework bakery lock with WFE/SEV sequence · 82a0aca0
    Jeenu Viswambharan authored
    
    
    Current implementation of Bakery Lock does tight-loop waiting upon lock
    contention.
    
    This commit reworks the implementation to use WFE instruction for
    waiting, and SEV to signal lock availability. It also adds the rationale
    for choosing Bakery Locks instead of exclusion primitives, and more
    comments for the lock algorithm.
    
    Fixes ARM-software/tf-issue#67
    
    Change-Id: Ie351d3dbb27ec8e64dbc9507c84af07bd385a7df
    Co-authored-by: default avatarVikram Kanigiri <vikram.kanigiri@arm.com>
    82a0aca0
bakery_lock.c 6.39 KB