diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-05-04 16:48:38 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-05-04 16:48:38 +0000 |
commit | 5209861d10cd766cefa846d3a6e7ecf159f42f92 (patch) | |
tree | 51feefc69e29550c5c7fe3e3864a5324ba1b2339 /sys/arch/sparc64/dev/viommu.c | |
parent | b373e1ad159aca062f6df1229b3173663d295088 (diff) |
type pedantry.
the type we bind to an iommu or a GART is paddr_t, by definition, on the
other hand, the type we get out of it is not a vaddr_t, it's bus_addr_t.
fix up sparc64 iommu, amd64 iommu and the sg_dma backedn that uses it to
realise this.
ok kettenis@
Diffstat (limited to 'sys/arch/sparc64/dev/viommu.c')
-rw-r--r-- | sys/arch/sparc64/dev/viommu.c | 22 |
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; |