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

MIPS: tlb-r3k: Optimise a TLBWI barrier in TLB invalidation

Replace an explicit barrier with a useful processor instruction in TLB
invalidation, following several other such cases elsewhere in
`tlb-r3k.c'.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10196/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Maciej W. Rozycki and committed by
Ralf Baechle
9a20b092 3bcb03f3

+2 -2
+2 -2
arch/mips/mm/tlb-r3k.c
··· 45 45 46 46 old_ctx = read_c0_entryhi() & ASID_MASK; 47 47 write_c0_entrylo0(0); 48 - for (; entry < current_cpu_data.tlbsize; entry++) { 48 + while (entry < current_cpu_data.tlbsize) { 49 49 write_c0_index(entry << 8); 50 50 write_c0_entryhi((entry | 0x80000) << 12); 51 - BARRIER; 51 + entry++; /* BARRIER */ 52 52 tlb_write_indexed(); 53 53 } 54 54 write_c0_entryhi(old_ctx);