Page MenuHomeFreeBSD

D56458.diff
No OneTemporary

D56458.diff

diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -739,25 +739,12 @@
addr2 = round_page(addr2);
total = atop(addr2 - addr1);
for (va = addr1; total > 0;) {
- if ((va & PDRMASK) != 0 || total < NPDEPG) {
- cnt = atop(NBPDR - (va & PDRMASK));
- if (cnt > total)
- cnt = total;
- if (cnt > invlpgb_maxcnt + 1)
- cnt = invlpgb_maxcnt + 1;
- invlpgb(INVLPGB_GLOB | INVLPGB_VA | va, 0,
- cnt - 1);
- va += ptoa(cnt);
- total -= cnt;
- } else {
- cnt = total / NPTEPG;
- if (cnt > invlpgb_maxcnt + 1)
- cnt = invlpgb_maxcnt + 1;
- invlpgb(INVLPGB_GLOB | INVLPGB_VA | va, 0,
- INVLPGB_2M_CNT | (cnt - 1));
- va += cnt << PDRSHIFT;
- total -= cnt * NPTEPG;
- }
+ cnt = MIN(total, invlpgb_maxcnt + 1);
+ /* 4K increments because these may not be superpages. */
+ invlpgb(INVLPGB_GLOB | INVLPGB_VA | va, 0,
+ cnt - 1);
+ va += ptoa(cnt);
+ total -= cnt;
}
tlbsync();
sched_unpin();

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 25, 3:14 PM (5 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31931298
Default Alt Text
D56458.diff (1 KB)

Event Timeline