On 11/08/2016 17:24, Alex Bennée wrote:
> -        if (atomic_bool_cmpxchg(&cpu->pending_tlb_flush, false, true)) {
> +        if (atomic_mb_read(&cpu->pending_tlb_flush) != ALL_MMUIDX_BITS) {
> +            atomic_mb_set(&cpu->pending_tlb_flush, ALL_MMUIDX_BITS);

This can use atomic_xchg as well.  atomic_bool_cmpxchg seems unnecessary
then.  (Not that I have anything against it, but there are no users yet :)).

Paolo

Reply via email to