diff options
author | tmm <tmm@FreeBSD.org> | 2002-04-02 17:41:06 +0000 |
---|---|---|
committer | tmm <tmm@FreeBSD.org> | 2002-04-02 17:41:06 +0000 |
commit | 721449cf80c44454b6a5c8b1b95db957f9dbf68b (patch) | |
tree | 4af1981104a2afed67cdae2e83e9591dfa559a00 /sys | |
parent | 7e32437fbb072e6d9e6a1ff32c2ab20764e90ff9 (diff) | |
download | FreeBSD-src-721449cf80c44454b6a5c8b1b95db957f9dbf68b.zip FreeBSD-src-721449cf80c44454b6a5c8b1b95db957f9dbf68b.tar.gz |
Remove the superfluous second argument from the IOTSBSLOT() macro.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sparc64/include/iommureg.h | 2 | ||||
-rw-r--r-- | sys/sparc64/sparc64/iommu.c | 30 |
2 files changed, 16 insertions, 16 deletions
diff --git a/sys/sparc64/include/iommureg.h b/sys/sparc64/include/iommureg.h index 1507ab4..d21ad83 100644 --- a/sys/sparc64/include/iommureg.h +++ b/sys/sparc64/include/iommureg.h @@ -162,7 +162,7 @@ (((pa) & IOTTE_PAMASK) | ((w) ? IOTTE_W : 0) | \ ((c) ? IOTTE_C : 0) | ((s) ? IOTTE_STREAM : 0) | \ (IOTTE_V | IOTTE_8K)) -#define IOTSBSLOT(va,sz) \ +#define IOTSBSLOT(va) \ ((u_int)(((vm_offset_t)(va)) - (is->is_dvmabase)) >> IO_PAGE_SHIFT) #endif /* !_MACHINE_IOMMUREG_H_ */ diff --git a/sys/sparc64/sparc64/iommu.c b/sys/sparc64/sparc64/iommu.c index 897879e..c7acdf4 100644 --- a/sys/sparc64/sparc64/iommu.c +++ b/sys/sparc64/sparc64/iommu.c @@ -341,12 +341,12 @@ iommu_enter(struct iommu_state *is, vm_offset_t va, vm_offset_t pa, int flags) iommu_strbuf_flush_done(is); } DPRINTF(IDB_IOMMU, ("Clearing TSB slot %d for va %p\n", - (int)IOTSBSLOT(va, is->is_tsbsize), (void *)(u_long)va)); - is->is_tsb[IOTSBSLOT(va, is->is_tsbsize)] = tte; + (int)IOTSBSLOT(va), (void *)(u_long)va)); + is->is_tsb[IOTSBSLOT(va)] = tte; IOMMU_WRITE8(is, is_iommu, IMR_FLUSH, va); DPRINTF(IDB_IOMMU, ("iommu_enter: va %lx pa %lx TSB[%lx]@%p=%lx\n", - va, (long)pa, (u_long)IOTSBSLOT(va, is->is_tsbsize), - (void *)(u_long)&is->is_tsb[IOTSBSLOT(va, is->is_tsbsize)], + va, (long)pa, (u_long)IOTSBSLOT(va), + (void *)(u_long)&is->is_tsb[IOTSBSLOT(va)], (u_long)tte)); #ifdef IOMMU_DIAG iommu_diag(is, va); @@ -379,20 +379,20 @@ iommu_remove(struct iommu_state *is, vm_offset_t va, vm_size_t len) va = trunc_io_page(va); DPRINTF(IDB_IOMMU, ("iommu_remove: va %lx TSB[%lx]@%p\n", - va, (u_long)IOTSBSLOT(va, is->is_tsbsize), - &is->is_tsb[IOTSBSLOT(va, is->is_tsbsize)])); + va, (u_long)IOTSBSLOT(va), + &is->is_tsb[IOTSBSLOT(va)])); while (len > 0) { DPRINTF(IDB_IOMMU, ("iommu_remove: clearing TSB slot %d for va " - "%p size %lx\n", (int)IOTSBSLOT(va, is->is_tsbsize), + "%p size %lx\n", (int)IOTSBSLOT(va), (void *)(u_long)va, (u_long)len)); if (is->is_sb[0] != 0 || is->is_sb[1] != 0) { DPRINTF(IDB_IOMMU, ("iommu_remove: flushing va %p " "TSB[%lx]@%p=%lx, %lu bytes left\n", (void *)(u_long)va, - (long)IOTSBSLOT(va, is->is_tsbsize), + (long)IOTSBSLOT(va), (void *)(u_long)&is->is_tsb[ - IOTSBSLOT(va, is->is_tsbsize)], - (long)(is->is_tsb[IOTSBSLOT(va, is->is_tsbsize)]), + IOTSBSLOT(va)], + (long)(is->is_tsb[IOTSBSLOT(va)]), (u_long)len)); iommu_strbuf_flush(is, va); if (len <= IO_PAGE_SIZE) @@ -400,10 +400,10 @@ iommu_remove(struct iommu_state *is, vm_offset_t va, vm_size_t len) DPRINTF(IDB_IOMMU, ("iommu_remove: flushed va %p " "TSB[%lx]@%p=%lx, %lu bytes left\n", (void *)(u_long)va, - (long)IOTSBSLOT(va, is->is_tsbsize), + (long)IOTSBSLOT(va), (void *)(u_long)&is->is_tsb[ - IOTSBSLOT(va,is->is_tsbsize)], - (long)(is->is_tsb[IOTSBSLOT(va, is->is_tsbsize)]), + IOTSBSLOT(va)], + (long)(is->is_tsb[IOTSBSLOT(va)]), (u_long)len)); } @@ -412,7 +412,7 @@ iommu_remove(struct iommu_state *is, vm_offset_t va, vm_size_t len) else len -= IO_PAGE_SIZE; - is->is_tsb[IOTSBSLOT(va, is->is_tsbsize)] = 0; + is->is_tsb[IOTSBSLOT(va)] = 0; IOMMU_WRITE8(is, is_iommu, IMR_FLUSH, va); va += IO_PAGE_SIZE; } @@ -844,7 +844,7 @@ iommu_diag(struct iommu_state *is, vm_offset_t va) IOMMU_WRITE8(is, is_dva, 0, trunc_io_page(va)); membar(StoreStore | StoreLoad); printf("iommu_diag: tte entry %#lx", - is->is_tsb[IOTSBSLOT(va, is->is_tsbsize)]); + is->is_tsb[IOTSBSLOT(va)]); if (is->is_dtcmp != 0) { printf(", tag compare register is %#lx\n" IOMMU_READ8(is, is_dtcmp, 0)); |