linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] arm: invalidate TLBs when enabling mmu
Date: Thu, 15 Apr 2010 23:36:21 +0100	[thread overview]
Message-ID: <20100415223621.GA544@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <l2sf17812d71004150524w1dc68807i323660a42a52958f@mail.gmail.com>

On Thu, Apr 15, 2010 at 08:24:02PM +0800, Eric Miao wrote:
> Another noticeable difference is the slow decompressing happens so far on
> kexec only, a normal boot without this additional "invalidate" does not
> exhibit such slowness. This leads to me to suspect that the MMU state might
> not be same between a normal bootup and a kexec soft reboot.
> 
> I may overlooked, but it looks to me that after a 1:1 mapping of ther user
> space area (from 0x0000_0000 to TASK_SIZE, which I guess will cause some
> other issue if the kexec kernel start entry starts beyond TASK_SIZE?), the
> MMU is NOT actually turned off through the reset. This might cause weird
> behavior with the original sequence of __armv7_mmu_cache_on ??

For kexec:

        cpu_proc_fin();
        setup_mm_for_reboot(0); /* mode is not used, so just pass 0*/
        cpu_reset(reboot_code_buffer_phys);

cpu_proc_fin() disables interrupts, flushes the cache and then disables
caches.

setup_mm_for_reboot() creates 1:1 mappings for the entire user address
space, which ends up being strongly ordered.

cpu_reset() is supposed to invalidate I/D caches, invalidate TLBs, and
disable the MMU prior to calling the passed address.  However, neither
ARMv6 nor ARMv7 does this - and I'm confused as to why not.

  parent reply	other threads:[~2010-04-15 22:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-09 14:07 [PATCH 0/2] arm: fix kexec for ARMv7 Saeed Bishara
2010-03-09 14:07 ` [PATCH 1/2] arm: disable L2 cache in the v7 finish function Saeed Bishara
2010-03-09 14:07   ` [PATCH 2/2] arm: invalidate TLBs when enabling mmu Saeed Bishara
2010-03-09 16:45     ` Catalin Marinas
2010-04-14 17:49       ` Eric Miao
2010-04-14 17:56         ` Bryan Wu
2010-04-14 18:27     ` Russell King - ARM Linux
2010-04-15 12:24       ` Eric Miao
2010-04-15 12:24         ` Eric Miao
2010-04-15 22:36         ` Russell King - ARM Linux [this message]
2010-03-09 16:43   ` [PATCH 1/2] arm: disable L2 cache in the v7 finish function Catalin Marinas
2010-03-10 21:55     ` Tony Lindgren
2010-03-10 21:53   ` Tony Lindgren
2010-03-19 19:54     ` Woodruff, Richard
2010-03-22 21:00       ` Tony Lindgren
2010-03-24  8:27         ` Eric Miao

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=20100415223621.GA544@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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).