From: Michal Simek <monstr@monstr.eu>
Date: Mon, 26 Oct 2009 08:56:48 +0000 (+0100)
Subject: microblaze: Enable asm optimization only for HW with barrel-shifter
X-Git-Tag: firefly_0821_release~9833^2~3863^2~21
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=27d2a3ee5e9874e400b59d802405b58b65a8a723;p=firefly-linux-kernel-4.4.55.git

microblaze: Enable asm optimization only for HW with barrel-shifter

Asm code uses barrel-shifter instruction that's why we have
to protect cases when HW don't have it.

Reported-by: John Linn <john.linn@xilinx.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
---

diff --git a/arch/microblaze/platform/Kconfig.platform b/arch/microblaze/platform/Kconfig.platform
index 28e418a3c0b4..669c7eec293e 100644
--- a/arch/microblaze/platform/Kconfig.platform
+++ b/arch/microblaze/platform/Kconfig.platform
@@ -53,7 +53,7 @@ config OPT_LIB_FUNCTION
 
 config OPT_LIB_ASM
 	bool "Optimalized lib function ASM"
-	depends on OPT_LIB_FUNCTION
+	depends on OPT_LIB_FUNCTION && (XILINX_MICROBLAZE0_USE_BARREL = 1)
 	default n
 	help
 	  Allows turn on optimalized library function (memcpy and memmove).