mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: adharmap@codeaurora.org, linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Abhijeet Dharmapurikar <adharmap@quicinc.com>
Subject: Re: [RFC 0/2] fix dma_map_sg not to do barriers for each buffer
Date: Thu, 11 Feb 2010 10:56:38 +0000	[thread overview]
Message-ID: <20100211105638.GB9480@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1265885102.3389.34.camel@pc1117.cambridge.arm.com>

On Thu, Feb 11, 2010 at 10:45:01AM +0000, Catalin Marinas wrote:
> Alternatively we could use the dsb() macro. I don't think we need more
> than this and we would not (well, not easily) compile ARMv5 and ARMv6 in
> the same kernel.

That doesn't work - ARMv3 and some ARMv4 don't have a 'drain write
buffer' instruction but others do - executing that instruction on
older CPUs which don't have a write buffer causes an illegal
instruction fault.

> The ___dma_single_cpu_to_dev() covers both inner and outer caches but I
> haven't seen it touched by this patch (nor the other you posted). When
> you clean the L1 cache, you need to make sure that there is a barrier
> (DSB) so that it completes before cleaning the L2, otherwise you clean
> the L2 but data keeps coming from L1.
> 
> For the *_sg functions, you either use barrier between L1 and L2 for
> each page or you do the for_each_sg() loop twice, once for L1 and
> another for L2.

Okay, that's a fundamental problem with this approach.  Spanner in the
works kind of thing.  I think that's a problem for Abhijeet's patch
as well - since the same comment appears to apply there too.

Sounds like it needs a totally different approach then.

  parent reply	other threads:[~2010-02-11 10:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-10 20:37 adharmap
2010-02-10 20:37 ` [PATCH 1/2] dma: define barrierless versions of map and unmap area adharmap
2010-02-10 20:37 ` [PATCH 2/2] dma: fix scatter-gather api to use barrierless map/unmap functions adharmap
2010-02-10 21:21 ` [RFC 0/2] fix dma_map_sg not to do barriers for each buffer Russell King - ARM Linux
2010-02-10 23:28   ` Abhijeet Dharmapurikar
2010-02-10 23:57     ` Russell King - ARM Linux
2010-02-11 21:36       ` Abhijeet Dharmapurikar
2010-02-11 10:45   ` Catalin Marinas
2010-02-11 10:53     ` Catalin Marinas
2010-02-11 11:01       ` Russell King - ARM Linux
2010-02-11 11:03         ` Catalin Marinas
2010-02-11 10:56     ` Russell King - ARM Linux [this message]
2010-02-11 19:13       ` Abhijeet Dharmapurikar
2010-02-10 21:27 ` Randy Dunlap
2010-02-10 22:40   ` Russell King - ARM Linux
2010-02-10 23:10     ` Abhijeet Dharmapurikar
2010-02-11  0:39   ` FUJITA Tomonori
2010-02-11  0:41     ` Randy Dunlap

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=20100211105638.GB9480@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=adharmap@codeaurora.org \
    --cc=adharmap@quicinc.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®