Skip to content

Commit 7bf5234

Browse files
committed
xtensa: add -mno-serialize-volatile to CFLAGS
By default xtensa gcc inserts memw for all volatile object accesses. This is too pessimistic for the kernel: there should be no "normal" volatile objects, and all special objects, like MMIO or objects shared between CPUs should have explicit barriers. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
1 parent bebc608 commit 7bf5234

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎arch/xtensa/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ KBUILD_CFLAGS += -ffreestanding -D__linux__
4646
KBUILD_CFLAGS += -pipe -mlongcalls
4747

4848
KBUILD_CFLAGS += $(call cc-option,-mforce-no-pic,)
49+
KBUILD_CFLAGS += $(call cc-option,-mno-serialize-volatile,)
4950

5051
ifneq ($(CONFIG_LD_NO_RELAX),)
5152
LDFLAGS := --no-relax

0 commit comments

Comments
 (0)