MIPS: Ingenic: Disable broken BTB lookup optimization.
authorZhou Yanjie <zhouyanjie@zoho.com>
Fri, 2 Aug 2019 08:27:37 +0000 (16:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Oct 2019 16:59:24 +0000 (18:59 +0200)
commitcac61f5b7d9539149105dace7dc52e3ea9dcf6f5
tree07d16bc52dfdc02dc7ad247d79c1a92c2bdcf70c
parentb67fd3bfeec52d0ee5c057b139814ac28a340f76
MIPS: Ingenic: Disable broken BTB lookup optimization.

[ Upstream commit 053951dda71ecb4b554a2cdbe26f5f6f9bee9dd2 ]

In order to further reduce power consumption, the XBurst core
by default attempts to avoid branch target buffer lookups by
detecting & special casing loops. This feature will cause
BogoMIPS and lpj calculate in error. Set cp0 config7 bit 4 to
disable this feature.

Signed-off-by: Zhou Yanjie <zhouyanjie@zoho.com>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: ralf@linux-mips.org
Cc: paul@crapouillou.net
Cc: jhogan@kernel.org
Cc: malat@debian.org
Cc: gregkh@linuxfoundation.org
Cc: tglx@linutronix.de
Cc: allison@lohutok.net
Cc: syq@debian.org
Cc: chenhc@lemote.com
Cc: jiaxun.yang@flygoat.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/mips/include/asm/mipsregs.h
arch/mips/kernel/cpu-probe.c