public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ccio_clear_io_tlb() don't need to compute io page number a second time.
@ 2008-07-19 21:34 Joel Soete
  2008-07-20  2:27 ` Kyle McMartin
  0 siblings, 1 reply; 2+ messages in thread
From: Joel Soete @ 2008-07-19 21:34 UTC (permalink / raw)
  To: Kyle McMartin, linux-parisc; +Cc: linux-kernel

Hello Kyle,

In ccio-dma.c, I noticed that eventhought the prototype of the function ccio_clear_io_tlb() is:
static CCIO_INLINE void
ccio_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:
--- a/drivers/parisc/ccio-dma.c	2008-07-19 21:17:37.000000000 +0000
+++ b/drivers/parisc/ccio-dma.c	2008-07-19 21:32:54.000000000 +0000
@@ -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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ccio_clear_io_tlb() don't need to compute io page number a second time.
  2008-07-19 21:34 [PATCH] ccio_clear_io_tlb() don't need to compute io page number a second time Joel Soete
@ 2008-07-20  2:27 ` Kyle McMartin
  0 siblings, 0 replies; 2+ messages in thread
From: Kyle McMartin @ 2008-07-20  2:27 UTC (permalink / raw)
  To: Joel Soete; +Cc: Kyle McMartin, linux-parisc, linux-kernel

On Sat, Jul 19, 2008 at 09:34:08PM +0000, Joel Soete wrote:
> --- a/drivers/parisc/ccio-dma.c	2008-07-19 21:17:37.000000000 +0000
> +++ b/drivers/parisc/ccio-dma.c	2008-07-19 21:32:54.000000000 +0000
> @@ -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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-20  2:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-19 21:34 [PATCH] ccio_clear_io_tlb() don't need to compute io page number a second time Joel Soete
2008-07-20  2:27 ` Kyle McMartin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox