All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH 3/5] arm: Flush TLB entries in setup_mm_for_reboot()
Date: Sat, 19 Dec 2009 10:10:16 -0800	[thread overview]
Message-ID: <20091219181016.GC11397@atomide.com> (raw)
In-Reply-To: <20091219175413.GB11397@atomide.com>

* Tony Lindgren <tony@atomide.com> [091219 09:53]:
> * Russell King - ARM Linux <linux@arm.linux.org.uk> [091219 01:04]:
> > On Fri, Dec 18, 2009 at 07:46:19PM -0800, Tony Lindgren wrote:
> > > diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
> > > index 8c7fbd1..a2802ea 100644
> > > --- a/arch/arm/mm/mmu.c
> > > +++ b/arch/arm/mm/mmu.c
> > > @@ -1068,4 +1068,7 @@ void setup_mm_for_reboot(char mode)
> > >  		pmd[1] = __pmd(pmdval + (1 << (PGDIR_SHIFT - 1)));
> > >  		flush_pmd_entry(pmd);
> > >  	}
> > > +
> > > +	local_flush_tlb_all();
> > > +	flush_cache_all();
> > 
> > The cache flush is unnecessary.  The caches should be off at this point.
> 
> OK, right, cpu_proc_fin() has already disabled caches by then.
> 
> Here's the updated version.

Hmm, without the flush_cache_all() rebooting with kexec still fails
with crc error eventually.

So it seems like there's a bug somewhere. Maybe something missing from
local_flush_tlb_all()?

I don't see anything obvious in v7_flush_dcache_all that would explain
why it makes local_flush_tlb_all() behave. Like you said caches are
off at this point, and that should also disable the L2 cache.

Regards,
 
Tony



> From f279fdc4c7dc824902d67511bfcb5f18512c8468 Mon Sep 17 00:00:00 2001
> From: Tony Lindgren <tony@atomide.com>
> Date: Fri, 18 Dec 2009 17:10:51 -0800
> Subject: [PATCH] arm: Flush TLB entries in setup_mm_for_reboot()
> 
> We need to do that if we tinker with the MMU entries.
> 
> This fixes the occasional bug with kexec where the new
> fails to uncompress with "crc error". Most likely at
> least kexec on v6 and v7 need this fix.
> 
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> 
> diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
> index 8c7fbd1..a311080 100644
> --- a/arch/arm/mm/mmu.c
> +++ b/arch/arm/mm/mmu.c
> @@ -1068,4 +1068,6 @@ void setup_mm_for_reboot(char mode)
>  		pmd[1] = __pmd(pmdval + (1 << (PGDIR_SHIFT - 1)));
>  		flush_pmd_entry(pmd);
>  	}
> +
> +	local_flush_tlb_all();
>  }


WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] arm: Flush TLB entries in setup_mm_for_reboot()
Date: Sat, 19 Dec 2009 10:10:16 -0800	[thread overview]
Message-ID: <20091219181016.GC11397@atomide.com> (raw)
In-Reply-To: <20091219175413.GB11397@atomide.com>

* Tony Lindgren <tony@atomide.com> [091219 09:53]:
> * Russell King - ARM Linux <linux@arm.linux.org.uk> [091219 01:04]:
> > On Fri, Dec 18, 2009 at 07:46:19PM -0800, Tony Lindgren wrote:
> > > diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
> > > index 8c7fbd1..a2802ea 100644
> > > --- a/arch/arm/mm/mmu.c
> > > +++ b/arch/arm/mm/mmu.c
> > > @@ -1068,4 +1068,7 @@ void setup_mm_for_reboot(char mode)
> > >  		pmd[1] = __pmd(pmdval + (1 << (PGDIR_SHIFT - 1)));
> > >  		flush_pmd_entry(pmd);
> > >  	}
> > > +
> > > +	local_flush_tlb_all();
> > > +	flush_cache_all();
> > 
> > The cache flush is unnecessary.  The caches should be off at this point.
> 
> OK, right, cpu_proc_fin() has already disabled caches by then.
> 
> Here's the updated version.

Hmm, without the flush_cache_all() rebooting with kexec still fails
with crc error eventually.

So it seems like there's a bug somewhere. Maybe something missing from
local_flush_tlb_all()?

