Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157882608
D41256.id125394.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D41256.id125394.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h
--- a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h
+++ b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h
@@ -183,7 +183,7 @@
size_t size, enum dma_data_direction dir, unsigned long attrs)
{
- return (linux_dma_map_phys(dev, VM_PAGE_TO_PHYS(page) + offset, size));
+ return (linux_dma_map_phys(dev, page_to_phys(page) + offset, size));
}
/* linux_dma_(un)map_sg_attrs does not support attrs yet */
@@ -198,7 +198,7 @@
unsigned long offset, size_t size, enum dma_data_direction direction)
{
- return (linux_dma_map_phys(dev, VM_PAGE_TO_PHYS(page) + offset, size));
+ return (linux_dma_map_phys(dev, page_to_phys(page) + offset, size));
}
static inline void
diff --git a/sys/compat/linuxkpi/common/include/linux/highmem.h b/sys/compat/linuxkpi/common/include/linux/highmem.h
--- a/sys/compat/linuxkpi/common/include/linux/highmem.h
+++ b/sys/compat/linuxkpi/common/include/linux/highmem.h
@@ -60,7 +60,7 @@
struct sf_buf *sf;
if (PMAP_HAS_DMAP) {
- return ((void *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(page)));
+ return ((void *)PHYS_TO_DMAP(page_to_phys(page)));
} else {
sched_pin();
sf = sf_buf_alloc(page, SFB_NOWAIT | SFB_CPUPRIVATE);
diff --git a/sys/compat/linuxkpi/common/include/linux/scatterlist.h b/sys/compat/linuxkpi/common/include/linux/scatterlist.h
--- a/sys/compat/linuxkpi/common/include/linux/scatterlist.h
+++ b/sys/compat/linuxkpi/common/include/linux/scatterlist.h
@@ -158,7 +158,7 @@
static inline vm_paddr_t
sg_phys(struct scatterlist *sg)
{
- return (VM_PAGE_TO_PHYS(sg_page(sg)) + sg->offset);
+ return (page_to_phys(sg_page(sg)) + sg->offset);
}
static inline void *
@@ -649,7 +649,7 @@
break;
vaddr = (char *)sf_buf_kva(sf);
} else
- vaddr = (char *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(page));
+ vaddr = (char *)PHYS_TO_DMAP(page_to_phys(page));
memcpy(buf, vaddr + sg->offset + offset, len);
if (!PMAP_HAS_DMAP)
sf_buf_free(sf);
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
@@ -91,7 +91,7 @@
if (page->object != kernel_object) {
return (PMAP_HAS_DMAP ?
- ((void *)(uintptr_t)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(page))) :
+ ((void *)(uintptr_t)PHYS_TO_DMAP(page_to_phys(page))) :
NULL);
}
return ((void *)(uintptr_t)(VM_MIN_KERNEL_ADDRESS +
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, May 27, 3:23 AM (8 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33545254
Default Alt Text
D41256.id125394.diff (2 KB)
Attached To
Mode
D41256: LinuxKPI: cleanup internal calls to VM_PAGE_TO_PHYS
Attached
Detach File
Event Timeline
Log In to Comment