ccio_clear_io_tlb() don't need to compute io page number a second time.
PATCH 1/1 ccio_clear_io_tlb() don't need to compute io page number a second time.
Hello Kyle,
In ccio-dma.c, I noticed that eventhought the prototype of the function ccio_clear_io_tlb() is:
static CCIO_INLINE voidccio_clear_io_tlb(struct ioc *ioc, dma_addr_t iovp, size_t byte_cnt)
i.e. the second arg being iovp (afaik the io virtual page number) deduced from the iova (io virtual address)
it's so useless to:
iovp &= IOVP_MASK; /* clear offset bits, just want pagenum */
and the only place where it's called is:
ccio_clear_io_tlb(ioc, CCIO_IOVP(iova), saved_byte_cnt);
it's well an iovp given the macro definition:
#define CCIO_IOVP(iova) ((iova) & IOVP_MASK)
May I so suggest following patch:
drivers/parisc/ccio-dma.c +0 -1
@@ -643,7 +643,6 @@ {u32 chain_size =1 << ioc->chainid_shift; - iovp &=IOVP_MASK ;/* clear offset bits, just want pagenum */ byte_cnt += chain_size;while (byte_cnt > chain_size) {
=== <> ===
Tia,
J.
Kyle McMartin
Applieddrivers/parisc/ccio-dma.c line 648
Quoted 10 lines · Joel Soete
drivers/parisc/ccio-dma.c +0
-1@@ -643,7 +643,6 @@ {u32 chain_size =1 << ioc->chainid_shift; - iovp &=IOVP_MASK ;/* clear offset bits, just want pagenum */ byte_cnt += chain_size;while (byte_cnt > chain_size) {
applied.