summaryrefslogtreecommitdiffstats
path: root/arch/xtensa/Makefile
diff options
context:
space:
mode:
authorMax Filippov2017-04-28 18:40:00 +0200
committerMax Filippov2017-12-10 08:55:56 +0100
commit7bf5234db7cce45fa9ff237ce0f45da2bd277cad (patch)
tree2b376172285d3d145e3c5ace2ed2307da276dae9 /arch/xtensa/Makefile
parentLinux 4.14 (diff)
downloadkernel-qcow2-linux-7bf5234db7cce45fa9ff237ce0f45da2bd277cad.tar.gz
kernel-qcow2-linux-7bf5234db7cce45fa9ff237ce0f45da2bd277cad.tar.xz
kernel-qcow2-linux-7bf5234db7cce45fa9ff237ce0f45da2bd277cad.zip
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>
Diffstat (limited to 'arch/xtensa/Makefile')
-rw-r--r--arch/xtensa/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile
index 7ee02fe4a63d..a206598b5d95 100644
--- a/arch/xtensa/Makefile
+++ b/arch/xtensa/Makefile
@@ -46,6 +46,7 @@ KBUILD_CFLAGS += -ffreestanding -D__linux__
KBUILD_CFLAGS += -pipe -mlongcalls
KBUILD_CFLAGS += $(call cc-option,-mforce-no-pic,)
+KBUILD_CFLAGS += $(call cc-option,-mno-serialize-volatile,)
ifneq ($(CONFIG_LD_NO_RELAX),)
LDFLAGS := --no-relax