Commit 923ddb84 authored by Hongchen Zhang's avatar Hongchen Zhang
Browse files

LoongArch: Change definition of cpu_relax() for Loongson-3

LoongArch inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I6BWFP



--------------------------------

This patch changes the definition of cpu_relax() to smp_mb() for
Loongson-3, forcing a flush of the SFB on SMP systems which will cause
any pending writes to make it as far as the L1 caches where they will
become visible to other CPUs. If the kernel is not compiled for SMP
support, this will expand to a barrier() as before.

Reference
commit a3071886 ("MIPS: Change definition of cpu_relax() for Loongson-3")
for detail.

Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
Signed-off-by: default avatarHongchen Zhang <zhanghongchen@loongson.cn>
Change-Id: I1ad7efc19b77ead5932ff8429819db0856fb8e33
parent 80764bc7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment