aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2014-06-28 18:28:08 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-07-30 09:50:52 -0400
commitbf4aac07b5cc21517bde0bf132cba5e72955513c (patch)
tree687bf4e34645b5cbc4d5e75b01c0f3b6e8092d20
parentb37f0f691e69b0325b6f448679e0e338dbd076e2 (diff)
MIPS: c-r4k: Avoid duplicate CPU_74K/CPU_1074K checks
Code in a switch statement in probe_pcache checks the CPU type twice unnecessarily for processor implementations that have the alias removal feature reported by the CP0 Config7.AR and Config7.IAR bits. This change rewrites the affected fragment avoiding the extraneous check and improving readability. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Cc: Steven J. Hill <Steven.Hill@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/7221/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/mm/c-r4k.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
index f2e8302fa70f..fbcd8674ff1d 100644
--- a/arch/mips/mm/c-r4k.c
+++ b/arch/mips/mm/c-r4k.c
@@ -1230,19 +1230,19 @@ static void probe_pcache(void)
1230 case CPU_R14000: 1230 case CPU_R14000:
1231 break; 1231 break;
1232 1232
1233 case CPU_74K:
1234 case CPU_1074K:
1235 alias_74k_erratum(c);
1236 /* Fall through. */
1233 case CPU_M14KC: 1237 case CPU_M14KC:
1234 case CPU_M14KEC: 1238 case CPU_M14KEC:
1235 case CPU_24K: 1239 case CPU_24K:
1236 case CPU_34K: 1240 case CPU_34K:
1237 case CPU_74K:
1238 case CPU_1004K: 1241 case CPU_1004K:
1239 case CPU_1074K:
1240 case CPU_INTERAPTIV: 1242 case CPU_INTERAPTIV:
1241 case CPU_P5600: 1243 case CPU_P5600:
1242 case CPU_PROAPTIV: 1244 case CPU_PROAPTIV:
1243 case CPU_M5150: 1245 case CPU_M5150:
1244 if ((c->cputype == CPU_74K) || (c->cputype == CPU_1074K))
1245 alias_74k_erratum(c);
1246 if (!(read_c0_config7() & MIPS_CONF7_IAR) && 1246 if (!(read_c0_config7() & MIPS_CONF7_IAR) &&
1247 (c->icache.waysize > PAGE_SIZE)) 1247 (c->icache.waysize > PAGE_SIZE))
1248 c->icache.flags |= MIPS_CACHE_ALIASES; 1248 c->icache.flags |= MIPS_CACHE_ALIASES;