public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Becky Bruce <beckyb@kernel.crashing.org>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
	linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org,
	Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: [PATCH V2 2/3] powerpc: Add support for swiotlb on 32-bit
Date: Thu, 21 May 2009 13:18:54 -0700	[thread overview]
Message-ID: <4A15B72E.2070202@goop.org> (raw)
In-Reply-To: <E6DAA792-9923-4B76-9759-6955AABE3EAB@kernel.crashing.org>

Becky Bruce wrote:
> I can work with that, but it's going to be a bit inefficient, as I 
> actually need the dma_addr_t, not the phys_addr_t, so I'll have to 
> convert.  In every case, this is a conversion I've already done and 
> that I need in the calling code as well.  Can we pass in both the 
> phys_addr_t and the dma_addr_t?

The Xen implementation would needs to do the phys to bus conversion page 
by page anyway, so it wouldn't help much.  But it also wouldn't hurt.

How expensive is the phys-to-bus conversion on power?  Is it worth 
making the interface more complex for?  Would passing phys+bus mean that 
we wouldn't also need to pass dev?

> We have both in every case but one, which is in swiotlb_map_page where 
> we call address_needs_mapping() without calling range_needs_mapping.  
> It's not actually clear to me that we need that check, though.  Can 
> someone explain what case that was designed to catch?

It called them together a little earlier in the function, and the phys 
address is still available.

I guess the test is checking for a bad implementation of map_single().  
I found a single instance of someone reporting the message (in 2.6.11, 
when swiotlb was ia64-specific: http://lkml.org/lkml/2008/3/3/249).  
panic() is an odd way to handle an error (even an one which is an 
implementation bug), but I guess it's better than scribbling on the 
wrong memory.

    J

  parent reply	other threads:[~2009-05-21 20:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1242340949-16369-1-git-send-email-beckyb@kernel.crashing.org>
     [not found] ` <1242340949-16369-2-git-send-email-beckyb@kernel.crashing.org>
2009-05-19  5:27   ` [PATCH V2 2/3] powerpc: Add support for swiotlb on 32-bit FUJITA Tomonori
2009-05-19 20:57     ` Becky Bruce
2009-05-21 17:43       ` Jeremy Fitzhardinge
2009-05-21 18:27         ` Becky Bruce
2009-05-21 19:01           ` Ian Campbell
2009-05-22 10:51             ` FUJITA Tomonori
2009-05-21 20:18           ` Jeremy Fitzhardinge [this message]
2009-05-21 22:08             ` Ian Campbell
2009-05-22 10:51             ` FUJITA Tomonori
2009-05-27 19:05               ` Becky Bruce
2009-05-22 11:11           ` Ian Campbell
2009-05-22 23:55             ` Jeremy Fitzhardinge
2009-05-23 22:59               ` Leon Woestenberg
2009-05-26 12:51               ` Ian Campbell
2009-05-27 19:11                 ` Becky Bruce
2009-05-27 19:05             ` Becky Bruce
2009-05-27 20:29               ` Ian Campbell
2009-05-27 22:11                 ` Becky Bruce

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=4A15B72E.2070202@goop.org \
    --to=jeremy@goop.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=beckyb@kernel.crashing.org \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox