diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-03-24 17:12:53 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-03-24 17:12:53 +0000 |
commit | eccc22e21253b7e92b62e976e633700de041bef2 (patch) | |
tree | 558a00d5a561d63360a7c6bf794ebe9f2be8c43b /sys | |
parent | 00847f98d4dd2f6088dc25ef72369a7db6a5235e (diff) |
Only need to call tlb_probe() once per pair, instead of once per page.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/mips64/mips64/r4000_errata.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/mips64/mips64/r4000_errata.c b/sys/arch/mips64/mips64/r4000_errata.c index c246c1731ac..969934a4af8 100644 --- a/sys/arch/mips64/mips64/r4000_errata.c +++ b/sys/arch/mips64/mips64/r4000_errata.c @@ -1,4 +1,4 @@ -/* $OpenBSD: r4000_errata.c,v 1.1 2014/03/22 00:01:04 miod Exp $ */ +/* $OpenBSD: r4000_errata.c,v 1.2 2014/03/24 17:12:52 miod Exp $ */ /* * Copyright (c) 2014 Miodrag Vallat. @@ -187,8 +187,8 @@ eop_tlb_miss_handler(struct trap_frame *trapframe, struct cpu_info *ci, * Clear possible TLB entries for the pages we're about to wire. */ - for (i = npairs * 2, va = faultva & PG_HVPN; i != 0; - i--, va += PAGE_SIZE) { + for (i = npairs, va = faultva & PG_HVPN; i != 0; + i--, va += 2 * PAGE_SIZE) { tlbidx = tlb_probe(va | asid); if (tlbidx >= 0) tlb_update_indexed(CKSEG0_BASE, PG_NV, PG_NV, tlbidx); |