From: Paul Burton <paul.burton@mips.com>
To: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Cc: Ralf Baechle <ralf@linux-mips.org>,
James Hogan <jhogan@kernel.org>,
linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] mips: Fix mips_dma_map_sg by using correct dma mapping function
Date: Wed, 11 Jul 2018 09:03:42 -0700 [thread overview]
Message-ID: <20180711160342.ddvlqvjp3smwyido@pburton-laptop> (raw)
In-Reply-To: <20180711113852.2734-1-tbogendoerfer@suse.de>
Hi Thomas,
On Wed, Jul 11, 2018 at 01:38:51PM +0200, Thomas Bogendoerfer wrote:
> sg list elements could cover more than one page of data. Therefore
> using plat_map_dma_mem_page() doesn't work for platforms, which have
> IOMMU functionality hidden behind plat_map_dma_XXX functions.
>
> Fixes: e36863a550da ("MIPS: HIGHMEM DMA on noncoherent MIPS32 processors")
> Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
> ---
> arch/mips/mm/dma-default.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c
> index f9fef0028ca2..2718185a3d38 100644
> --- a/arch/mips/mm/dma-default.c
> +++ b/arch/mips/mm/dma-default.c
> @@ -288,8 +288,8 @@ static int mips_dma_map_sg(struct device *dev, struct scatterlist *sglist,
> #ifdef CONFIG_NEED_SG_DMA_LENGTH
> sg->dma_length = sg->length;
> #endif
> - sg->dma_address = plat_map_dma_mem_page(dev, sg_page(sg)) +
> - sg->offset;
> + sg->dma_address = plat_map_dma_mem(dev, sg_virt(sg),
> + sg->length);
> }
>
> return nents;
This doesn't apply after Christoph's massive MIPS DMA cleanup which can
be found in mips-next (or linux-next). After this work we end up using
the generic dma_direct_map_sg() on most systems, and the code above has
been removed.
Thanks,
Paul
next prev parent reply other threads:[~2018-07-11 16:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-11 11:38 [PATCH 1/2] mips: Fix mips_dma_map_sg by using correct dma mapping function Thomas Bogendoerfer
2018-07-11 11:38 ` [PATCH 2/2] mips/jazz: provide dma_mask/coherent_dma_mask for platform devices Thomas Bogendoerfer
2018-07-11 16:15 ` Paul Burton
2018-07-11 20:52 ` Thomas Bogendoerfer
2018-07-11 16:03 ` Paul Burton [this message]
2018-07-11 20:50 ` [PATCH 1/2] mips: Fix mips_dma_map_sg by using correct dma mapping function Thomas Bogendoerfer
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=20180711160342.ddvlqvjp3smwyido@pburton-laptop \
--to=paul.burton@mips.com \
--cc=jhogan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=tbogendoerfer@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;
as well as URLs for NNTP newsgroup(s).