Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Feb 2018 15:37:58 +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: r328850 - head/sys/dev/mpr
Message-ID:  <201802041537.w14Fbw6T087524@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Sun Feb  4 15:37:58 2018
New Revision: 328850
URL: https://svnweb.freebsd.org/changeset/base/328850

Log:
  Minimal changes for MPR to build on architectures with physical addresses larger than virtual
  
  Summary:
  Some architectures use large (36-bit) physical addresses, with smaller
  virtual addresses.  Casting between vm_paddr_t (or bus_addr_t) and void * is
  considered illegal, so cast through uintptr_t.  No functional change on existing
  platforms.
  
  Reviewed By:	scottl
  Differential Revision:	https://reviews.freebsd.org/D14042

Modified:
  head/sys/dev/mpr/mpr.c

Modified: head/sys/dev/mpr/mpr.c
==============================================================================
--- head/sys/dev/mpr/mpr.c	Sun Feb  4 14:49:55 2018	(r328849)
+++ head/sys/dev/mpr/mpr.c	Sun Feb  4 15:37:58 2018	(r328850)
@@ -2763,7 +2763,7 @@ mpr_build_nvme_prp(struct mpr_softc *sc, struct mpr_co
 	prp_entry_phys = prp_page_phys;
 
 	/* Get physical address and length of the data buffer. */
-	paddr = (bus_addr_t)data;
+	paddr = (bus_addr_t)(uintptr_t)data;
 	if (data_in_sz)
 		length = data_in_sz;
 	else
@@ -2947,7 +2947,7 @@ mpr_check_pcie_native_sgl(struct mpr_softc *sc, struct
 		else if ((buff_len > (PAGE_SIZE * 4)) &&
 		    (buff_len <= (PAGE_SIZE * 5)) )
 		{
-			msg_phys = (uint64_t *)segs[0].ds_addr;
+			msg_phys = (uint64_t *)(uintptr_t)segs[0].ds_addr;
 			first_page_offset =
 			    ((uint32_t)(uint64_t)(uintptr_t)msg_phys &
 			    page_mask);



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