Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153075808
D26463.id77139.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D26463.id77139.diff
View Options
Index: sys/amd64/amd64/pmap.c
===================================================================
--- sys/amd64/amd64/pmap.c
+++ sys/amd64/amd64/pmap.c
@@ -5935,19 +5935,17 @@
continue;
}
- pdpe = pmap_pml4e_to_pdpe(pml4e, sva);
va_next = (sva + NBPDP) & ~PDPMASK;
- if ((*pdpe & PG_V) == 0) {
- if (va_next < sva)
- va_next = eva;
+ if (va_next < sva)
+ va_next = eva;
+ pdpe = pmap_pml4e_to_pdpe(pml4e, sva);
+ if ((*pdpe & PG_V) == 0)
continue;
- }
-
- KASSERT((*pdpe & PG_PS) == 0 || va_next <= eva,
- ("pmap_remove of non-transient 1G page "
- "pdpe %#lx sva %#lx eva %#lx va_next %#lx",
- *pdpe, sva, eva, va_next));
if ((*pdpe & PG_PS) != 0) {
+ KASSERT(va_next <= eva,
+ ("pmap_remove of non-transparent 1G page "
+ "pdpe %#lx sva %#lx eva %#lx va_next %#lx",
+ *pdpe, sva, eva, va_next));
MPASS(pmap != kernel_pmap); /* XXXKIB */
MPASS((*pdpe & (PG_MANAGED | PG_G)) == 0);
anyvalid = 1;
@@ -6228,19 +6226,17 @@
continue;
}
- pdpe = pmap_pml4e_to_pdpe(pml4e, sva);
va_next = (sva + NBPDP) & ~PDPMASK;
- if ((*pdpe & PG_V) == 0) {
- if (va_next < sva)
- va_next = eva;
+ if (va_next < sva)
+ va_next = eva;
+ pdpe = pmap_pml4e_to_pdpe(pml4e, sva);
+ if ((*pdpe & PG_V) == 0)
continue;
- }
-
- KASSERT((*pdpe & PG_PS) == 0 || va_next <= eva,
- ("pmap_remove of non-transient 1G page "
- "pdpe %#lx sva %#lx eva %#lx va_next %#lx",
- *pdpe, sva, eva, va_next));
if ((*pdpe & PG_PS) != 0) {
+ KASSERT(va_next <= eva,
+ ("pmap_remove of non-transparent 1G page "
+ "pdpe %#lx sva %#lx eva %#lx va_next %#lx",
+ *pdpe, sva, eva, va_next));
retry_pdpe:
obits = pbits = *pdpe;
MPASS((pbits & (PG_MANAGED | PG_G)) == 0);
@@ -7373,17 +7369,18 @@
va_next = eva;
continue;
}
- pdpe = pmap_pml4e_to_pdpe(pml4e, sva);
+
va_next = (sva + NBPDP) & ~PDPMASK;
if (va_next < sva)
va_next = eva;
+ pdpe = pmap_pml4e_to_pdpe(pml4e, sva);
if ((*pdpe & PG_V) == 0)
continue;
- KASSERT((*pdpe & PG_PS) == 0 || va_next <= eva,
- ("pmap_unwire of non-transient 1G page "
- "pdpe %#lx sva %#lx eva %#lx va_next %#lx",
- *pdpe, sva, eva, va_next));
if ((*pdpe & PG_PS) != 0) {
+ KASSERT(va_next <= eva,
+ ("pmap_unwire of non-transparent 1G page "
+ "pdpe %#lx sva %#lx eva %#lx va_next %#lx",
+ *pdpe, sva, eva, va_next));
MPASS(pmap != kernel_pmap); /* XXXKIB */
MPASS((*pdpe & (PG_MANAGED | PG_G)) == 0);
atomic_clear_long(pdpe, PG_W);
@@ -7498,21 +7495,21 @@
continue;
}
+ va_next = (addr + NBPDP) & ~PDPMASK;
+ if (va_next < addr)
+ va_next = end_addr;
pdpe = pmap_pml4e_to_pdpe(pml4e, addr);
- if ((*pdpe & PG_V) == 0) {
- va_next = (addr + NBPDP) & ~PDPMASK;
- if (va_next < addr)
- va_next = end_addr;
+ if ((*pdpe & PG_V) == 0)
+ continue;
+ if ((*pdpe & PG_PS) != 0) {
+ KASSERT(va_next <= end_addr,
+ ("pmap_copy of partial non-transparent 1G page "
+ "pdpe %#lx sva %#lx eva %#lx va_next %#lx",
+ *pdpe, addr, end_addr, va_next));
continue;
}
va_next = (addr + NBPDR) & ~PDRMASK;
- KASSERT((*pdpe & PG_PS) == 0 || va_next <= end_addr,
- ("pmap_copy of partial non-transient 1G page "
- "pdpe %#lx sva %#lx eva %#lx va_next %#lx",
- *pdpe, addr, end_addr, va_next));
- if ((*pdpe & PG_PS) != 0)
- continue;
if (va_next < addr)
va_next = end_addr;
@@ -8559,22 +8556,24 @@
va_next = eva;
continue;
}
+
+ va_next = (sva + NBPDP) & ~PDPMASK;
+ if (va_next < sva)
+ va_next = eva;
pdpe = pmap_pml4e_to_pdpe(pml4e, sva);
- if ((*pdpe & PG_V) == 0) {
- va_next = (sva + NBPDP) & ~PDPMASK;
- if (va_next < sva)
- va_next = eva;
+ if ((*pdpe & PG_V) == 0)
+ continue;
+ if ((*pdpe & PG_PS) != 0) {
+ KASSERT(va_next <= eva,
+ ("pmap_advise of non-transparent 1G page "
+ "pdpe %#lx sva %#lx eva %#lx va_next %#lx",
+ *pdpe, sva, eva, va_next));
continue;
}
+
va_next = (sva + NBPDR) & ~PDRMASK;
if (va_next < sva)
va_next = eva;
- KASSERT((*pdpe & PG_PS) == 0 || va_next <= eva,
- ("pmap_advise of non-transient 1G page "
- "pdpe %#lx sva %#lx eva %#lx va_next %#lx",
- *pdpe, sva, eva, va_next));
- if ((*pdpe & PG_PS) != 0)
- continue;
pde = pmap_pdpe_to_pde(pdpe, sva);
oldpde = *pde;
if ((oldpde & PG_V) == 0)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 19, 11:46 PM (1 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31808815
Default Alt Text
D26463.id77139.diff (4 KB)
Attached To
Mode
D26463: Fix some nits in 1G page handling.
Attached
Detach File
Event Timeline
Log In to Comment