mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 03/12] cache functions from kernel
Date: Mon, 25 Jan 2010 09:57:00 +0100	[thread overview]
Message-ID: <20100125085700.GB12480@pengutronix.de> (raw)
In-Reply-To: <1264404750-11596-4-git-send-email-s.hauer@pengutronix.de>

Hello Sascha,

On Mon, Jan 25, 2010 at 08:32:21AM +0100, Sascha Hauer wrote:
>  void mmu_enable(void)
>  {
>  	asm volatile (
> -		"mrc p15, 0, r1, c1, c0, 0;"
> -		"orr r1, r1, #0x0007;"  /* enable MMU + Dcache */
> -		"mcr p15, 0, r1, c1, c0, 0"
> +		"bl __mmu_cache_on;"
>  		:
>  		:
> -		: "r1" /* Clobber list */
> +		: "r0", "r1", "r2", "r3", "r6", "r10", "r12"
You should add "cc" and "mem" to the list of clobbered registers.

>          );
>  }
>  
> @@ -67,28 +65,13 @@ void mmu_enable(void)
>   */
>  void mmu_disable(void)
>  {
> +
>  	asm volatile (
> -		"nop; "
> -		"nop; "
> -		"nop; "
> -		"nop; "
> -		"nop; "
> -		"nop; "
> -		/* test, clean and invalidate cache */
> -		"1:	mrc	p15, 0, r15, c7, c14, 3;" 
> -		"	bne	1b;"
> -		"	mov	pc, lr;"
> -		"	mov r0, #0x0;"
> -		"	mcr p15, 0, r0, c7, c10, 4;" /* drain the write buffer   */
> -		"	mcr p15, 0, r1, c7, c6, 0;"  /* clear data cache         */
> -		"	mrc p15, 0, r1, c1, c0, 0;"
> -		"	bic r1, r1, #0x0007;"        /* disable MMU + DCache     */
> -		"	mcr p15, 0, r1, c1, c0, 0;"
> -		"	mcr p15, 0, r0, c7, c6, 0;" /* flush d-cache             */
> -		"	mcr p15, 0, r0, c8, c7, 0;" /* flush i+d-TLBs            */
> +		"bl __mmu_cache_flush;"
> +		"bl __mmu_cache_off;"
>  		:
>  		:
> -		: "r0" /* Clobber list */
> +		: "r0", "r1", "r2", "r3", "r6", "r10", "r12"
ditto

Best regards
Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2010-01-25  8:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-25  7:32 Patches for -next Sascha Hauer
2010-01-25  7:32 ` [PATCH 01/12] remove unused cdp code Sascha Hauer
2010-01-25  7:32   ` [PATCH 02/12] remove obsolete comment Sascha Hauer
2010-01-25  7:32     ` [PATCH 03/12] cache functions from kernel Sascha Hauer
2010-01-25  7:32       ` [PATCH 04/12] remove unused NETCONSOLE stuff Sascha Hauer
2010-01-25  7:32         ` [PATCH 05/12] remove unused file common/flash.c Sascha Hauer
2010-01-25  7:32           ` [PATCH 06/12] Move tftp/nfs specific code to net/* Sascha Hauer
2010-01-25  7:32             ` [PATCH 07/12] remove typedef cmd_tbl_t and replace it with struct command Sascha Hauer
2010-01-25  7:32               ` [PATCH 08/12] pcm043: initialize cpufreq to 532MHz Sascha Hauer
2010-01-25  7:32                 ` [PATCH 09/12] replace ET_DEBUG with pr_debug Sascha Hauer
2010-01-25  7:32                   ` [PATCH 10/12] put only once used function inline Sascha Hauer
2010-01-25  7:32                     ` [PATCH 11/12] add armv6 support to the konfig system Sascha Hauer
2010-01-25  7:32                       ` [PATCH 12/12] i.MX: select armv6 for i.MX31/35 Sascha Hauer
2010-01-25  8:57       ` Uwe Kleine-König [this message]
2010-01-25  7:39 ` Patches for -next Sascha Hauer

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=20100125085700.GB12480@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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