From nobody Wed May 11 21:04:39 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 56D1A1AE60FA; Wed, 11 May 2022 21:04:40 +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 4Kz6qC571jz4vFp; Wed, 11 May 2022 21:04:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652303079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yf8wLPbq+wWsiBhr/18xfteJ96xsng27kVbJZBj2luI=; b=nSa0IJaH80K0K5WhHivfII/oe9h267RnQAZKtgF4+2nsrHAcHQs/4InfHs2Z0acw9wHH4b YqLU4NRTp8OW3zzRO3Vy3ML3n9YcHEWDGub1a4unLwHrbYiKtCfODdUx4H81RfLU1mwPOH BtL6EKq25EqokDDuBDeB+uJils27xKZSh4IDjoJT4+guk17DjFEhdGy9rgKEKv00a7pQ6e U6X2A9d7cPT9T3q+dj/SOQ2hehnx7Ly9lSVfl6u6PJ24s3PM2EsWa541MCGm9K9VTGp8f+ RVY7O60aPOoGm+TwI1rtFKcwmPzoMuh+VfZDSDxlhxbJFPRtnCOo3KT5iZIGnQ== 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 691032103D; Wed, 11 May 2022 21:04:39 +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 24BL4d6o025740; Wed, 11 May 2022 21:04:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24BL4dkc025739; Wed, 11 May 2022 21:04:39 GMT (envelope-from git) Date: Wed, 11 May 2022 21:04:39 GMT Message-Id: <202205112104.24BL4dkc025739@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 34185c0a1af7 - stable/13 - icl_soft: Use PHYS_TO_DMAP instead of pmap_map_io_transient. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 34185c0a1af7322069e48ce9a64441d0dda02238 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652303079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yf8wLPbq+wWsiBhr/18xfteJ96xsng27kVbJZBj2luI=; b=QBRQ036MjFzJBoz+3r8myTVnTYAahdf8DNfW/EqgSbek5zd+5aH345EauOjXqy9+O6YSv8 +kPatZ8IeOZ/A8KspB4seFq36qC0hai4ftB7q5sYlxkUo/o6TiPCr6vwnzlpV8mmUwLEB7 bcHoltPT85xd9xWrw5r643msHg/PwqOPzRniqUR+UVX3G27FEecfc5C9acbX8Bia3KkBJU chntE3KbuszKj9H9MOssb9zpE3UgHF30r5iOZ5jcnjS31Idtmiu/8eAOhyA3jTS3VXANP9 He2yrf3eX0xEuaVrpkDSff2qVeSHCintpDuH2T6+fKL23aiqt+aHSv0l5JuoOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652303079; a=rsa-sha256; cv=none; b=iwL7oztWMvYRat9NlgTyEs60M67Rdi4tTYnOXFIeqh1y43ZziqiOEJDZmctf8OxKHQThTx by1Ma0wKuQ1iEsf4Nyjg5zZ+Jkq9XMVEhZVj37z1k4j/izyKgpyaoJykigQMRk3XCFLxDl BqDbWEm06TO1EcMzJGZDmJ5qLLOVnFXQty2U3Y7FpTO/+ICxfaPotLQ44OxR84qUeNKo5Z ED+tXcjjVsXhb/sRqMxmPtpKRVXycRs7O/rjd2bgSei3sqsEdZ8msQ0LfT3InL5c3uIhqn 3M7PdYLNs9d6ArH/lQ6qTJxWHxQMOUO0+riRTrL5DPRFB3aOeqnG7eUuhbSqWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=34185c0a1af7322069e48ce9a64441d0dda02238 commit 34185c0a1af7322069e48ce9a64441d0dda02238 Author: John Baldwin AuthorDate: 2022-03-11 02:20:28 +0000 Commit: John Baldwin CommitDate: 2022-05-11 20:52:41 +0000 icl_soft: Use PHYS_TO_DMAP instead of pmap_map_io_transient. The latter API is not actually MI but is only supported on amd64, arm64, and RISC-V. Sponsored by: Chelsio Communications (cherry picked from commit 832acea92fc8cdb55859a6a4b1bc38bf766780f1) --- sys/dev/iscsi/icl_soft.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/sys/dev/iscsi/icl_soft.c b/sys/dev/iscsi/icl_soft.c index a1e07057a959..016f70ae9c52 100644 --- a/sys/dev/iscsi/icl_soft.c +++ b/sys/dev/iscsi/icl_soft.c @@ -1106,7 +1106,6 @@ icl_soft_conn_pdu_append_bio(struct icl_conn *ic, struct icl_pdu *request, struct mbuf *m, *m_tail; vm_offset_t vaddr; size_t mtodo, page_offset, todo; - boolean_t mapped; int i; KASSERT(len > 0, ("len == 0")); @@ -1189,9 +1188,7 @@ icl_soft_conn_pdu_append_bio(struct icl_conn *ic, struct icl_pdu *request, while (len > 0) { todo = MIN(len, PAGE_SIZE - page_offset); - - mapped = pmap_map_io_transient(bp->bio_ma + i, &vaddr, 1, - FALSE); + vaddr = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(bp->bio_ma[i])); do { mtodo = min(todo, M_SIZE(m) - m->m_len); @@ -1204,10 +1201,6 @@ icl_soft_conn_pdu_append_bio(struct icl_conn *ic, struct icl_pdu *request, todo -= mtodo; } while (todo > 0); - if (__predict_false(mapped)) - pmap_unmap_io_transient(bp->bio_ma + 1, &vaddr, 1, - FALSE); - page_offset = 0; len -= todo; i++; @@ -1270,7 +1263,6 @@ icl_soft_conn_pdu_get_bio(struct icl_conn *ic, struct icl_pdu *ip, { vm_offset_t vaddr; size_t page_offset, todo; - boolean_t mapped; int i; MPASS(bp->bio_flags & BIO_UNMAPPED); @@ -1287,13 +1279,9 @@ icl_soft_conn_pdu_get_bio(struct icl_conn *ic, struct icl_pdu *ip, while (len > 0) { todo = MIN(len, PAGE_SIZE - page_offset); - mapped = pmap_map_io_transient(bp->bio_ma + i, &vaddr, 1, - FALSE); + vaddr = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(bp->bio_ma[i])); m_copydata(ip->ip_data_mbuf, pdu_off, todo, (char *)vaddr + page_offset); - if (__predict_false(mapped)) - pmap_unmap_io_transient(bp->bio_ma + 1, &vaddr, 1, - FALSE); page_offset = 0; pdu_off += todo;