linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Alexander Stein <alexander.stein@systec-electronic.com>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Anatolij Gustschin <agust@denx.de>
Subject: Re: [PATCH 1/2] ads7846: Make buffers in ads7846_read12_ser and ads7845_read12_ser DMA save
Date: Wed, 04 May 2011 16:55:04 +0100	[thread overview]
Message-ID: <4DC176D8.70900@cam.ac.uk> (raw)
In-Reply-To: <4DC175A4.6060401@cam.ac.uk>

On 05/04/11 16:49, Jonathan Cameron wrote:
> On 05/04/11 16:22, Alexander Stein wrote:
>> req.sample needs its own cacheline otherwise accessing req.msg fetches
>> it in again.
>> Put req onto stack as it doesn't need to be DMA save.
>> req.sample is kzalloced itself for DMA access.
>> req.command doesn't need own cache line because it will only be written to
>> memory on dma_map_single. req.scratch is unsed at all.
>>
>> Note: This effect doesn't occur if the underlying SPI driver doesn't use
>> DMA at all.
>>
> How about using ____cacheline_aligned having moved 'sample' to the end of the
> structure?
> 
> e.g.
> 
> ...
> struct spi_transfer xfer[6];
> __be16  sample ____cacheline_aligned;
> }
hmm. I should probably have glanced further up the thread. Michael beat me to it
with the same suggestion!

  reply	other threads:[~2011-05-04 15:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-04 14:02 ads7846: ads7846_read12_ser is not DMA save Alexander Stein
2011-05-04 14:17 ` Hennerich, Michael
2011-05-04 15:22   ` [PATCH 1/2] ads7846: Make buffers in ads7846_read12_ser and ads7845_read12_ser " Alexander Stein
2011-05-04 15:49     ` Jonathan Cameron
2011-05-04 15:55       ` Jonathan Cameron [this message]
2011-05-04 15:55       ` Alexander Stein
2011-05-04 16:07         ` Jonathan Cameron
2011-05-05  1:31         ` Dmitry Torokhov
2011-05-04 15:22   ` [PATCH 2/2] ads7846: Remove unused variable from struct ads7845_ser_req Alexander Stein

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=4DC176D8.70900@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=Michael.Hennerich@analog.com \
    --cc=agust@denx.de \
    --cc=alexander.stein@systec-electronic.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.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;
as well as URLs for NNTP newsgroup(s).