Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 974a0b6a authored by Paul Burton's avatar Paul Burton Committed by Ralf Baechle
Browse files

MIPS: tlbex: Remove some RIXI redundancy



The cpu_has_rixi cases in build_update_entries are now identical to the
non-RIXI cases with the one exception of the r45k_bvahwbug case which is
hardcoded as never happening anyway & presumably was either missed from
the RIXI path or would never happen on a CPU with RIXI support. Remove
the redundant checks & duplication.

Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: linux-kernel@vger.kernel.org
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/11215/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent dbfd657a
Loading
Loading
Loading
Loading
+10 −24
Original line number Diff line number Diff line
@@ -1009,15 +1009,9 @@ static void build_update_entries(u32 **p, unsigned int tmp, unsigned int ptep)
	if (cpu_has_64bits) {
		uasm_i_ld(p, tmp, 0, ptep); /* get even pte */
		uasm_i_ld(p, ptep, sizeof(pte_t), ptep); /* get odd pte */
		if (cpu_has_rixi) {
		build_convert_pte_to_entrylo(p, tmp);
		UASM_i_MTC0(p, tmp, C0_ENTRYLO0); /* load it */
		build_convert_pte_to_entrylo(p, ptep);
		} else {
			build_convert_pte_to_entrylo(p, tmp);
			UASM_i_MTC0(p, tmp, C0_ENTRYLO0); /* load it */
			build_convert_pte_to_entrylo(p, ptep);
		}
		UASM_i_MTC0(p, ptep, C0_ENTRYLO1); /* load it */
	} else {
		int pte_off_even = sizeof(pte_t) / 2;
@@ -1049,13 +1043,6 @@ static void build_update_entries(u32 **p, unsigned int tmp, unsigned int ptep)
	UASM_i_LW(p, ptep, sizeof(pte_t), ptep); /* get odd pte */
	if (r45k_bvahwbug())
		build_tlb_probe_entry(p);
	if (cpu_has_rixi) {
		build_convert_pte_to_entrylo(p, tmp);
		if (r4k_250MHZhwbug())
			UASM_i_MTC0(p, 0, C0_ENTRYLO0);
		UASM_i_MTC0(p, tmp, C0_ENTRYLO0); /* load it */
		build_convert_pte_to_entrylo(p, ptep);
	} else {
	build_convert_pte_to_entrylo(p, tmp);
	if (r4k_250MHZhwbug())
		UASM_i_MTC0(p, 0, C0_ENTRYLO0);
@@ -1063,7 +1050,6 @@ static void build_update_entries(u32 **p, unsigned int tmp, unsigned int ptep)
	build_convert_pte_to_entrylo(p, ptep);
	if (r45k_bvahwbug())
		uasm_i_mfc0(p, tmp, C0_INDEX);
	}
	if (r4k_250MHZhwbug())
		UASM_i_MTC0(p, 0, C0_ENTRYLO1);
	UASM_i_MTC0(p, ptep, C0_ENTRYLO1); /* load it */