All of lore.kernel.org
 help / color / mirror / Atom feed
From: plagnioj@jcrosoft.com (Jean-Christophe PLAGNIOL-VILLARD)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: at91: Fix: Change internal SRAM memory type to "MT_MEMORY_SO"
Date: Fri, 24 May 2013 19:11:44 +0200	[thread overview]
Message-ID: <20130524171144.GG24476@game.jcrosoft.org> (raw)
In-Reply-To: <20130524165934.GC18614@n2100.arm.linux.org.uk>

On 17:59 Fri 24 May     , Russell King - ARM Linux wrote:
> On Fri, May 24, 2013 at 06:52:54PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 17:40 Fri 24 May     , Russell King - ARM Linux wrote:
> > > On Fri, May 24, 2013 at 04:03:22PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > > On 12:20 Fri 24 May     , Russell King - ARM Linux wrote:
> > > > > On Fri, May 24, 2013 at 07:11:04AM +0000, Yang, Wenyou wrote:
> > > > > > The story is: for sama5d3x with Cortex-A5 core, if not so, when copying
> > > > > > code snippet to the internal SRAM, then jump to run this code, but fail
> > > > > > to run.
> > > > > 
> > > > > And that is where your mistake is - you forgot that you're working with
> > > > > a CPU with harvard caches which will require some cache maintanence
> > > > > between copying the code and executing it.
> > > > > 
> > > > > You want to look at flush_icache_range() rather than making this memory
> > > > > strongly ordered.
> > > > 
> > > > I understand your point but today we map a SRAM as MT_DEVICE
> > > 
> > > If you map SRAM as MT_DEVICE then you won't be able to execute code from
> > > it.  It needs to be a normal memory mapping.
> > 
> > Yeah that a bug on AT91, by luck it work on armv3/v4 with MT_DEVICE, I should
> > have spot it earlier when cleanning the at91 but did not
> > 
> > That's why Yang change the SRAM mapping as MT_MEMORY_SO
> 
> I said "normal memory".  Strongly ordered is not "normal memory".

yeah btw why omap map their SRAM as strongly orderered?

Best Regards,
J.

WARNING: multiple messages have this Message-ID (diff)
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: "Yang, Wenyou" <Wenyou.Yang@atmel.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Ferre, Nicolas" <Nicolas.FERRE@atmel.com>,
	"linux@maxim.org.za" <linux@maxim.org.za>
Subject: Re: [PATCH] ARM: at91: Fix: Change internal SRAM memory type to "MT_MEMORY_SO"
Date: Fri, 24 May 2013 19:11:44 +0200	[thread overview]
Message-ID: <20130524171144.GG24476@game.jcrosoft.org> (raw)
In-Reply-To: <20130524165934.GC18614@n2100.arm.linux.org.uk>

On 17:59 Fri 24 May     , Russell King - ARM Linux wrote:
> On Fri, May 24, 2013 at 06:52:54PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 17:40 Fri 24 May     , Russell King - ARM Linux wrote:
> > > On Fri, May 24, 2013 at 04:03:22PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > > On 12:20 Fri 24 May     , Russell King - ARM Linux wrote:
> > > > > On Fri, May 24, 2013 at 07:11:04AM +0000, Yang, Wenyou wrote:
> > > > > > The story is: for sama5d3x with Cortex-A5 core, if not so, when copying
> > > > > > code snippet to the internal SRAM, then jump to run this code, but fail
> > > > > > to run.
> > > > > 
> > > > > And that is where your mistake is - you forgot that you're working with
> > > > > a CPU with harvard caches which will require some cache maintanence
> > > > > between copying the code and executing it.
> > > > > 
> > > > > You want to look at flush_icache_range() rather than making this memory
> > > > > strongly ordered.
> > > > 
> > > > I understand your point but today we map a SRAM as MT_DEVICE
> > > 
> > > If you map SRAM as MT_DEVICE then you won't be able to execute code from
> > > it.  It needs to be a normal memory mapping.
> > 
> > Yeah that a bug on AT91, by luck it work on armv3/v4 with MT_DEVICE, I should
> > have spot it earlier when cleanning the at91 but did not
> > 
> > That's why Yang change the SRAM mapping as MT_MEMORY_SO
> 
> I said "normal memory".  Strongly ordered is not "normal memory".

yeah btw why omap map their SRAM as strongly orderered?

Best Regards,
J.

  reply	other threads:[~2013-05-24 17:11 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-20  1:05 [PATCH] Change internal SRAM memory type to "MT_MEMORY_SO" Wenyou Yang
2013-05-20  1:05 ` Wenyou Yang
2013-05-20  1:06 ` [PATCH] ARM: at91: Fix: " Wenyou Yang
2013-05-20  1:06   ` Wenyou Yang
2013-05-21  9:06   ` Nicolas Ferre
2013-05-21  9:06     ` Nicolas Ferre
2013-05-22  0:14   ` Russell King - ARM Linux
2013-05-22  0:14     ` Russell King - ARM Linux
2013-05-24  7:11     ` Yang, Wenyou
2013-05-24  7:11       ` Yang, Wenyou
2013-05-24 11:20       ` Russell King - ARM Linux
2013-05-24 11:20         ` Russell King - ARM Linux
2013-05-24 14:03         ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-24 14:03           ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-24 16:40           ` Russell King - ARM Linux
2013-05-24 16:40             ` Russell King - ARM Linux
2013-05-24 16:52             ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-24 16:52               ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-24 16:59               ` Russell King - ARM Linux
2013-05-24 16:59                 ` Russell King - ARM Linux
2013-05-24 17:11                 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2013-05-24 17:11                   ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-21  9:06 ` [PATCH] " Nicolas Ferre
2013-05-21  9:06   ` Nicolas Ferre
2013-06-08  2:17 ` [PATCH] Change the internal SRAM memory type MT_MEMORY_NONCACHED Wenyou Yang
2013-06-08  2:17   ` Wenyou Yang
2013-06-13 13:19   ` Nicolas Ferre
2013-06-13 13:19     ` Nicolas Ferre
2013-06-13 13:43     ` Russell King - ARM Linux
2013-06-13 13:43       ` Russell King - ARM Linux

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=20130524171144.GG24476@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.