aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2026-04-23 17:05:54 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2026-04-23 17:05:54 +0000
commit025b39b854202b316f4c5ec3e00d727115ac0eaa (patch)
treebe6ea5fed2006dfff62a1e1224b39692072ff95b /sys/dev
parente27501388fc0dc2a29f90cb24ba8d36e9bb6631f (diff)
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/gve/gve.h4
-rw-r--r--sys/dev/gve/gve_qpl.c12
-rw-r--r--sys/dev/gve/gve_tx.c4
3 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/gve/gve.h b/sys/dev/gve/gve.h
index 64c2a0481817..1a163cfcbce0 100644
--- a/sys/dev/gve/gve.h
+++ b/sys/dev/gve/gve.h
@@ -166,7 +166,7 @@ struct gve_queue_page_list {
uint32_t id;
uint32_t num_dmas;
uint32_t num_pages;
- vm_offset_t kva;
+ char *kva;
vm_page_t *pages;
struct gve_dma_handle *dmas;
};
@@ -350,7 +350,7 @@ struct gve_rx_ring {
* uses it.
*/
struct gve_tx_fifo {
- vm_offset_t base; /* address of base of FIFO */
+ char *base; /* address of base of FIFO */
uint32_t size; /* total size */
volatile int available; /* how much space is still available */
uint32_t head; /* offset to write at */
diff --git a/sys/dev/gve/gve_qpl.c b/sys/dev/gve/gve_qpl.c
index 1c6a58372365..f04e82497fa4 100644
--- a/sys/dev/gve/gve_qpl.c
+++ b/sys/dev/gve/gve_qpl.c
@@ -46,8 +46,8 @@ gve_free_qpl(struct gve_priv *priv, struct gve_queue_page_list *qpl)
}
if (qpl->kva) {
- pmap_qremove((void *)qpl->kva, qpl->num_pages);
- kva_free(qpl->kva, PAGE_SIZE * qpl->num_pages);
+ pmap_qremove(qpl->kva, qpl->num_pages);
+ kva_free((vm_offset_t)qpl->kva, PAGE_SIZE * qpl->num_pages);
}
for (i = 0; i < qpl->num_pages; i++) {
@@ -104,9 +104,9 @@ gve_alloc_qpl(struct gve_priv *priv, uint32_t id, int npages, bool single_kva)
qpl->pages = malloc(npages * sizeof(*qpl->pages), M_GVE_QPL,
M_WAITOK | M_ZERO);
- qpl->kva = 0;
+ qpl->kva = NULL;
if (single_kva) {
- qpl->kva = kva_alloc(PAGE_SIZE * npages);
+ qpl->kva = (char *)kva_alloc(PAGE_SIZE * npages);
if (!qpl->kva) {
device_printf(priv->dev, "Failed to create the single kva for QPL %d\n", id);
err = ENOMEM;
@@ -128,14 +128,14 @@ gve_alloc_qpl(struct gve_priv *priv, uint32_t id, int npages, bool single_kva)
}
pmap_qenter(qpl->dmas[i].cpu_addr, &(qpl->pages[i]), 1);
} else
- qpl->dmas[i].cpu_addr = (void *)(qpl->kva + (PAGE_SIZE * i));
+ qpl->dmas[i].cpu_addr = qpl->kva + (PAGE_SIZE * i);
qpl->num_pages++;
}
if (single_kva)
- pmap_qenter((void *)qpl->kva, qpl->pages, npages);
+ pmap_qenter(qpl->kva, qpl->pages, npages);
for (i = 0; i < npages; i++) {
err = gve_dmamap_create(priv, /*size=*/PAGE_SIZE, /*align=*/PAGE_SIZE,
diff --git a/sys/dev/gve/gve_tx.c b/sys/dev/gve/gve_tx.c
index 84e3a4c4eb9f..5e0611e1d6e4 100644
--- a/sys/dev/gve/gve_tx.c
+++ b/sys/dev/gve/gve_tx.c
@@ -735,7 +735,7 @@ gve_xmit(struct gve_tx_ring *tx, struct mbuf *mbuf)
pkt_len);
m_copydata(mbuf, 0, first_seg_len,
- (char *)tx->fifo.base + info->iov[hdr_nfrags - 1].iov_offset);
+ tx->fifo.base + info->iov[hdr_nfrags - 1].iov_offset);
gve_dma_sync_for_device(tx->com.qpl,
info->iov[hdr_nfrags - 1].iov_offset,
info->iov[hdr_nfrags - 1].iov_len);
@@ -755,7 +755,7 @@ gve_xmit(struct gve_tx_ring *tx, struct mbuf *mbuf)
info->iov[i].iov_offset, is_ipv6, l3_off, tso_mss);
m_copydata(mbuf, copy_offset, info->iov[i].iov_len,
- (char *)tx->fifo.base + info->iov[i].iov_offset);
+ tx->fifo.base + info->iov[i].iov_offset);
gve_dma_sync_for_device(tx->com.qpl,
info->iov[i].iov_offset, info->iov[i].iov_len);
copy_offset += info->iov[i].iov_len;