I don't see anything obvious in v7_flush_dcache_all that would explain
why it makes local_flush_tlb_all() behave. Like you said caches are
off at this point, and that should also disable the L2 cache.

Regards,
 
Tony



> From f279fdc4c7dc824902d67511bfcb5f18512c8468 Mon Sep 17 00:00:00 2001
> From: Tony Lindgren <tony@atomide.com>
> Date: Fri, 18 Dec 2009 17:10:51 -0800
> Subject: [PATCH] arm: Flush TLB entries in setup_mm_for_reboot()
> 
> We need to do that if we tinker with the MMU entries.
> 
> This fixes the occasional bug with kexec where the new
> fails to uncompress with "crc error". Most likely at
> least kexec on v6 and v7 need this fix.
> 
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> 
> diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
> index 8c7fbd1..a311080 100644
> --- a/arch/arm/mm/mmu.c
> +++ b/arch/arm/mm/mmu.c
> @@ -1068,4 +1068,6 @@ void setup_mm_for_reboot(char mode)
>  		pmd[1] = __pmd(pmdval + (1 << (PGDIR_SHIFT - 1)));
>  		flush_pmd_entry(pmd);
>  	}
> +
> +	local_flush_tlb_all();
>  }

  reply	other threads:[~2009-12-19 18:10 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-19  3:45 [PATCH 0/5] V7/Cortex/omap34xx fixes for 2.6.33-rc1: DCC, kexec, atags Tony Lindgren
2009-12-19  3:45 ` Tony Lindgren
2009-12-19  3:45 ` [PATCH 1/5] arm: Fix DCC console for v7 Tony Lindgren
2009-12-19  3:45   ` Tony Lindgren
2009-12-19  3:46 ` [PATCH 2/5] arm: Fix cpu_proc_fin() for proc-v7.S and make kexec work Tony Lindgren
2009-12-19  3:46   ` Tony Lindgren
2009-12-19  3:46 ` [PATCH 3/5] arm: Flush TLB entries in setup_mm_for_reboot() Tony Lindgren
2009-12-19  3:46   ` Tony Lindgren
2009-12-19  9:06   ` Russell King - ARM Linux
2009-12-19  9:06     ` Russell King - ARM Linux
2009-12-19 17:54     ` Tony Lindgren
2009-12-19 17:54       ` Tony Lindgren
2009-12-19 18:10       ` Tony Lindgren [this message]
2009-12-19 18:10         ` Tony Lindgren
2009-12-19  3:46 ` [PATCH 4/5] arm: Fix init_atags_procfs() to check tag->hdr.size Tony Lindgren
2009-12-19  3:46   ` Tony Lindgren
2009-12-19  9:03   ` Russell King - ARM Linux
2009-12-19  9:03     ` Russell King - ARM Linux
2009-12-19 17:44     ` Tony Lindgren
2009-12-19 17:44       ` Tony Lindgren
2009-12-19 18:44       ` Tony Lindgren
2009-12-19 18:44         ` Tony Lindgren
2009-12-19  3:46 ` [PATCH 5/5] arm: Fix typo in cacheflush.h and remove unnecessary comments Tony Lindgren
2009-12-19  3:46   ` Tony Lindgren
2009-12-19  5:07 ` [PATCH 0/5] V7/Cortex/omap34xx fixes for 2.6.33-rc1: DCC, kexec, atags Tony Lindgren
2009-12-19  5:07   ` Tony Lindgren
2009-12-28  5:55 ` Magnus Damm
2009-12-28  5:55   ` Magnus Damm
2009-12-29 22:07   ` Tony Lindgren
2009-12-29 22:07     ` Tony Lindgren
2010-01-05  9:24     ` Magnus Damm
2010-01-05  9:24       ` Magnus Damm
2010-01-05 11:36     ` Mika Westerberg
2010-01-05 11:36       ` Mika Westerberg
2010-01-05 17:14       ` Tony Lindgren
2010-01-05 17:14         ` Tony Lindgren
2010-01-05 17:54     ` Paul Walmsley
2010-01-05 17:54       ` Paul Walmsley
2010-01-05 20:43       ` Tony Lindgren
2010-01-05 20:43         ` Tony Lindgren
2010-01-08 22:32       ` Woodruff, Richard
2010-01-08 22:32         ` Woodruff, Richard

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=20091219181016.GC11397@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    /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.