public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: linux-kernel@vger.kernel.org, tiwai@suse.de, joerg.roedel@amd.com
Subject: Re: [PATCH] x86: restore the old swiotlb alloc_coherent behavior
Date: Thu, 23 Oct 2008 16:22:43 +0200	[thread overview]
Message-ID: <20081023142243.GA22088@elte.hu> (raw)
In-Reply-To: <20081023231230V.fujita.tomonori@lab.ntt.co.jp>


* FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> wrote:

> This restores the old swiotlb alloc_coherent behavior (before the
> alloc_coherent rewrite):
> 
> http://lkml.org/lkml/2008/8/12/200
> 
> The old alloc_coherent avoids GFP_DMA allocation first and if the
> allocated address is not fit for the device's coherent_dma_mask, then
> dma_alloc_coherent does GFP_DMA allocation. If it fails,
> alloc_coherent calls swiotlb_alloc_coherent (in short, we rarely used
> swiotlb_alloc_coherent).
> 
> After the alloc_coherent rewrite, dma_alloc_coherent
> (include/asm-x86/dma-mapping.h) directly calls swiotlb_alloc_coherent.
> It means that we possibly can't handle a device having dma_masks >
> 24bit < 32bits since swiotlb_alloc_coherent doesn't have the above
> GFP_DMA retry mechanism.
> 
> This patch fixes x86's swiotlb alloc_coherent to use the GFP_DMA retry
> mechanism, which dma_generic_alloc_coherent() provides now
> (pci-nommu.c and GART IOMMU driver also use
> dma_generic_alloc_coherent).
> 
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> ---
>  arch/x86/kernel/pci-swiotlb_64.c |   14 +++++++++++++-
>  1 files changed, 13 insertions(+), 1 deletions(-)

applied to tip/core/urgent (to after the two other iommu related 
patches) - thanks Fujita!

	Ingo

      reply	other threads:[~2008-10-23 14:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-23 14:14 [PATCH] x86: restore the old swiotlb alloc_coherent behavior FUJITA Tomonori
2008-10-23 14:22 ` Ingo Molnar [this message]

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=20081023142243.GA22088@elte.hu \
    --to=mingo@elte.hu \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=joerg.roedel@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.de \
    /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