From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Linus Walleij <linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
Dan Williams
<dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
yuanyabin1978-k+cT0dCbe1g@public.gmane.org
Subject: Re: [PATCH] SPI: remove superfluous DMA buffer syncs on PL022
Date: Tue, 17 Aug 2010 22:15:29 -0600 [thread overview]
Message-ID: <AANLkTi=T89ZZo0m2hYaW9dJ7MKd9GLEDVZpcqZ-3RcNq@mail.gmail.com> (raw)
In-Reply-To: <1282082924-25809-1-git-send-email-linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
On Tue, Aug 17, 2010 at 4:08 PM, Linus Walleij
<linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org> wrote:
> This removes the superfluous DMA buffer syncs identified by Russell
> in the DMA support for PL022.
>
> Cc: yuanyabin1978-k+cT0dCbe1g@public.gmane.org
> Cc: Dan Williams <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Cc: Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
> Signed-off-by: Linus Walleij <linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
I haven't actually pushed out the spi-test branch yet. Shall I squash
this patch into the previous one?
g.
> ---
> drivers/spi/amba-pl022.c | 16 +++++-----------
> 1 files changed, 5 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c
> index 59b3948..521d3d9 100644
> --- a/drivers/spi/amba-pl022.c
> +++ b/drivers/spi/amba-pl022.c
> @@ -794,12 +794,7 @@ static void dma_callback(void *data)
> struct pl022 *pl022 = data;
> struct spi_message *msg = pl022->cur_msg;
>
> - /* Sync in RX buffer to CPU */
> BUG_ON(!pl022->sgt_rx.sgl);
> - dma_sync_sg_for_cpu(&pl022->adev->dev,
> - pl022->sgt_rx.sgl,
> - pl022->sgt_rx.nents,
> - DMA_FROM_DEVICE);
>
> #ifdef VERBOSE_DEBUG
> /*
> @@ -812,6 +807,11 @@ static void dma_callback(void *data)
> struct scatterlist *sg;
> unsigned int i;
>
> + dma_sync_sg_for_cpu(&pl022->adev->dev,
> + pl022->sgt_rx.sgl,
> + pl022->sgt_rx.nents,
> + DMA_FROM_DEVICE);
> +
> for_each_sg(pl022->sgt_rx.sgl, sg, pl022->sgt_rx.nents, i) {
> dev_dbg(&pl022->adev->dev, "SPI RX SG ENTRY: %d", i);
> print_hex_dump(KERN_ERR, "SPI RX: ",
> @@ -1001,12 +1001,6 @@ static int configure_dma(struct pl022 *pl022)
> if (sglen != pages)
> goto err_tx_sgmap;
>
> - /* Synchronize the TX scatterlist, invalidate buffers, caches etc */
> - dma_sync_sg_for_device(&pl022->adev->dev,
> - pl022->sgt_tx.sgl,
> - pl022->sgt_tx.nents,
> - DMA_TO_DEVICE);
> -
> /* Send both scatterlists */
> rxdesc = rxchan->device->device_prep_slave_sg(rxchan,
> pl022->sgt_rx.sgl,
> --
> 1.6.3.3
>
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
prev parent reply other threads:[~2010-08-18 4:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-17 22:08 [PATCH] SPI: remove superfluous DMA buffer syncs on PL022 Linus Walleij
[not found] ` <1282082924-25809-1-git-send-email-linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
2010-08-18 4:15 ` Grant Likely [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='AANLkTi=T89ZZo0m2hYaW9dJ7MKd9GLEDVZpcqZ-3RcNq@mail.gmail.com' \
--to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
--cc=dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=yuanyabin1978-k+cT0dCbe1g@public.gmane.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).