[PATCH] arch/Kconfig: JUMP_LABEL should depend on !XIP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There's no point in trying to optimize the code when the code is
executed from a read-only medium (e. g. NOR flash) as in the XIP
case. Moreover, trying to do so in a XIP kernel may result in
faults and kernel crashes so let's explicitly disallow JUMP_LABEL
if XIP_KERNEL configuration option is set.

Signed-off-by: Vitaly Wool <vitaly.wool@xxxxxxxxxxxx>
---
 arch/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/Kconfig b/arch/Kconfig
index 56b6ccc0e32d..88632c9588ae 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -81,6 +81,7 @@ config JUMP_LABEL
 	bool "Optimize very unlikely/likely branches"
 	depends on HAVE_ARCH_JUMP_LABEL
 	depends on CC_HAS_ASM_GOTO
+	depends on !XIP_KERNEL
 	help
 	 This option enables a transparent branch optimization that
 	 makes certain almost-always-true or almost-always-false branch
-- 
2.29.2





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux