aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2016-09-12 05:58:06 -0400
committerRalf Baechle <ralf@linux-mips.org>2016-09-13 08:14:50 -0400
commitb03c1e3b8eed9026733c473071d1f528358a0e50 (patch)
tree59fcc091f9f7a7abae6a466097f9b09c35aa2f5c
parentac7e385f2bf1c39615cf58f7e58246fdd9da5bb9 (diff)
MIPS: Remove compact branch policy Kconfig entries
Commit c1a0e9bc885d ("MIPS: Allow compact branch policy to be changed") added Kconfig entries allowing for the compact branch policy used by the compiler for MIPSr6 kernels to be specified. This can be useful for debugging, particularly in systems where compact branches have recently been introduced. Unfortunately mainline gcc 5.x supports MIPSr6 but not the -mcompact-branches compiler flag, leading to MIPSr6 kernels failing to build with gcc 5.x with errors such as: mipsel-linux-gnu-gcc: error: unrecognized command line option '-mcompact-branches=optimal' make[2]: *** [kernel/bounds.s] Error 1 Fixing this by hiding the Kconfig entry behind another seems to be more hassle than it's worth, as MIPSr6 & compact branches have been around for a while now and if policy does need to be set for debug it can be done easily enough with KCFLAGS. Therefore remove the compact branch policy Kconfig entries & their handling in the Makefile. This reverts commit c1a0e9bc885d ("MIPS: Allow compact branch policy to be changed"). Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reported-by: kbuild test robot <fengguang.wu@intel.com> Fixes: c1a0e9bc885d ("MIPS: Allow compact branch policy to be changed") Cc: stable <stable@vger.kernel.org> # v4.4+ Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14241/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/Kconfig.debug36
-rw-r--r--arch/mips/Makefile4
2 files changed, 0 insertions, 40 deletions
diff --git a/arch/mips/Kconfig.debug b/arch/mips/Kconfig.debug
index f0e314ceb8ba..7f975b20b20c 100644
--- a/arch/mips/Kconfig.debug
+++ b/arch/mips/Kconfig.debug
@@ -113,42 +113,6 @@ config SPINLOCK_TEST
113 help 113 help
114 Add several files to the debugfs to test spinlock speed. 114 Add several files to the debugfs to test spinlock speed.
115 115
116if CPU_MIPSR6
117
118choice
119 prompt "Compact branch policy"
120 default MIPS_COMPACT_BRANCHES_OPTIMAL
121
122config MIPS_COMPACT_BRANCHES_NEVER
123 bool "Never (force delay slot branches)"
124 help
125 Pass the -mcompact-branches=never flag to the compiler in order to
126 force it to always emit branches with delay slots, and make no use
127 of the compact branch instructions introduced by MIPSr6. This is
128 useful if you suspect there may be an issue with compact branches in
129 either the compiler or the CPU.
130
131config MIPS_COMPACT_BRANCHES_OPTIMAL
132 bool "Optimal (use where beneficial)"
133 help
134 Pass the -mcompact-branches=optimal flag to the compiler in order for
135 it to make use of compact branch instructions where it deems them
136 beneficial, and use branches with delay slots elsewhere. This is the
137 default compiler behaviour, and should be used unless you have a
138 reason to choose otherwise.
139
140config MIPS_COMPACT_BRANCHES_ALWAYS
141 bool "Always (force compact branches)"
142 help
143 Pass the -mcompact-branches=always flag to the compiler in order to
144 force it to always emit compact branches, making no use of branch
145 instructions with delay slots. This can result in more compact code
146 which may be beneficial in some scenarios.
147
148endchoice
149
150endif # CPU_MIPSR6
151
152config SCACHE_DEBUGFS 116config SCACHE_DEBUGFS
153 bool "L2 cache debugfs entries" 117 bool "L2 cache debugfs entries"
154 depends on DEBUG_FS 118 depends on DEBUG_FS
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index efd7a9dc93c4..598ab2930fce 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -203,10 +203,6 @@ endif
203toolchain-virt := $(call cc-option-yn,$(mips-cflags) -mvirt) 203toolchain-virt := $(call cc-option-yn,$(mips-cflags) -mvirt)
204cflags-$(toolchain-virt) += -DTOOLCHAIN_SUPPORTS_VIRT 204cflags-$(toolchain-virt) += -DTOOLCHAIN_SUPPORTS_VIRT
205 205
206cflags-$(CONFIG_MIPS_COMPACT_BRANCHES_NEVER) += -mcompact-branches=never
207cflags-$(CONFIG_MIPS_COMPACT_BRANCHES_OPTIMAL) += -mcompact-branches=optimal
208cflags-$(CONFIG_MIPS_COMPACT_BRANCHES_ALWAYS) += -mcompact-branches=always
209
210# 206#
211# Firmware support 207# Firmware support
212# 208#