aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2018-01-26 00:56:09 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2018-01-26 00:56:09 +0000
commit51bd6f96189b825492d8732a50840de12fd0903a (patch)
tree0c2d5030ce9d9e8d3ff604956ca65123ca412f4b
parentea3c5e5d0440c7b551c4584cba51d28eec3d227f (diff)
downloadsrc-51bd6f96189b825492d8732a50840de12fd0903a.tar.gz
src-51bd6f96189b825492d8732a50840de12fd0903a.zip
Minimal change to build linuxkpi on architectures with physical addresses larger
than virtual Summary: Some architectures have physical/bus addresses that are much larger than virtual addresses. This change just quiets a warning, as DMAP is not used on those architectures, and on 64-bit platforms uintptr_t is the same size as vm_paddr_t and void *. Reviewed By: hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D14043
Notes
Notes: svn path=/head/; revision=328424
-rw-r--r--sys/compat/linuxkpi/common/src/linux_page.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c
index 250141b06fe3..dcc5be457916 100644
--- a/sys/compat/linuxkpi/common/src/linux_page.c
+++ b/sys/compat/linuxkpi/common/src/linux_page.c
@@ -69,7 +69,8 @@ linux_page_address(struct page *page)
if (page->object != kmem_object && page->object != kernel_object) {
return (PMAP_HAS_DMAP ?
- ((void *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(page))) : NULL);
+ ((void *)(uintptr_t)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(page))) :
+ NULL);
}
return ((void *)(uintptr_t)(VM_MIN_KERNEL_ADDRESS +
IDX_TO_OFF(page->pindex)));