diff mbox series

[RFC,12/13] ARC: build: inhibit ZOL generation by compiler

Message ID 20220222141506.4003433-13-geomatsi@gmail.com
State New
Headers show
Series ARC: handle the lack of ZOL support | expand

Commit Message

Sergey Matyukevich Feb. 22, 2022, 2:15 p.m. UTC
From: Vineet Gupta <vgupta@kernel.org>

Inhibit ZOL generation by compiler if configuration states
the lack of it. This is done before we remove the ZOL regs
save/restore in entry code

Signed-off-by: Vineet Gupta <vgupta@kernel.org>
---
 arch/arc/Makefile | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index ec0f672bcee6..98a03c8d719c 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -44,6 +44,8 @@  cflags-y				+= -Wa,-I$(srctree)/arch/arc/include
 cflags-$(CONFIG_ARC_HAS_LLSC)		+= -mlock
 cflags-$(CONFIG_ARC_HAS_SWAPE)		+= -mswape
 
+cflags-$(CONFIG_ARC_LACKS_ZOL)		+= -fno-branch-count-reg
+
 ifdef CONFIG_ISA_ARCV2
 
 ifdef CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS