Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106070327
D8323.id21614.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D8323.id21614.diff
View Options
Index: sys/i386/i386/pmap.c
===================================================================
--- sys/i386/i386/pmap.c
+++ sys/i386/i386/pmap.c
@@ -3466,11 +3466,19 @@
PMAP_LOCK(pmap);
sched_pin();
- /*
- * In the case that a page table page is not
- * resident, we are creating it here.
- */
- if (va < VM_MAXUSER_ADDRESS) {
+ pde = pmap_pde(pmap, va);
+ if ((*pde & PG_PS) != 0) {
+ /* PG_V is asserted by pmap_demote_pde */
+ pmap_demote_pde(pmap, pde, va);
+ if (va < VM_MAXUSER_ADDRESS) {
+ mpte = PHYS_TO_VM_PAGE(*pde & PG_FRAME);
+ mpte->wire_count++;
+ }
+ } else if (va < VM_MAXUSER_ADDRESS) {
+ /*
+ * In the case that a page table page is not resident,
+ * we are creating it here.
+ */
mpte = pmap_allocpte(pmap, va, flags);
if (mpte == NULL) {
KASSERT((flags & PMAP_ENTER_NOSLEEP) != 0,
@@ -3481,10 +3489,6 @@
return (KERN_RESOURCE_SHORTAGE);
}
}
-
- pde = pmap_pde(pmap, va);
- if ((*pde & PG_PS) != 0)
- panic("pmap_enter: attempted pmap_enter on 4MB page");
pte = pmap_pte_quick(pmap, va);
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 25, 9:42 PM (11 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15598840
Default Alt Text
D8323.id21614.diff (1 KB)
Attached To
Mode
D8323: Handle pmap_enter() over an existing 4/2M page on i386.
Attached
Detach File
Event Timeline
Log In to Comment