Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F139375000
D20502.id58201.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
934 B
Referenced Files
None
Subscribers
None
D20502.id58201.diff
View Options
Index: sys/compat/linuxkpi/common/src/linux_page.c
===================================================================
--- sys/compat/linuxkpi/common/src/linux_page.c
+++ sys/compat/linuxkpi/common/src/linux_page.c
@@ -91,9 +91,13 @@
if (PMAP_HAS_DMAP) {
unsigned long npages = 1UL << order;
- int req = (flags & M_ZERO) ? (VM_ALLOC_ZERO | VM_ALLOC_NOOBJ |
- VM_ALLOC_NORMAL) : (VM_ALLOC_NOOBJ | VM_ALLOC_NORMAL);
+ int req = VM_ALLOC_NOOBJ | VM_ALLOC_NORMAL;
+#if !defined(LINUXKPI_VERSION) || LINUXKPI_VERSION >= 50001
+ req |= VM_ALLOC_WIRED;
+#endif
+ if ((flags & M_ZERO) != 0)
+ req |= VM_ALLOC_ZERO;
if (order == 0 && (flags & GFP_DMA32) == 0) {
page = vm_page_alloc(NULL, 0, req);
if (page == NULL)
@@ -154,7 +158,8 @@
vm_page_t pgo = page + x;
vm_page_lock(pgo);
- vm_page_free(pgo);
+ if (vm_page_unwire_noq(pgo))
+ vm_page_free(pgo);
vm_page_unlock(pgo);
}
} else {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 12, 10:19 AM (19 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26894096
Default Alt Text
D20502.id58201.diff (934 B)
Attached To
Mode
D20502: Allocate wired pages in linux_alloc_pages().
Attached
Detach File
Event Timeline
Log In to Comment