summaryrefslogtreecommitdiff
path: root/.gitignore
diff options
context:
space:
mode:
authorHuacai Chen <chenhuacai@loongson.cn>2024-03-19 10:50:34 +0300
committerHuacai Chen <chenhuacai@loongson.cn>2024-03-19 10:50:34 +0300
commitc87e12e0e8c1241410e758e181ca6bf23efa5b5b (patch)
tree74f5b6d31808d62e6c9dcbe82cf8e67d6c54a56d /.gitignore
parentf48ad26e5e57016b447461f22ecf7c3ed8337353 (diff)
downloadlinux-c87e12e0e8c1241410e758e181ca6bf23efa5b5b.tar.xz
LoongArch: Change __my_cpu_offset definition to avoid mis-optimization
From GCC commit 3f13154553f8546a ("df-scan: remove ad-hoc handling of global regs in asms"), global registers will no longer be forced to add to the def-use chain. Then current_thread_info(), current_stack_pointer and __my_cpu_offset may be lifted out of the loop because they are no longer treated as "volatile variables". This optimization is still correct for the current_thread_info() and current_stack_pointer usages because they are associated to a thread. However it is wrong for __my_cpu_offset because it is associated to a CPU rather than a thread: if the thread migrates to a different CPU in the loop, __my_cpu_offset should be changed. Change __my_cpu_offset definition to treat it as a "volatile variable", in order to avoid such a mis-optimization. Cc: stable@vger.kernel.org Reported-by: Xiaotian Wu <wuxiaotian@loongson.cn> Reported-by: Miao Wang <shankerwangmiao@gmail.com> Signed-off-by: Xing Li <lixing@loongson.cn> Signed-off-by: Hongchen Zhang <zhanghongchen@loongson.cn> Signed-off-by: Rui Wang <wangrui@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions