diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2010-04-23 02:56:38 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-12 15:03:17 -0700 |
commit | f32041d369d10bf7bfae39c6b8597fa8463ec304 (patch) | |
tree | 76099ed838897647b289dab92ad212c9dc380207 /arch/mips/sibyte | |
parent | 79d1e78997cd0030d4b449f4b8df46f933c480d7 (diff) | |
download | kernel-crypto-f32041d369d10bf7bfae39c6b8597fa8463ec304.tar.gz kernel-crypto-f32041d369d10bf7bfae39c6b8597fa8463ec304.tar.xz kernel-crypto-f32041d369d10bf7bfae39c6b8597fa8463ec304.zip |
MIPS: Sibyte: Apply M3 workaround only on affected chip types and versions.
(cherry picked from commit e65c7f33d75e977350ca350573d93c517ec02776)
Previously it was unconditionally used on all Sibyte family SOCs. The
M3 bug has to be handled in the TLB exception handler which is extremly
performance sensitive, so this modification is expected to deliver around
2-3% performance improvment. This is important as required changes to the
M3 workaround will make it more costly.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/mips/sibyte')
-rw-r--r-- | arch/mips/sibyte/sb1250/setup.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/mips/sibyte/sb1250/setup.c b/arch/mips/sibyte/sb1250/setup.c index 0444da1e23c..92da3155ce0 100644 --- a/arch/mips/sibyte/sb1250/setup.c +++ b/arch/mips/sibyte/sb1250/setup.c @@ -87,6 +87,21 @@ static int __init setup_bcm1250(void) return ret; } +int sb1250_m3_workaround_needed(void) +{ + switch (soc_type) { + case K_SYS_SOC_TYPE_BCM1250: + case K_SYS_SOC_TYPE_BCM1250_ALT: + case K_SYS_SOC_TYPE_BCM1250_ALT2: + case K_SYS_SOC_TYPE_BCM1125: + case K_SYS_SOC_TYPE_BCM1125H: + return soc_pass < K_SYS_REVISION_BCM1250_C0; + + default: + return 0; + } +} + static int __init setup_bcm112x(void) { int ret = 0; |