Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: mm: tlbex: Use cpu_has_mips_r2_exec_hazard for the EHB instruction

MIPS uses the cpu_has_mips_r2_exec_hazard macro to determine whether the
EHB instruction is available or not. This is necessary for MIPS R6
which also supports the EHB instruction.

Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>

authored by

Leonid Yegoshin and committed by
Markos Chandras
77f3ee59 d2e6d30a

+3 -3
+3 -3
arch/mips/mm/tlbex.c
··· 501 501 case tlb_indexed: tlbw = uasm_i_tlbwi; break; 502 502 } 503 503 504 - if (cpu_has_mips_r2) { 504 + if (cpu_has_mips_r2_exec_hazard) { 505 505 /* 506 506 * The architecture spec says an ehb is required here, 507 507 * but a number of cores do not have the hazard and ··· 1953 1953 1954 1954 switch (current_cpu_type()) { 1955 1955 default: 1956 - if (cpu_has_mips_r2) { 1956 + if (cpu_has_mips_r2_exec_hazard) { 1957 1957 uasm_i_ehb(&p); 1958 1958 1959 1959 case CPU_CAVIUM_OCTEON: ··· 2020 2020 2021 2021 switch (current_cpu_type()) { 2022 2022 default: 2023 - if (cpu_has_mips_r2) { 2023 + if (cpu_has_mips_r2_exec_hazard) { 2024 2024 uasm_i_ehb(&p); 2025 2025 2026 2026 case CPU_CAVIUM_OCTEON: