linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Leon Woestenberg <leon.woestenberg@gmail.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Ian Campbell <Ian.Campbell@eu.citrix.com>,
	FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>
Subject: Re: [PATCH V2 2/3] powerpc: Add support for swiotlb on 32-bit
Date: Sun, 24 May 2009 00:59:26 +0200	[thread overview]
Message-ID: <c384c5ea0905231559i5ffb0637te62ee005074f9435@mail.gmail.com> (raw)
In-Reply-To: <4A173B72.5000201@goop.org>

Hello,

On Sat, May 23, 2009 at 1:55 AM, Jeremy Fitzhardinge <jeremy@goop.org> wrot=
e:
> Ian Campbell wrote:
>>
>> On Thu, 2009-05-21 at 14:27 -0400, Becky Bruce wrote:
>>
>>>
>>> I can work with that, but it's going to be a bit inefficient, as I
>>> =A0actually need the dma_addr_t, not the phys_addr_t, so I'll have to
>>> =A0convert. =A0In every case, this is a conversion I've already done an=
d =A0that I
>>> need in the calling code as well.
>>
>> Does
>>
>> =A0 =A0dma_addr_t dma_map_range(struct device *hwdev, phys_addr_t addr,
>> =A0 =A0size_t size);
>>
>> work for you?
>>
>> If the range does not need mapping then it returns the dma address, if
>> you needed to calculate the dma address anyway to figure out if mapping
>> is required then this is fine. If the range does need mapping then it
>> returns NULL.
>>
>
> My only concern is whether dma_addr_t =3D=3D 0 is actually equivalent to =
NULL.
> =A0That is, can we be sure that address 0 will never be used?
>
Indeed, I remember seeing 0 returned on pci_alloc_coherent() as an
address (cookie).

Regards,
--=20
Leon

  reply	other threads:[~2009-05-23 23:07 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-14 22:42 [PATCH V2 1/3] powerpc: Use sg->dma_length in sg_dma_len() macro on 32-bit Becky Bruce
2009-05-14 22:42 ` [PATCH V2 2/3] powerpc: Add support for swiotlb " Becky Bruce
2009-05-14 22:42   ` [PATCH V2 3/3] powerpc: Add 86xx support for SWIOTLB Becky Bruce
2009-05-15  4:49   ` [PATCH V2 2/3] powerpc: Add support for swiotlb on 32-bit Kumar Gala
2009-05-18  4:49   ` Benjamin Herrenschmidt
2009-05-18 13:25     ` Kumar Gala
2009-05-18 21:49       ` Benjamin Herrenschmidt
2009-05-19 13:04         ` Kumar Gala
2009-05-19 20:06           ` Becky Bruce
2009-05-28  4:42           ` Kumar Gala
2009-05-28  6:11             ` Benjamin Herrenschmidt
2009-05-28 13:06               ` Kumar Gala
2009-05-19  5:27   ` 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
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 [this message]
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=c384c5ea0905231559i5ffb0637te62ee005074f9435@mail.gmail.com \
    --to=leon.woestenberg@gmail.com \
    --cc=Ian.Campbell@eu.citrix.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=jeremy@goop.org \
    --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;
as well as URLs for NNTP newsgroup(s).