Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108557664
D45057.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
D45057.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/asm/set_memory.h b/sys/compat/linuxkpi/common/include/asm/set_memory.h
--- a/sys/compat/linuxkpi/common/include/asm/set_memory.h
+++ b/sys/compat/linuxkpi/common/include/asm/set_memory.h
@@ -34,26 +34,20 @@
static inline int
set_memory_uc(unsigned long addr, int numpages)
{
- vm_offset_t va;
vm_size_t len;
- va = PHYS_TO_DMAP(addr);
- len = numpages << PAGE_SHIFT;
-
- return (-pmap_change_attr(va, len, VM_MEMATTR_UNCACHEABLE));
+ len = (vm_size_t)numpages << PAGE_SHIFT;
+ return (-pmap_change_attr(addr, len, VM_MEMATTR_UNCACHEABLE));
}
static inline int
set_memory_wc(unsigned long addr, int numpages)
{
#ifdef VM_MEMATTR_WRITE_COMBINING
- vm_offset_t va;
vm_size_t len;
- va = PHYS_TO_DMAP(addr);
- len = numpages << PAGE_SHIFT;
-
- return (-pmap_change_attr(va, len, VM_MEMATTR_WRITE_COMBINING));
+ len = (vm_size_t)numpages << PAGE_SHIFT;
+ return (-pmap_change_attr(addr, len, VM_MEMATTR_WRITE_COMBINING));
#else
return (set_memory_uc(addr, numpages));
#endif
@@ -62,13 +56,10 @@
static inline int
set_memory_wb(unsigned long addr, int numpages)
{
- vm_offset_t va;
vm_size_t len;
- va = PHYS_TO_DMAP(addr);
- len = numpages << PAGE_SHIFT;
-
- return (-pmap_change_attr(va, len, VM_MEMATTR_WRITE_BACK));
+ len = (vm_size_t)numpages << PAGE_SHIFT;
+ return (-pmap_change_attr(addr, len, VM_MEMATTR_WRITE_BACK));
}
static inline int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 8:03 AM (2 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16190494
Default Alt Text
D45057.diff (1 KB)
Attached To
Mode
D45057: linuxkpi: Fix set_memory_*
Attached
Detach File
Event Timeline
Log In to Comment