Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jan 2018 00:56:10 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r328424 - head/sys/compat/linuxkpi/common/src
Message-ID:  <201801260056.w0Q0uARW097523@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Fri Jan 26 00:56:09 2018
New Revision: 328424
URL: https://svnweb.freebsd.org/changeset/base/328424

Log:
  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

Modified:
  head/sys/compat/linuxkpi/common/src/linux_page.c

Modified: head/sys/compat/linuxkpi/common/src/linux_page.c
==============================================================================
--- head/sys/compat/linuxkpi/common/src/linux_page.c	Fri Jan 26 00:45:40 2018	(r328423)
+++ head/sys/compat/linuxkpi/common/src/linux_page.c	Fri Jan 26 00:56:09 2018	(r328424)
@@ -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)));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801260056.w0Q0uARW097523>