linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: adharmap@codeaurora.org (adharmap at codeaurora.org)
To: linux-arm-kernel@lists.infradead.org
Subject: coherent memory should be ARMv6's Device Memory?
Date: Wed, 21 Oct 2009 12:50:08 -0700 (PDT)	[thread overview]
Message-ID: <ede8cc2f231dda80cc85839cb94ec565.squirrel@www.codeaurora.org> (raw)

The current implementation of __dma_alloc  on ARMv7 based cpu returns
Strongly Ordered Memory. On my uniprocessor  hardware the strongly ordered
memory causes the reads after a DMA_FROM_DEVICE transfer to be slow. I
think __dma_alloc returns StronglyOrdered memory on all v6 and v7 variants
where arch_is_coherent is false.

In my opinion, coherent memory should be changed from Strongly Ordered
Memory to device memory for the following reasons
1. Device and Strongly Ordered are both non-cacheable and hence shareable
and coherent.
2. There are no speculative fetches from Device and StronglyOrdered
3. The Program order is guaranteed for access to Device and Strongly Order
memory
4. Device accesses don?t insert a "dmb" after each accesses and hence are
faster

I am thinking of changing the pgprot_uncached to pgprot_device  in
dma_alloc_coherent in dma-mapping.c.

Abhijeet

             reply	other threads:[~2009-10-21 19:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-21 19:50 adharmap at codeaurora.org [this message]
2009-10-21 20:35 ` coherent memory should be ARMv6's Device Memory? Shilimkar, Santosh
2009-10-22 21:18   ` Catalin Marinas
2009-10-22 21:12 ` Catalin Marinas

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=ede8cc2f231dda80cc85839cb94ec565.squirrel@www.codeaurora.org \
    --to=adharmap@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.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).