Messages in this thread | | | From | WANG Rui <> | Date | Wed, 2 Aug 2023 00:36:54 +0800 | Subject | Re: [PATCH] LoongArch: Fixup cmpxchg sematic for memory barrier |
| |
On Tue, Aug 1, 2023 at 6:50 PM Guo Ren <guoren@kernel.org> wrote: > > On Tue, Aug 1, 2023 at 5:32 PM WANG Rui <wangrui@loongson.cn> wrote: > > No. LL and LL won't reorder because LL implies a memory barrier(though > > not acquire semantics). > That means we could remove __WEAK_LLSC_MB totally, right?
More precisely, __WEAK_LLSC_MB is intended to prevent reordering between LL and normal LD used to fetch the expected value for cmpxchg.
Regards, -- WANG Rui
| |