Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157900000
D18718.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1002 B
Referenced Files
None
Subscribers
None
D18718.diff
View Options
Index: head/sys/riscv/riscv/pmap.c
===================================================================
--- head/sys/riscv/riscv/pmap.c
+++ head/sys/riscv/riscv/pmap.c
@@ -2365,19 +2365,14 @@
*/
pmap_resident_count_inc(pmap, 1);
- pa = VM_PAGE_TO_PHYS(m);
- pn = (pa / PAGE_SIZE);
-
- entry = PTE_V | PTE_R;
- if (prot & VM_PROT_EXECUTE)
- entry |= PTE_X;
- entry |= (pn << PTE_PPN0_S);
-
- /*
- * Now validate mapping with RO protection
- */
+ newl3 = ((VM_PAGE_TO_PHYS(m) / PAGE_SIZE) << PTE_PPN0_S) |
+ PTE_V | PTE_R;
+ if ((prot & VM_PROT_EXECUTE) != 0)
+ newl3 |= PTE_X;
if ((m->oflags & VPO_UNMANAGED) == 0)
- entry |= PTE_SW_MANAGED;
+ newl3 |= PTE_SW_MANAGED;
+ if (va < VM_MAX_USER_ADDRESS)
+ newl3 |= PTE_U;
/*
* Sync the i-cache on all harts before updating the PTE
@@ -2386,7 +2381,7 @@
if (prot & VM_PROT_EXECUTE)
pmap_sync_icache(pmap, va, PAGE_SIZE);
- pmap_store(l3, entry);
+ pmap_store(l3, newl3);
pmap_invalidate_page(pmap, va);
return (mpte);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, May 27, 7:40 AM (15 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33550214
Default Alt Text
D18718.diff (1002 B)
Attached To
Mode
D18718: Set PTE_U in pmap_enter_quick_locked().
Attached
Detach File
Event Timeline
Log In to Comment