summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev/viommu.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/sparc64/dev/viommu.c')
-rw-r--r--sys/arch/sparc64/dev/viommu.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/arch/sparc64/dev/viommu.c b/sys/arch/sparc64/dev/viommu.c
index ca63d2c8148..b1d34106af2 100644
--- a/sys/arch/sparc64/dev/viommu.c
+++ b/sys/arch/sparc64/dev/viommu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: viommu.c,v 1.6 2009/05/03 13:44:05 kettenis Exp $ */
+/* $OpenBSD: viommu.c,v 1.7 2009/05/04 16:48:37 oga Exp $ */
/* $NetBSD: iommu.c,v 1.47 2002/02/08 20:03:45 eeh Exp $ */
/*
@@ -75,9 +75,9 @@ extern int iommudebug;
#define DPRINTF(l, s)
#endif
-void viommu_enter(struct iommu_state *, struct strbuf_ctl *, vaddr_t, paddr_t,
- int);
-void viommu_remove(struct iommu_state *, struct strbuf_ctl *, vaddr_t);
+void viommu_enter(struct iommu_state *, struct strbuf_ctl *, bus_addr_t,
+ paddr_t, int);
+void viommu_remove(struct iommu_state *, struct strbuf_ctl *, bus_addr_t);
int viommu_dvmamap_load_seg(bus_dma_tag_t, struct iommu_state *,
bus_dmamap_t, bus_dma_segment_t *, int, int, bus_size_t, bus_size_t);
int viommu_dvmamap_load_mlist(bus_dma_tag_t, struct iommu_state *,
@@ -85,9 +85,9 @@ int viommu_dvmamap_load_mlist(bus_dma_tag_t, struct iommu_state *,
int viommu_dvmamap_append_range(bus_dma_tag_t, bus_dmamap_t, paddr_t,
bus_size_t, int, bus_size_t);
int iommu_iomap_insert_page(struct iommu_map_state *, paddr_t);
-vaddr_t iommu_iomap_translate(struct iommu_map_state *, paddr_t);
+bus_addr_t iommu_iomap_translate(struct iommu_map_state *, paddr_t);
void viommu_iomap_load_map(struct iommu_state *, struct iommu_map_state *,
- vaddr_t, int);
+ bus_addr_t, int);
void viommu_iomap_unload_map(struct iommu_state *, struct iommu_map_state *);
struct iommu_map_state *viommu_iomap_create(int);
void iommu_iomap_destroy(struct iommu_map_state *);
@@ -136,7 +136,7 @@ viommu_init(char *name, struct iommu_state *is, int tsbsize,
* Add an entry to the IOMMU table.
*/
void
-viommu_enter(struct iommu_state *is, struct strbuf_ctl *sb, vaddr_t va,
+viommu_enter(struct iommu_state *is, struct strbuf_ctl *sb, bus_addr_t va,
paddr_t pa, int flags)
{
u_int64_t tsbid = IOTSBSLOT(va, is->is_tsbsize);
@@ -170,7 +170,7 @@ viommu_enter(struct iommu_state *is, struct strbuf_ctl *sb, vaddr_t va,
* Remove an entry from the IOMMU table.
*/
void
-viommu_remove(struct iommu_state *is, struct strbuf_ctl *sb, vaddr_t va)
+viommu_remove(struct iommu_state *is, struct strbuf_ctl *sb, bus_addr_t va)
{
u_int64_t tsbid = IOTSBSLOT(va, is->is_tsbsize);
u_int64_t ndemapped;
@@ -319,7 +319,7 @@ viommu_dvmamap_load(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map,
iommu_iomap_clear_pages(ims);
{ /* Scope */
bus_addr_t a, aend;
- bus_addr_t addr = (vaddr_t)buf;
+ bus_addr_t addr = (bus_addr_t)buf;
int seg_len = buflen;
aend = round_page(addr + seg_len);
@@ -386,7 +386,7 @@ viommu_dvmamap_load(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map,
{ /* Scope */
bus_addr_t a, aend;
- bus_addr_t addr = (vaddr_t)buf;
+ bus_addr_t addr = (bus_addr_t)buf;
int seg_len = buflen;
aend = round_page(addr + seg_len);
@@ -926,7 +926,7 @@ viommu_iomap_create(int n)
*/
void
viommu_iomap_load_map(struct iommu_state *is, struct iommu_map_state *ims,
- vaddr_t vmaddr, int flags)
+ bus_addr_t vmaddr, int flags)
{
struct iommu_page_map *ipm = &ims->ims_map;
struct iommu_page_entry *e;