diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2005-11-23 11:30:15 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2005-11-23 11:30:15 +0000 |
commit | fcf813dc561c01ef35828627afde907ab2be6db6 (patch) | |
tree | 6260a8289487ebc356bfe3642a807f187b76b0f3 /sys | |
parent | dcb769a84f5ac99a41089b979c808541d2fbc842 (diff) |
assume vtophys(vaddr_t) just what all the other archs expect; no functional change
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/i386/cpu.c | 6 | ||||
-rw-r--r-- | sys/dev/eisa/uha_eisa.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/pdqvar.h | 6 | ||||
-rw-r--r-- | sys/dev/ic/uha.c | 4 | ||||
-rw-r--r-- | sys/dev/isa/aha.c | 4 | ||||
-rw-r--r-- | sys/dev/isa/uha_isa.c | 4 | ||||
-rw-r--r-- | sys/dev/isa/wds.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/if_le_pci.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/if_lge.c | 12 | ||||
-rw-r--r-- | sys/dev/pci/if_nge.c | 19 | ||||
-rw-r--r-- | sys/dev/pci/if_tl.c | 25 | ||||
-rw-r--r-- | sys/dev/pci/if_wb.c | 25 |
12 files changed, 60 insertions, 57 deletions
diff --git a/sys/arch/i386/i386/cpu.c b/sys/arch/i386/i386/cpu.c index 304f54eea91..d3fef0caff6 100644 --- a/sys/arch/i386/i386/cpu.c +++ b/sys/arch/i386/i386/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.15 2005/07/18 02:43:25 fgsch Exp $ */ +/* $OpenBSD: cpu.c,v 1.16 2005/11/23 11:30:14 mickey Exp $ */ /* $NetBSD: cpu.c,v 1.1.2.7 2000/06/26 02:04:05 sommerfeld Exp $ */ /*- @@ -253,7 +253,7 @@ cpu_attach(parent, self, aux) pcb->pcb_tss.tss_esp = kstack + USPACE - 16 - sizeof (struct trapframe); pcb->pcb_pmap = pmap_kernel(); - pcb->pcb_cr3 = vtophys(pcb->pcb_pmap->pm_pdir); + pcb->pcb_cr3 = vtophys((vaddr_t)pcb->pcb_pmap->pm_pdir); /* pcb->pcb_cr3 = pcb->pcb_pmap->pm_pdir - KERNBASE; XXX ??? */ #endif @@ -414,7 +414,7 @@ cpu_boot_secondary (ci) printf("%s: starting", ci->ci_dev.dv_xname); /* XXX move elsewhere, not per CPU. */ - mp_pdirpa = vtophys(kpm->pm_pdir); + mp_pdirpa = vtophys((vaddr_t)kpm->pm_pdir); pcb = ci->ci_idle_pcb; diff --git a/sys/dev/eisa/uha_eisa.c b/sys/dev/eisa/uha_eisa.c index b9034755db7..e60d3eacc33 100644 --- a/sys/dev/eisa/uha_eisa.c +++ b/sys/dev/eisa/uha_eisa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uha_eisa.c,v 1.4 2002/03/14 01:26:53 millert Exp $ */ +/* $OpenBSD: uha_eisa.c,v 1.5 2005/11/23 11:30:14 mickey Exp $ */ /* $NetBSD: uha_eisa.c,v 1.5 1996/10/21 22:31:07 thorpej Exp $ */ /* @@ -64,7 +64,7 @@ struct cfattach uha_eisa_ca = { sizeof(struct uha_softc), uha_eisa_match, uha_eisa_attach }; -#define KVTOPHYS(x) vtophys(x) +#define KVTOPHYS(x) vtophys((vaddr_t)(x)) int u24_find(bus_space_tag_t, bus_space_handle_t, struct uha_softc *); void u24_start_mbox(struct uha_softc *, struct uha_mscp *); diff --git a/sys/dev/ic/pdqvar.h b/sys/dev/ic/pdqvar.h index 4d39a944477..d4e1644cf96 100644 --- a/sys/dev/ic/pdqvar.h +++ b/sys/dev/ic/pdqvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pdqvar.h,v 1.16 2002/06/09 03:14:18 todd Exp $ */ +/* $OpenBSD: pdqvar.h,v 1.17 2005/11/23 11:30:14 mickey Exp $ */ /* $NetBSD: pdqvar.h,v 1.11 1996/10/25 21:33:37 cgd Exp $ */ /*- @@ -84,9 +84,9 @@ enum _pdq_type_t { #define PDQ_OS_USEC_DELAY(n) DELAY(n) #define PDQ_OS_MEMZERO(p, n) bzero((caddr_t)(p), (n)) #if (defined(__NetBSD__) || defined(__OpenBSD__)) && defined(__alpha__) -#define PDQ_OS_VA_TO_PA(pdq, p) (alpha_XXX_dmamap((vm_offset_t)p)) +#define PDQ_OS_VA_TO_PA(pdq, p) (alpha_XXX_dmamap((vaddr_t)p)) #else -#define PDQ_OS_VA_TO_PA(pdq, p) vtophys(p) +#define PDQ_OS_VA_TO_PA(pdq, p) vtophys((vaddr_t)p) #endif #define PDQ_OS_MEMALLOC(n) malloc(n, M_DEVBUF, M_NOWAIT) #define PDQ_OS_MEMFREE(p, n) free((void *) p, M_DEVBUF) diff --git a/sys/dev/ic/uha.c b/sys/dev/ic/uha.c index fd9ac7bb1df..a93f43faa9c 100644 --- a/sys/dev/ic/uha.c +++ b/sys/dev/ic/uha.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uha.c,v 1.6 2005/02/17 18:07:36 jfb Exp $ */ +/* $OpenBSD: uha.c,v 1.7 2005/11/23 11:30:14 mickey Exp $ */ /* $NetBSD: uha.c,v 1.3 1996/10/13 01:37:29 christos Exp $ */ #undef UHADEBUG @@ -84,7 +84,7 @@ #define Debugger() panic("should call debugger here (ultra14f.c)") #endif /* ! DDB */ -#define KVTOPHYS(x) vtophys(x) +#define KVTOPHYS(x) vtophys((vaddr_t)x) integrate void uha_reset_mscp(struct uha_softc *, struct uha_mscp *); void uha_free_mscp(struct uha_softc *, struct uha_mscp *); diff --git a/sys/dev/isa/aha.c b/sys/dev/isa/aha.c index 7ab516489c6..a61279dd3e9 100644 --- a/sys/dev/isa/aha.c +++ b/sys/dev/isa/aha.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aha.c,v 1.53 2004/12/26 21:22:13 miod Exp $ */ +/* $OpenBSD: aha.c,v 1.54 2005/11/23 11:30:14 mickey Exp $ */ /* $NetBSD: aha.c,v 1.11 1996/05/12 23:51:23 mycroft Exp $ */ #undef AHADIAG @@ -1147,7 +1147,7 @@ aha_init(sc) /* Initialize mail box. */ mailbox.cmd.opcode = AHA_MBX_INIT; mailbox.cmd.nmbx = AHA_MBX_SIZE; - ltophys(vtophys(wmbx), mailbox.cmd.addr); + ltophys(vtophys((vaddr_t)wmbx), mailbox.cmd.addr); aha_cmd(iobase, sc, sizeof(mailbox.cmd), (u_char *)&mailbox.cmd, 0, (u_char *)0); } diff --git a/sys/dev/isa/uha_isa.c b/sys/dev/isa/uha_isa.c index 371c2d30f4d..684b44894c8 100644 --- a/sys/dev/isa/uha_isa.c +++ b/sys/dev/isa/uha_isa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uha_isa.c,v 1.6 2002/03/14 01:26:56 millert Exp $ */ +/* $OpenBSD: uha_isa.c,v 1.7 2005/11/23 11:30:14 mickey Exp $ */ /* $NetBSD: uha_isa.c,v 1.5 1996/10/21 22:41:21 thorpej Exp $ */ /* @@ -63,7 +63,7 @@ struct cfattach uha_isa_ca = { sizeof(struct uha_softc), uha_isa_probe, uha_isa_attach }; -#define KVTOPHYS(x) vtophys(x) +#define KVTOPHYS(x) vtophys((vaddr_t)(x)) int u14_find(bus_space_tag_t, bus_space_handle_t, struct uha_softc *); void u14_start_mbox(struct uha_softc *, struct uha_mscp *); diff --git a/sys/dev/isa/wds.c b/sys/dev/isa/wds.c index 58b730a4d39..074b2804a2f 100644 --- a/sys/dev/isa/wds.c +++ b/sys/dev/isa/wds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wds.c,v 1.20 2005/02/17 18:07:36 jfb Exp $ */ +/* $OpenBSD: wds.c,v 1.21 2005/11/23 11:30:14 mickey Exp $ */ /* $NetBSD: wds.c,v 1.13 1996/11/03 16:20:31 mycroft Exp $ */ #undef WDSDIAG @@ -104,7 +104,7 @@ struct wds_mbx { struct wds_mbx_in *tmbi; /* Target Mail Box in */ }; -#define KVTOPHYS(x) vtophys(x) +#define KVTOPHYS(x) vtophys((vaddr_t)(x)) struct wds_softc { struct device sc_dev; diff --git a/sys/dev/pci/if_le_pci.c b/sys/dev/pci/if_le_pci.c index 7896bbeb3c9..6818f5bc9a8 100644 --- a/sys/dev/pci/if_le_pci.c +++ b/sys/dev/pci/if_le_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_le_pci.c,v 1.23 2005/09/11 18:17:08 mickey Exp $ */ +/* $OpenBSD: if_le_pci.c,v 1.24 2005/11/23 11:30:14 mickey Exp $ */ /* $NetBSD: if_le_pci.c,v 1.13 1996/10/25 21:33:32 cgd Exp $ */ /*- @@ -237,7 +237,7 @@ le_pci_attach(parent, self, aux) lesc->sc_ioh = ioh; sc->sc_conf3 = 0; - sc->sc_addr = vtophys(sc->sc_mem); /* XXX XXX XXX */ + sc->sc_addr = vtophys((vaddr_t)sc->sc_mem); /* XXX XXX XXX */ sc->sc_memsize = PCNET_MEMSIZE; sc->sc_copytodesc = am7990_copytobuf_contig; diff --git a/sys/dev/pci/if_lge.c b/sys/dev/pci/if_lge.c index 3e00db415cb..700f5d519a9 100644 --- a/sys/dev/pci/if_lge.c +++ b/sys/dev/pci/if_lge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lge.c,v 1.34 2005/10/09 04:44:45 brad Exp $ */ +/* $OpenBSD: if_lge.c,v 1.35 2005/11/23 11:30:14 mickey Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 @@ -102,7 +102,7 @@ #endif #include <uvm/uvm_extern.h> /* for vtophys */ -#include <uvm/uvm_pmap.h> /* for vtophys */ +#define VTOPHYS(v) vtophys((vaddr_t)(v)) #include <dev/pci/pcireg.h> #include <dev/pci/pcivar.h> @@ -729,7 +729,7 @@ lge_newbuf(struct lge_softc *sc, struct lge_rx_desc *c, struct mbuf *m) c->lge_mbuf = m_new; c->lge_fragptr_hi = 0; - c->lge_fragptr_lo = vtophys(mtod(m_new, caddr_t)); + c->lge_fragptr_lo = VTOPHYS(mtod(m_new, caddr_t)); c->lge_fraglen = m_new->m_len; c->lge_ctl = m_new->m_len | LGE_RXCTL_WANTINTR | LGE_FRAGCNT(1); c->lge_sts = 0; @@ -745,7 +745,7 @@ lge_newbuf(struct lge_softc *sc, struct lge_rx_desc *c, struct mbuf *m) * causes the command to be issued, so we do that * last. */ - CSR_WRITE_4(sc, LGE_RXDESC_ADDR_LO, vtophys(c)); + CSR_WRITE_4(sc, LGE_RXDESC_ADDR_LO, VTOPHYS(c)); LGE_INC(sc->lge_cdata.lge_rx_prod, LGE_RX_LIST_CNT); return (0); @@ -1145,7 +1145,7 @@ lge_encap(struct lge_softc *sc, struct mbuf *m_head, u_int32_t *txidx) tot_len += m->m_len; f = &cur_tx->lge_frags[frag]; f->lge_fraglen = m->m_len; - f->lge_fragptr_lo = vtophys(mtod(m, vaddr_t)); + f->lge_fragptr_lo = VTOPHYS(mtod(m, vaddr_t)); f->lge_fragptr_hi = 0; frag++; } @@ -1159,7 +1159,7 @@ lge_encap(struct lge_softc *sc, struct mbuf *m_head, u_int32_t *txidx) LGE_INC((*txidx), LGE_TX_LIST_CNT); /* Queue for transmit */ - CSR_WRITE_4(sc, LGE_TXDESC_ADDR_LO, vtophys(cur_tx)); + CSR_WRITE_4(sc, LGE_TXDESC_ADDR_LO, VTOPHYS(cur_tx)); return (0); } diff --git a/sys/dev/pci/if_nge.c b/sys/dev/pci/if_nge.c index b5bf6e606cd..a5b59a27f5d 100644 --- a/sys/dev/pci/if_nge.c +++ b/sys/dev/pci/if_nge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nge.c,v 1.47 2005/11/04 17:22:05 brad Exp $ */ +/* $OpenBSD: if_nge.c,v 1.48 2005/11/23 11:30:14 mickey Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 @@ -122,6 +122,7 @@ #endif #include <uvm/uvm_extern.h> /* for vtophys */ +#define VTOPHYS(v) vtophys((vaddr_t)(v)) #include <dev/pci/pcireg.h> #include <dev/pci/pcivar.h> @@ -989,12 +990,12 @@ nge_list_tx_init(sc) ld->nge_tx_list[i].nge_nextdesc = &ld->nge_tx_list[0]; ld->nge_tx_list[i].nge_next = - vtophys(&ld->nge_tx_list[0]); + VTOPHYS(&ld->nge_tx_list[0]); } else { ld->nge_tx_list[i].nge_nextdesc = &ld->nge_tx_list[i + 1]; ld->nge_tx_list[i].nge_next = - vtophys(&ld->nge_tx_list[i + 1]); + VTOPHYS(&ld->nge_tx_list[i + 1]); } ld->nge_tx_list[i].nge_mbuf = NULL; ld->nge_tx_list[i].nge_ptr = 0; @@ -1030,12 +1031,12 @@ nge_list_rx_init(sc) ld->nge_rx_list[i].nge_nextdesc = &ld->nge_rx_list[0]; ld->nge_rx_list[i].nge_next = - vtophys(&ld->nge_rx_list[0]); + VTOPHYS(&ld->nge_rx_list[0]); } else { ld->nge_rx_list[i].nge_nextdesc = &ld->nge_rx_list[i + 1]; ld->nge_rx_list[i].nge_next = - vtophys(&ld->nge_rx_list[i + 1]); + VTOPHYS(&ld->nge_rx_list[i + 1]); } } @@ -1086,7 +1087,7 @@ nge_newbuf(sc, c, m) m_adj(m_new, sizeof(u_int64_t)); c->nge_mbuf = m_new; - c->nge_ptr = vtophys(mtod(m_new, caddr_t)); + c->nge_ptr = VTOPHYS(mtod(m_new, caddr_t)); DPRINTFN(7,("%s: c->nge_ptr=%#x\n", sc->sc_dv.dv_xname, c->nge_ptr)); c->nge_ctl = m_new->m_len; @@ -1616,7 +1617,7 @@ nge_encap(sc, m_head, txidx) return(ENOBUFS); f = &sc->nge_ldata->nge_tx_list[frag]; f->nge_ctl = NGE_CMDSTS_MORE | m->m_len; - f->nge_ptr = vtophys(mtod(m, vaddr_t)); + f->nge_ptr = VTOPHYS(mtod(m, vaddr_t)); DPRINTFN(7,("%s: f->nge_ptr=%#x\n", sc->sc_dv.dv_xname, f->nge_ptr)); if (cnt != 0) @@ -1794,9 +1795,9 @@ nge_init(xsc) * Load the address of the RX and TX lists. */ CSR_WRITE_4(sc, NGE_RX_LISTPTR, - vtophys(&sc->nge_ldata->nge_rx_list[0])); + VTOPHYS(&sc->nge_ldata->nge_rx_list[0])); CSR_WRITE_4(sc, NGE_TX_LISTPTR, - vtophys(&sc->nge_ldata->nge_tx_list[0])); + VTOPHYS(&sc->nge_ldata->nge_tx_list[0])); /* Set RX configuration */ CSR_WRITE_4(sc, NGE_RX_CFG, NGE_RXCFG); diff --git a/sys/dev/pci/if_tl.c b/sys/dev/pci/if_tl.c index 960cc67e18c..242eabfb672 100644 --- a/sys/dev/pci/if_tl.c +++ b/sys/dev/pci/if_tl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tl.c,v 1.36 2005/11/07 02:57:45 brad Exp $ */ +/* $OpenBSD: if_tl.c,v 1.37 2005/11/23 11:30:14 mickey Exp $ */ /* * Copyright (c) 1997, 1998 @@ -210,6 +210,7 @@ #endif #include <uvm/uvm_extern.h> /* for vtophys */ +#define VTOPHYS(v) vtophys((vaddr_t)(v)) #include <dev/mii/mii.h> #include <dev/mii/miivar.h> @@ -1038,7 +1039,7 @@ int tl_list_rx_init(sc) } else { cd->tl_rx_chain[i].tl_next = &cd->tl_rx_chain[i + 1]; ld->tl_rx_list[i].tlist_fptr = - vtophys(&ld->tl_rx_list[i + 1]); + VTOPHYS(&ld->tl_rx_list[i + 1]); } } @@ -1073,7 +1074,7 @@ int tl_newbuf(sc, c) c->tl_next = NULL; c->tl_ptr->tlist_frsize = MCLBYTES; c->tl_ptr->tlist_fptr = 0; - c->tl_ptr->tl_frag.tlist_dadr = vtophys(mtod(m_new, caddr_t)); + c->tl_ptr->tl_frag.tlist_dadr = VTOPHYS(mtod(m_new, caddr_t)); c->tl_ptr->tl_frag.tlist_dcnt = MCLBYTES; c->tl_ptr->tlist_cstat = TL_CSTAT_READY; @@ -1134,7 +1135,7 @@ int tl_intvec_rxeof(xsc, type) } sc->tl_cdata.tl_rx_tail->tl_ptr->tlist_fptr = - vtophys(cur_rx->tl_ptr); + VTOPHYS(cur_rx->tl_ptr); sc->tl_cdata.tl_rx_tail->tl_next = cur_rx; sc->tl_cdata.tl_rx_tail = cur_rx; @@ -1199,7 +1200,7 @@ int tl_intvec_rxeoc(xsc, type) r = 1; cd->tl_rx_head = &cd->tl_rx_chain[0]; cd->tl_rx_tail = &cd->tl_rx_chain[TL_RX_LIST_CNT - 1]; - CSR_WRITE_4(sc, TL_CH_PARM, vtophys(sc->tl_cdata.tl_rx_head->tl_ptr)); + CSR_WRITE_4(sc, TL_CH_PARM, VTOPHYS(sc->tl_cdata.tl_rx_head->tl_ptr)); r |= (TL_CMD_GO|TL_CMD_RT); return(r); } @@ -1280,7 +1281,7 @@ int tl_intvec_txeoc(xsc, type) CMD_PUT(sc, TL_CMD_ACK | 0x00000001 | type); /* Then load the address of the next TX list. */ CSR_WRITE_4(sc, TL_CH_PARM, - vtophys(sc->tl_cdata.tl_tx_head->tl_ptr)); + VTOPHYS(sc->tl_cdata.tl_tx_head->tl_ptr)); /* Restart TX channel. */ cmd = CSR_READ_4(sc, TL_HOSTCMD); cmd &= ~TL_CMD_RT; @@ -1479,7 +1480,7 @@ int tl_encap(sc, c, m_head) break; total_len+= m->m_len; c->tl_ptr->tl_frag[frag].tlist_dadr = - vtophys(mtod(m, vaddr_t)); + VTOPHYS(mtod(m, vaddr_t)); c->tl_ptr->tl_frag[frag].tlist_dcnt = m->m_len; frag++; } @@ -1514,7 +1515,7 @@ int tl_encap(sc, c, m_head) m_freem(m_head); m_head = m_new; f = &c->tl_ptr->tl_frag[0]; - f->tlist_dadr = vtophys(mtod(m_new, caddr_t)); + f->tlist_dadr = VTOPHYS(mtod(m_new, caddr_t)); f->tlist_dcnt = total_len = m_new->m_len; frag = 1; } @@ -1526,7 +1527,7 @@ int tl_encap(sc, c, m_head) if (total_len < TL_MIN_FRAMELEN) { f = &c->tl_ptr->tl_frag[frag]; f->tlist_dcnt = TL_MIN_FRAMELEN - total_len; - f->tlist_dadr = vtophys(&sc->tl_ldata->tl_pad); + f->tlist_dadr = VTOPHYS(&sc->tl_ldata->tl_pad); total_len += f->tlist_dcnt; frag++; } @@ -1584,7 +1585,7 @@ void tl_start(ifp) /* Chain it together */ if (prev != NULL) { prev->tl_next = cur_tx; - prev->tl_ptr->tlist_fptr = vtophys(cur_tx->tl_ptr); + prev->tl_ptr->tlist_fptr = VTOPHYS(cur_tx->tl_ptr); } prev = cur_tx; @@ -1617,7 +1618,7 @@ void tl_start(ifp) if (sc->tl_txeoc) { sc->tl_txeoc = 0; - CSR_WRITE_4(sc, TL_CH_PARM, vtophys(start_tx->tl_ptr)); + CSR_WRITE_4(sc, TL_CH_PARM, VTOPHYS(start_tx->tl_ptr)); cmd = CSR_READ_4(sc, TL_HOSTCMD); cmd &= ~TL_CMD_RT; cmd |= TL_CMD_GO|TL_CMD_INTSON; @@ -1700,7 +1701,7 @@ void tl_init(xsc) /* Load the address of the rx list */ CMD_SET(sc, TL_CMD_RT); - CSR_WRITE_4(sc, TL_CH_PARM, vtophys(&sc->tl_ldata->tl_rx_list[0])); + CSR_WRITE_4(sc, TL_CH_PARM, VTOPHYS(&sc->tl_ldata->tl_rx_list[0])); if (!sc->tl_bitrate) { mii_mediachg(&sc->sc_mii); diff --git a/sys/dev/pci/if_wb.c b/sys/dev/pci/if_wb.c index a57d3deda10..ff531d0efc3 100644 --- a/sys/dev/pci/if_wb.c +++ b/sys/dev/pci/if_wb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wb.c,v 1.31 2005/11/07 02:57:46 brad Exp $ */ +/* $OpenBSD: if_wb.c,v 1.32 2005/11/23 11:30:14 mickey Exp $ */ /* * Copyright (c) 1997, 1998 @@ -117,6 +117,7 @@ #endif #include <uvm/uvm_extern.h> /* for vtophys */ +#define VTOPHYS(v) vtophys((vaddr_t)(v)) #include <dev/mii/mii.h> #include <dev/mii/miivar.h> @@ -933,12 +934,12 @@ int wb_list_rx_init(sc) if (i == (WB_RX_LIST_CNT - 1)) { cd->wb_rx_chain[i].wb_nextdesc = &cd->wb_rx_chain[0]; ld->wb_rx_list[i].wb_next = - vtophys(&ld->wb_rx_list[0]); + VTOPHYS(&ld->wb_rx_list[0]); } else { cd->wb_rx_chain[i].wb_nextdesc = &cd->wb_rx_chain[i + 1]; ld->wb_rx_list[i].wb_next = - vtophys(&ld->wb_rx_list[i + 1]); + VTOPHYS(&ld->wb_rx_list[i + 1]); } } @@ -986,7 +987,7 @@ wb_newbuf(sc, c, m) m_adj(m_new, sizeof(u_int64_t)); c->wb_mbuf = m_new; - c->wb_ptr->wb_data = vtophys(mtod(m_new, caddr_t)); + c->wb_ptr->wb_data = VTOPHYS(mtod(m_new, caddr_t)); c->wb_ptr->wb_ctl = WB_RXCTL_RLINK | ETHER_MAX_DIX_LEN; c->wb_ptr->wb_status = WB_RXSTAT; @@ -1082,7 +1083,7 @@ void wb_rxeoc(sc) wb_rxeof(sc); WB_CLRBIT(sc, WB_NETCFG, WB_NETCFG_RX_ON); - CSR_WRITE_4(sc, WB_RXADDR, vtophys(&sc->wb_ldata->wb_rx_list[0])); + CSR_WRITE_4(sc, WB_RXADDR, VTOPHYS(&sc->wb_ldata->wb_rx_list[0])); WB_SETBIT(sc, WB_NETCFG, WB_NETCFG_RX_ON); if (CSR_READ_4(sc, WB_ISR) & WB_RXSTATE_SUSPEND) CSR_WRITE_4(sc, WB_RXSTART, 0xFFFFFFFF); @@ -1305,8 +1306,8 @@ int wb_encap(sc, c, m_head) f->wb_status = 0; } else f->wb_status = WB_TXSTAT_OWN; - f->wb_next = vtophys(&c->wb_ptr->wb_frag[frag + 1]); - f->wb_data = vtophys(mtod(m, vaddr_t)); + f->wb_next = VTOPHYS(&c->wb_ptr->wb_frag[frag + 1]); + f->wb_data = VTOPHYS(mtod(m, vaddr_t)); frag++; } } @@ -1339,7 +1340,7 @@ int wb_encap(sc, c, m_head) m_head = m_new; f = &c->wb_ptr->wb_frag[0]; f->wb_status = 0; - f->wb_data = vtophys(mtod(m_new, caddr_t)); + f->wb_data = VTOPHYS(mtod(m_new, caddr_t)); f->wb_ctl = total_len = m_new->m_len; f->wb_ctl |= WB_TXCTL_TLINK|WB_TXCTL_FIRSTFRAG; frag = 1; @@ -1348,7 +1349,7 @@ int wb_encap(sc, c, m_head) if (total_len < WB_MIN_FRAMELEN) { f = &c->wb_ptr->wb_frag[frag]; f->wb_ctl = WB_MIN_FRAMELEN - total_len; - f->wb_data = vtophys(&sc->wb_cdata.wb_pad); + f->wb_data = VTOPHYS(&sc->wb_cdata.wb_pad); f->wb_ctl |= WB_TXCTL_TLINK; f->wb_status = WB_TXSTAT_OWN; frag++; @@ -1357,7 +1358,7 @@ int wb_encap(sc, c, m_head) c->wb_mbuf = m_head; c->wb_lastdesc = frag - 1; WB_TXCTL(c) |= WB_TXCTL_LASTFRAG; - WB_TXNEXT(c) = vtophys(&c->wb_nextdesc->wb_ptr->wb_frag[0]); + WB_TXNEXT(c) = VTOPHYS(&c->wb_nextdesc->wb_ptr->wb_frag[0]); return(0); } @@ -1548,7 +1549,7 @@ void wb_init(xsc) * Load the address of the RX list. */ WB_CLRBIT(sc, WB_NETCFG, WB_NETCFG_RX_ON); - CSR_WRITE_4(sc, WB_RXADDR, vtophys(&sc->wb_ldata->wb_rx_list[0])); + CSR_WRITE_4(sc, WB_RXADDR, VTOPHYS(&sc->wb_ldata->wb_rx_list[0])); /* * Enable interrupts. @@ -1561,7 +1562,7 @@ void wb_init(xsc) CSR_WRITE_4(sc, WB_RXSTART, 0xFFFFFFFF); WB_CLRBIT(sc, WB_NETCFG, WB_NETCFG_TX_ON); - CSR_WRITE_4(sc, WB_TXADDR, vtophys(&sc->wb_ldata->wb_tx_list[0])); + CSR_WRITE_4(sc, WB_TXADDR, VTOPHYS(&sc->wb_ldata->wb_tx_list[0])); WB_SETBIT(sc, WB_NETCFG, WB_NETCFG_TX_ON); ifp->if_flags |= IFF_RUNNING; |