From: Thomas Gleixner <tglx@linutronix.de>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: linux-kernel@vger.kernel.org,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
Jeremy Fitzhardinge <jeremy@goop.org>,
x86@kernel.org
Subject: Re: [PATCH 03/11] x86: use dma_map_range when allocating PCI DMA memory
Date: Wed, 3 Jun 2009 00:07:17 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.00.0906030000410.3419@localhost.localdomain> (raw)
In-Reply-To: <1243870383-12954-4-git-send-email-ian.campbell@citrix.com>
On Mon, 1 Jun 2009, Ian Campbell wrote:
> This function is intended to replaces is_buffer_dma_capable with a
> more generic interface.
-ENOPARSE
Which function ? What means "is intended to replaces" ? Is it intended
or does it replace something ? What is the "more generic interface" ?
dma_map_range() has been introduced in patch 2/11 so it would be nice
to have a reference to that change and take the existance of
dma_map_range() as granted. There is no intention. We replace function
A with function B and the blurb about intention and more generic
interface is useless and confusing.
Thanks,
tglx
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> Cc: Jeremy Fitzhardinge <jeremy@goop.org>
> Cc: x86@kernel.org
> ---
> arch/x86/kernel/pci-dma.c | 5 +----
> 1 files changed, 1 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
> index f4c1b03..458b7b5 100644
> --- a/arch/x86/kernel/pci-dma.c
> +++ b/arch/x86/kernel/pci-dma.c
> @@ -160,7 +160,6 @@ void *dma_generic_alloc_coherent(struct device *dev, size_t size,
> {
> unsigned long dma_mask;
> struct page *page;
> - dma_addr_t addr;
>
> dma_mask = dma_alloc_coherent_mask(dev, flag);
>
> @@ -170,8 +169,7 @@ again:
> if (!page)
> return NULL;
>
> - addr = page_to_phys(page);
> - if (!is_buffer_dma_capable(dma_mask, addr, size)) {
> + if (!dma_map_range(dev, dma_mask, page_to_phys(page), size, dma_addr)) {
> __free_pages(page, get_order(size));
>
> if (dma_mask < DMA_BIT_MASK(32) && !(flag & GFP_DMA)) {
> @@ -182,7 +180,6 @@ again:
> return NULL;
> }
>
> - *dma_addr = addr;
> return page_address(page);
> }
>
> --
> 1.5.6.5
>
next prev parent reply other threads:[~2009-06-02 22:13 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-01 15:32 [PATCH 00/11] swiotlb: Introduce architecture-specific APIs to replace __weak functions (v2) Ian Campbell
2009-06-01 15:32 ` [PATCH 01/11] ia64: introduce arch-specific dma-mapping interfaces Ian Campbell
2009-06-02 4:08 ` FUJITA Tomonori
2009-06-02 9:18 ` Ian Campbell
2009-06-01 15:32 ` [PATCH 02/11] x86: introduce arch-specific dma-mapping interface Ian Campbell
2009-06-02 4:08 ` FUJITA Tomonori
2009-06-01 15:32 ` [PATCH 03/11] x86: use dma_map_range when allocating PCI DMA memory Ian Campbell
2009-06-02 22:07 ` Thomas Gleixner [this message]
2009-06-01 15:32 ` [PATCH 04/11] x86: use dma_map_range when allocating PCI DMA memory with no IOMMU Ian Campbell
2009-06-01 15:32 ` [PATCH 05/11] x86: use dma_map_range when allocating PCI GART memory Ian Campbell
2009-06-02 22:08 ` Thomas Gleixner
2009-06-01 15:32 ` [PATCH 06/11] swiotlb: use dma_to_phys and phys_to_dma Ian Campbell
2009-06-01 15:32 ` [PATCH 07/11] swiotlb: use dma_map_range Ian Campbell
2009-06-01 15:33 ` [PATCH 08/11] swiotlb: support HIGHMEM in swiotlb_bus_to_virt Ian Campbell
2009-06-01 15:33 ` [PATCH 09/11] swiotlb: rename swiotlb_virt_to_bus as virt_to_dma Ian Campbell
2009-06-01 15:33 ` [PATCH 10/11] swiotlb: remove __weak swiotlb_alloc* hooks Ian Campbell
2009-06-01 15:33 ` [PATCH 11/11] swiotlb: allow initialisation with pre-allocated bounce-buffer Ian Campbell
2009-06-02 4:08 ` FUJITA Tomonori
2009-06-02 9:27 ` Ian Campbell
2009-07-10 5:55 ` [PATCH 00/11] swiotlb: Introduce architecture-specific APIs to replace __weak functions (v2) Benjamin Herrenschmidt
2009-07-10 14:02 ` Ian Campbell
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=alpine.LFD.2.00.0906030000410.3419@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=ian.campbell@citrix.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®