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:57:06 +0000 (18:57 +0200)
commit3ed14a8d2fe73f2511280cc592f35f43db7a6dcc
tree5d8fff7831c694d4288855517362f4d4cd9e16e4
parent5b400fed74dfb093d7a6aafd52d83f4eb071a776
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