diff options
author | Paul Burton <paul.burton@imgtec.com> | 2016-08-19 13:18:26 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2016-09-29 12:59:49 -0400 |
commit | 72c70f010dfcc9ea6cc13500602a29e33748452f (patch) | |
tree | c891259ef4181e3ebac3fc2bf7b9a85034cdc9ce | |
parent | 3021773c7c3e75e20b693931a19362681e744ea9 (diff) |
MIPS: Stop setting I6400 FTLBP
The FTLBP field in Config7 for the I6400 is intended as chicken bits for
debugging rather than as a field that software actually makes use of.
For best performance, FTLBP should be left at its default value of 0
with all TLB writes hitting the FTLB by default.
Additionally, since set_ftlb_enable is called from decode_configs before
decode_config4 which determines the size of the TLBs, this was
previously always setting FTLBP=3 for a 3:1 FTLB:VTLB write ratio which
makes abysmal use of the available FTLB resources.
This effectively reverts b0c4e1b79d8a ("MIPS: Set up FTLB probability
for I6400").
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Fixes: b0c4e1b79d8a ("MIPS: Set up FTLB probability for I6400")
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14021/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/include/asm/mipsregs.h | 2 | ||||
-rw-r--r-- | arch/mips/kernel/cpu-probe.c | 9 |
2 files changed, 2 insertions, 9 deletions
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index def9d8d13f6e..7dd2dd47909a 100644 --- a/arch/mips/include/asm/mipsregs.h +++ b/arch/mips/include/asm/mipsregs.h | |||
@@ -660,8 +660,6 @@ | |||
660 | 660 | ||
661 | #define MIPS_CONF7_IAR (_ULCAST_(1) << 10) | 661 | #define MIPS_CONF7_IAR (_ULCAST_(1) << 10) |
662 | #define MIPS_CONF7_AR (_ULCAST_(1) << 16) | 662 | #define MIPS_CONF7_AR (_ULCAST_(1) << 16) |
663 | /* FTLB probability bits for R6 */ | ||
664 | #define MIPS_CONF7_FTLBP_SHIFT (18) | ||
665 | 663 | ||
666 | /* WatchLo* register definitions */ | 664 | /* WatchLo* register definitions */ |
667 | #define MIPS_WATCHLO_IRW (_ULCAST_(0x7) << 0) | 665 | #define MIPS_WATCHLO_IRW (_ULCAST_(0x7) << 0) |
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index a88d44247cc8..ae290506873b 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -555,13 +555,8 @@ static int set_ftlb_enable(struct cpuinfo_mips *c, int enable) | |||
555 | write_c0_config6(config & ~MIPS_CONF6_FTLBEN); | 555 | write_c0_config6(config & ~MIPS_CONF6_FTLBEN); |
556 | break; | 556 | break; |
557 | case CPU_I6400: | 557 | case CPU_I6400: |
558 | /* I6400 & related cores use Config7 to configure FTLB */ | 558 | /* There's no way to disable the FTLB */ |
559 | config = read_c0_config7(); | 559 | return !enable; |
560 | /* Clear the old probability value */ | ||
561 | config &= ~(3 << MIPS_CONF7_FTLBP_SHIFT); | ||
562 | write_c0_config7(config | (calculate_ftlb_probability(c) | ||
563 | << MIPS_CONF7_FTLBP_SHIFT)); | ||
564 | break; | ||
565 | case CPU_LOONGSON3: | 560 | case CPU_LOONGSON3: |
566 | /* Flush ITLB, DTLB, VTLB and FTLB */ | 561 | /* Flush ITLB, DTLB, VTLB and FTLB */ |
567 | write_c0_diag(LOONGSON_DIAG_ITLB | LOONGSON_DIAG_DTLB | | 562 | write_c0_diag(LOONGSON_DIAG_ITLB | LOONGSON_DIAG_DTLB | |