Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115363689
D40028.id121767.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
D40028.id121767.diff
View Options
diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c
--- a/sys/compat/linuxkpi/common/src/linux_page.c
+++ b/sys/compat/linuxkpi/common/src/linux_page.c
@@ -147,6 +147,14 @@
return (page);
}
+static void
+_linux_free_kmem(vm_offset_t addr, unsigned int order)
+{
+ size_t size = ((size_t)PAGE_SIZE) << order;
+
+ kmem_free((void *)addr, size);
+}
+
void
linux_free_pages(vm_page_t page, unsigned int order)
{
@@ -165,7 +173,7 @@
vaddr = (vm_offset_t)page_address(page);
- linux_free_kmem(vaddr, order);
+ _linux_free_kmem(vaddr, order);
}
}
@@ -187,9 +195,15 @@
void
linux_free_kmem(vm_offset_t addr, unsigned int order)
{
- size_t size = ((size_t)PAGE_SIZE) << order;
+ if (PMAP_HAS_DMAP &&
+ addr >= DMAP_MIN_ADDRESS && addr < DMAP_MAX_ADDRESS) {
+ vm_page_t page;
- kmem_free((void *)addr, size);
+ page = PHYS_TO_VM_PAGE(DMAP_TO_PHYS(addr));
+ linux_free_pages(page, order);
+ } else {
+ _linux_free_kmem(addr, order);
+ }
}
static int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 24, 12:55 AM (7 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17745385
Default Alt Text
D40028.id121767.diff (1 KB)
Attached To
Mode
D40028: linuxkpi: Handle direct-mapped addresses in linux_free_kmem()
Attached
Detach File
Event Timeline
Log In to Comment