All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Soete <soete.joel@scarlet.be>
To: Kyle McMartin <kyle@mcmartin.ca>, linux-parisc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] ccio_clear_io_tlb() don't need to compute io page number a second time.
Date: Sat, 19 Jul 2008 21:34:08 +0000	[thread overview]
Message-ID: <48825DD0.5000308@scarlet.be> (raw)

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.

             reply	other threads:[~2008-07-19 21:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-19 21:34 Joel Soete [this message]
2008-07-20  2:27 ` [PATCH] ccio_clear_io_tlb() don't need to compute io page number a second time Kyle McMartin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48825DD0.5000308@scarlet.be \
    --to=soete.joel@scarlet.be \
    --cc=kyle@mcmartin.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.