From owner-dev-commits-src-all@freebsd.org Tue May 18 00:06:08 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 08CE5636E5F; Tue, 18 May 2021 00:06:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FkbrH6rwwz4t3F; Tue, 18 May 2021 00:06:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D00D3153CF; Tue, 18 May 2021 00:06:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 14I067pB080744; Tue, 18 May 2021 00:06:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 14I067uC080743; Tue, 18 May 2021 00:06:07 GMT (envelope-from git) Date: Tue, 18 May 2021 00:06:07 GMT Message-Id: <202105180006.14I067uC080743@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 8d2b4b2e7c1e - main - cxgbe: Cast pointer arguments to trunc_page() to vm_offset_t. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8d2b4b2e7c1e0b10c4d49963753db31c4794dbc4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2021 00:06:08 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8d2b4b2e7c1e0b10c4d49963753db31c4794dbc4 commit 8d2b4b2e7c1e0b10c4d49963753db31c4794dbc4 Author: John Baldwin AuthorDate: 2021-05-18 00:04:22 +0000 Commit: John Baldwin CommitDate: 2021-05-18 00:04:22 +0000 cxgbe: Cast pointer arguments to trunc_page() to vm_offset_t. Reported by: mjg, jenkins, rmacklem Fixes: 46bee8043ee2bd352d420cd573e0364ca45f813e Sponsored by: Chelsio Communications --- sys/dev/cxgbe/tom/t4_ddp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_ddp.c b/sys/dev/cxgbe/tom/t4_ddp.c index c266a2e39fa9..34c01674659a 100644 --- a/sys/dev/cxgbe/tom/t4_ddp.c +++ b/sys/dev/cxgbe/tom/t4_ddp.c @@ -1042,7 +1042,7 @@ have_pgsz: npages = 0; while (entries--) { npages++; - start_pva = trunc_page(sgl->addr); + start_pva = trunc_page((vm_offset_t)sgl->addr); end_pva = trunc_page((vm_offset_t)sgl->addr + sgl->len - 1); npages += (end_pva - start_pva) >> pr->pr_page_shift[idx]; sgl = sgl + 1; @@ -1297,7 +1297,7 @@ t4_write_page_pods_for_sgl(struct adapter *sc, struct toepcb *toep, ddp_pgsz = 1 << pr->pr_page_shift[G_PPOD_PGSZ(prsv->prsv_tag)]; offset = (vm_offset_t)sgl->addr & PAGE_MASK; ppod_addr = pr->pr_start + (prsv->prsv_tag & pr->pr_tag_mask); - pva = trunc_page(sgl->addr); + pva = trunc_page((vm_offset_t)sgl->addr); mbufq_init(&wrq, INT_MAX); for (i = 0; i < prsv->prsv_nppods; ppod_addr += chunk) {