From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, Paul Mackerras <paulus@samba.org>,
Milton Miller <miltonm@bga.com>
Subject: Re: [PATCH 14/15] ppc64 iommu: use coherent_dma_mask for alloc_coherent
Date: Mon, 29 Nov 2010 11:58:16 +1100 [thread overview]
Message-ID: <1290992296.32570.215.camel@pasglop> (raw)
In-Reply-To: <1284573958-8397-15-git-send-email-nacc@us.ibm.com>
On Wed, 2010-09-15 at 11:05 -0700, Nishanth Aravamudan wrote:
> The IOMMU code has been passing the dma-mask instead of the
> coherent_dma_mask to the iommu allocator. Coherent allocations should
> be made using the coherent_dma_mask.
Won't that break macio devices too ? afaik, they don't set
coherent_dma_mask. Have you tried booting on a G5 with iommu enabled ?
(It may not be broken, just asking...)
Cheers,
Ben.
> Signed-off-by: Milton Miller <miltonm@bga.com>
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> ---
> We currently don't check the mask other than to warn when its being set,
> so I don't think this is stable material.
> ---
> arch/powerpc/kernel/dma-iommu.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c
> index 6e54a0f..e755415 100644
> --- a/arch/powerpc/kernel/dma-iommu.c
> +++ b/arch/powerpc/kernel/dma-iommu.c
> @@ -19,7 +19,7 @@ static void *dma_iommu_alloc_coherent(struct device *dev, size_t size,
> dma_addr_t *dma_handle, gfp_t flag)
> {
> return iommu_alloc_coherent(dev, get_iommu_table_base(dev), size,
> - dma_handle, device_to_mask(dev), flag,
> + dma_handle, dev->coherent_dma_mask, flag,
> dev_to_node(dev));
> }
>
next prev parent reply other threads:[~2010-11-29 3:04 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1284573958-8397-1-git-send-email-nacc@us.ibm.com>
2010-09-15 18:05 ` [PATCH 02/15] ppc64: fix dma_iommu_dma_supported compare Nishanth Aravamudan
2010-09-15 18:05 ` [PATCH 03/15] ppc64 iommu: fix check for direct DMA support Nishanth Aravamudan
2010-09-15 18:05 ` [PATCH 04/15] vio: put device on device_register failure Nishanth Aravamudan
2010-09-15 18:29 ` Grant Likely
2010-09-15 18:05 ` [PATCH 05/15] viobus: free TCE table on device release Nishanth Aravamudan
2010-09-15 18:05 ` [PATCH 06/15] pseries/dlpar: use kmemdup Nishanth Aravamudan
2010-09-15 18:05 ` [PATCH 07/15] ppc: pci-common cleanup Nishanth Aravamudan
2010-09-15 18:30 ` Grant Likely
2010-09-15 18:05 ` [PATCH 09/15] ppc/vio: use dma ops helpers Nishanth Aravamudan
2010-09-15 18:33 ` Grant Likely
2010-10-13 4:56 ` Benjamin Herrenschmidt
2010-10-13 17:43 ` Nishanth Aravamudan
2010-09-15 18:05 ` [PATCH 10/15] ppc/pasemi: clean up pasemi iommu table initializations Nishanth Aravamudan
2010-09-15 18:29 ` Olof Johansson
2010-09-15 18:05 ` [PATCH 11/15] ppc/cell: beat dma ops cleanup Nishanth Aravamudan
2010-09-16 11:23 ` Arnd Bergmann
2010-09-15 18:05 ` [PATCH 12/15] ppc/dart: iommu table cleanup Nishanth Aravamudan
2010-09-15 18:05 ` [PATCH 13/15] ppc/pseries: iommu cleanup Nishanth Aravamudan
2010-09-15 18:34 ` Grant Likely
2010-09-15 18:05 ` [PATCH 14/15] ppc64 iommu: use coherent_dma_mask for alloc_coherent Nishanth Aravamudan
2010-11-29 0:58 ` Benjamin Herrenschmidt [this message]
2010-12-01 0:31 ` Nishanth Aravamudan
2010-09-15 18:05 ` [PATCH 15/15] ppc/vio: ensure dma_coherent_mask is set Nishanth Aravamudan
2010-09-15 18:37 ` Grant Likely
2010-09-15 18:44 ` Nishanth Aravamudan
2010-09-15 18:49 ` Grant Likely
2010-11-29 1:02 ` Benjamin Herrenschmidt
2010-11-29 19:46 ` Nishanth Aravamudan
2010-11-29 20:25 ` Benjamin Herrenschmidt
2010-09-15 18:13 ` [PATCH 01/15] ppc: fix return type of BUID_{HI,LO} macros Nishanth Aravamudan
2010-09-16 22:54 ` Linas Vepstas
2010-09-16 23:04 ` Scott Wood
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=1290992296.32570.215.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=miltonm@bga.com \
--cc=nacc@us.ibm.com \
--cc=paulus@samba.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).