mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Colin Cross <ccross@android.com>
Cc: Rob Herring <robherring2@gmail.com>,
	Tony Luck <tony.luck@intel.com>,
	Kees Cook <keescook@chromium.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Rob Herring <rob.herring@calxeda.com>,
	Anton Vorontsov <cbouatmailru@gmail.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC PATCH 1/3] pstore-ram: use write-combine mappings
Date: Fri, 19 Apr 2013 10:54:45 +0100	[thread overview]
Message-ID: <20130419095445.GG14496@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAMbhsRSvQPbzJ7Nt=OSSYE_A1e+eaUjO7XY+qRppJ5_gfWmW4A@mail.gmail.com>

On Tue, Apr 09, 2013 at 08:53:18PM -0700, Colin Cross wrote:
> On Tue, Apr 9, 2013 at 8:08 PM, Rob Herring <robherring2@gmail.com> wrote:
> > -       return ioremap(start, size);
> > +       return ioremap_wc(start, size);
> 
> ioremap_wc corresponds to MT_DEVICE_WC, which is still device memory,
> so I don't see how this helps solve the problem in the commit message.

In reality it isn't, because there's no such thing as "write combining
device memory" in the ARM memory model.

There are three major memory types: strongly ordered, device and normal
memory.  Only normal memory can be cached in any way, which includes
using write combining.

#define ioremap_wc(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE_WC)

        [MT_DEVICE_WC] = {      /* ioremap_wc */
                .prot_pte       = PROT_PTE_DEVICE | L_PTE_MT_DEV_WC,

         *                      n       TR      IR      OR
         *   BUFFERABLE         001     10      00      00
         *   DEV_WC             001     10
(see arch/arm/mm/proc-v7-2level.S for the rest of the table and its
description.)

So, DEV_WC is an alias for BUFFERABLE, which is normal memory,
uncacheable in both inner and outer caches.  This means that at the
moment, ioremap_wc() memory has the same properties as system memory
- with all the out of ordering effects you get there.

I don't put any guarantee on this though - we may end up having to
change it if we find a SoC needing this to really be device memory...

  parent reply	other threads:[~2013-04-19  9:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-10  3:08 Rob Herring
2013-04-10  3:08 ` [RFC PATCH 2/3] pstore ram: remove the power of buffer size limitation Rob Herring
2013-04-10  3:08 ` [RFC PATCH 3/3] pstore/ram: avoid atomic accesses for ioremapped regions Rob Herring
2013-04-10  4:10   ` Colin Cross
2013-04-10 15:55     ` Rob Herring
2013-04-10  3:53 ` [RFC PATCH 1/3] pstore-ram: use write-combine mappings Colin Cross
2013-04-10 13:30   ` Rob Herring
2013-04-15 22:21     ` Colin Cross
2013-04-15 23:59       ` Rob Herring
2013-04-16  0:43         ` Colin Cross
2013-04-16  8:44           ` Will Deacon
2013-04-16 12:58             ` Rob Herring
2013-04-16 13:48               ` Catalin Marinas
2013-04-19  9:54   ` Russell King - ARM Linux [this message]
2013-06-19 11:22 Wei Ni

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=20130419095445.GG14496@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=cbouatmailru@gmail.com \
    --cc=ccross@android.com \
    --cc=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=robherring2@gmail.com \
    --cc=tony.luck@intel.com \
    /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®