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
This commit is contained in:
Justin Hibbits 2018-01-26 00:56:09 +00:00
parent ea3c5e5d04
commit 51bd6f9618
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=328424

View File

@ -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)));