git: 832acea92fc8 - main - icl_soft: Use PHYS_TO_DMAP instead of pmap_map_io_transient.
Date: Fri, 11 Mar 2022 02:21:48 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=832acea92fc8cdb55859a6a4b1bc38bf766780f1
commit 832acea92fc8cdb55859a6a4b1bc38bf766780f1
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-03-11 02:20:28 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
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;