From nobody Fri Mar 11 02:21:48 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 9FEEB1A1C1A1; Fri, 11 Mar 2022 02:21:49 +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 4KF8nm6jLXz4gnG; Fri, 11 Mar 2022 02:21:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646965309; 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=uDxwGlwWGH0yOdTYE3FjeS9AibcMZV9rk/H5HcaES3E=; b=Klq3NForMz/0Jxyrg1l8Gvj+qvcoiQ1jMjoeXHFiWjs2ZsGxDzj7XtMEg0tPhfWeLsP8e3 cjLqCUON+qoadB14snKODyMBTMMPoraHwFt/Mgr7akxbK925cLpI6ucuANnKRir7PabLlW 1vb4fSfrVl0JtQbG0TAhrK4cHS3JkejlupOB16Ywoi5JyCWTOTHF6xjR4Ru1hbqE0/nY1D b6q1Sy3GrfVuuJgiNzuHCuPPHT/C7BjVeqxI2sdQIMUYlodA5Pc5634crfQusfAVgPRzgR xiT72fzVVEn+YpBEUDFaSErW/kamAZ63AQRs8hzDymSnntrocafLnvWgGqmSNw== 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 41C7F10F40; Fri, 11 Mar 2022 02:21:48 +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 22B2Lmbd037274; Fri, 11 Mar 2022 02:21:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22B2LmuN037273; Fri, 11 Mar 2022 02:21:48 GMT (envelope-from git) Date: Fri, 11 Mar 2022 02:21:48 GMT Message-Id: <202203110221.22B2LmuN037273@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: 832acea92fc8 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 832acea92fc8cdb55859a6a4b1bc38bf766780f1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646965309; 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=uDxwGlwWGH0yOdTYE3FjeS9AibcMZV9rk/H5HcaES3E=; b=kvCwSPka7oG7kfIjkYIe+IZQ104nNNypm6kJEem3wlI14CwjtbFIKAHEbNWurPgumKqKaI 6lP6JCkQABLvFLsEGNp/wdRE1tgN2gR8zlAzI7DMVCuJUmsamee4XD/I5pHXKU8WyeSIDg cNxdcSC3okdNpAUw13dx06rR7XVI8KOCmGz8UmF26C1Klbg28Ny7NdYnZJHvi2oJraFAqw W+SGcYzQCe2t1OWvLXHopYJBE4/QKQ1+ahmbP/O358hgD0mqS3fYNiR0ahjGNG3v+HaJeu cOhH8aXn74AF1FWq80MuaxIEGnFFhCFkHAotcWJr9O8kI/p+moqnP9Na1ZkULQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646965309; a=rsa-sha256; cv=none; b=c0izdkpQrwWr42IG31i1lIXfO+RoVsflwGcO8lEWYEiCtfJZQt4t3HUO0/2IVzWrjmKA7c l1qnMP8JzKn0LdUEOkQZwRUfn15tIaS0ptTAENH4S8lEtpQjUDqpHqCQpiVGBWQcjAOj9B f4GDtLV93uLrASx0K4717GD0gJTc4iA2LEMrwuM+2TSdp8IUeojWzZZh4Okgq+S9s8mHsX vWiXq71Y6xQwxLEfg6pnn3lmnNIA6CNTgkv5N6qiZy2VcQKO+l9rBzyhJkhzZpRV/zqdmR bBDztWdpwpxWfHqszvSw3tqs2H6G5uChGMO0Mb4qdcItes2MnbYCiWwgvkl8YA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=832acea92fc8cdb55859a6a4b1bc38bf766780f1 commit 832acea92fc8cdb55859a6a4b1bc38bf766780f1 Author: John Baldwin AuthorDate: 2022-03-11 02:20:28 +0000 Commit: John Baldwin CommitDate: 2022-03-11 02:20:28 +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 --- 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 5cef995c7698..c8adad7e9d03 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;