Skip to content

Commit 13e6b81

Browse files
committed
MIPS: mm: Remove special handling for OCTEON CPUs
Macro cpu_has_mips_r2_exec_hazard correctly handles OCTEON CPUs, so we don't need the extra switch cases for them. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent 5cad832 commit 13e6b81

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

arch/mips/mm/tlbex.c

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2123,16 +2123,8 @@ static void build_r4000_tlb_load_handler(void)
21232123

21242124
uasm_i_tlbr(&p);
21252125

2126-
switch (current_cpu_type()) {
2127-
case CPU_CAVIUM_OCTEON:
2128-
case CPU_CAVIUM_OCTEON_PLUS:
2129-
case CPU_CAVIUM_OCTEON2:
2130-
break;
2131-
default:
2132-
if (cpu_has_mips_r2_exec_hazard)
2133-
uasm_i_ehb(&p);
2134-
break;
2135-
}
2126+
if (cpu_has_mips_r2_exec_hazard)
2127+
uasm_i_ehb(&p);
21362128

21372129
/* Examine entrylo 0 or 1 based on ptr. */
21382130
if (use_bbit_insns()) {
@@ -2197,16 +2189,8 @@ static void build_r4000_tlb_load_handler(void)
21972189

21982190
uasm_i_tlbr(&p);
21992191

2200-
switch (current_cpu_type()) {
2201-
case CPU_CAVIUM_OCTEON:
2202-
case CPU_CAVIUM_OCTEON_PLUS:
2203-
case CPU_CAVIUM_OCTEON2:
2204-
break;
2205-
default:
2206-
if (cpu_has_mips_r2_exec_hazard)
2207-
uasm_i_ehb(&p);
2208-
break;
2209-
}
2192+
if (cpu_has_mips_r2_exec_hazard)
2193+
uasm_i_ehb(&p);
22102194

22112195
/* Examine entrylo 0 or 1 based on ptr. */
22122196
if (use_bbit_insns()) {

0 commit comments

Comments
 (0)