From owner-svn-src-all@freebsd.org Sun Feb 4 15:37:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C2D8EDC999; Sun, 4 Feb 2018 15:37:59 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AEB5784BD2; Sun, 4 Feb 2018 15:37:58 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A55CA1C01C; Sun, 4 Feb 2018 15:37:58 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w14FbwVW087525; Sun, 4 Feb 2018 15:37:58 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w14Fbw6T087524; Sun, 4 Feb 2018 15:37:58 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201802041537.w14Fbw6T087524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 4 Feb 2018 15:37:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328850 - head/sys/dev/mpr X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/dev/mpr X-SVN-Commit-Revision: 328850 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Feb 2018 15:37:59 -0000 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);