From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Cc: Scott Wood <scottwood@freescale.com>,
"linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>,
Rex Feany <RFeany@mrv.com>
Subject: Re: [PATCH 04/10] 8xx: Always pin kernel instruction TLB
Date: Wed, 09 Dec 2009 15:19:59 +1100 [thread overview]
Message-ID: <1260332399.16132.7.camel@pasglop> (raw)
In-Reply-To: <1258712471-3104-5-git-send-email-Joakim.Tjernlund@transmode.se>
On Fri, 2009-11-20 at 11:21 +0100, Joakim Tjernlund wrote:
> Various kernel asm modifies SRR0/SRR1 just before executing
> a rfi. If such code crosses a page boundary you risk a TLB miss
> which will clobber SRR0/SRR1. Avoid this by always pinning
> kernel instruction TLB space.
>
> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> ---
> arch/powerpc/kernel/head_8xx.S | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
> index a9f1ace..e70503d 100644
> --- a/arch/powerpc/kernel/head_8xx.S
> +++ b/arch/powerpc/kernel/head_8xx.S
> @@ -705,7 +705,7 @@ start_here:
> */
> initial_mmu:
> tlbia /* Invalidate all TLB entries */
> -#ifdef CONFIG_PIN_TLB
> +#if 1 /* CONFIG_PIN_TLB */
> lis r8, MI_RSV4I@h
> ori r8, r8, 0x1c00
> #else
Not nice. Either remove the config option or make sure all those code
sequences are appropriately aligned so it doesn't happen. I recommend
the later :-)
I'll apply the other patches.
Cheers,
Ben.
next prev parent reply other threads:[~2009-12-09 4:20 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-20 10:21 [PATCH 00/10 v6] Fix 8xx MMU/TLB Joakim Tjernlund
2009-11-20 10:21 ` [PATCH 01/10] 8xx: invalidate non present TLBs Joakim Tjernlund
2009-11-20 10:21 ` [PATCH 02/10] 8xx: Update TLB asm so it behaves as linux mm expects Joakim Tjernlund
2009-11-20 10:21 ` [PATCH 03/10] 8xx: Tag DAR with 0x00f0 to catch buggy instructions Joakim Tjernlund
2009-11-20 10:21 ` [PATCH 04/10] 8xx: Always pin kernel instruction TLB Joakim Tjernlund
2009-11-20 10:21 ` [PATCH 05/10] 8xx: Fixup DAR from buggy dcbX instructions Joakim Tjernlund
2009-11-20 10:21 ` [PATCH 06/10] 8xx: Add missing Guarded setting in DTLB Error Joakim Tjernlund
2009-11-20 10:21 ` [PATCH 07/10] 8xx: Restore _PAGE_WRITETHRU Joakim Tjernlund
2009-11-20 10:21 ` [PATCH 08/10] 8xx: start using dcbX instructions in various copy routines Joakim Tjernlund
2009-11-20 10:21 ` [PATCH 09/10] 8xx: Remove DIRTY pte handling in DTLB Error Joakim Tjernlund
2009-11-20 10:21 ` [PATCH 10/10] 8xx: DTLB Miss cleanup Joakim Tjernlund
2009-12-09 4:19 ` Benjamin Herrenschmidt [this message]
2009-12-09 7:39 ` [PATCH 04/10] 8xx: Always pin kernel instruction TLB Joakim Tjernlund
2009-12-09 8:56 ` Benjamin Herrenschmidt
2009-12-09 9:24 ` Joakim Tjernlund
2009-12-29 15:10 ` Joakim Tjernlund
2009-11-20 20:28 ` [PATCH 00/10 v6] Fix 8xx MMU/TLB Rex Feany
2009-11-21 10:27 ` Joakim Tjernlund
2009-11-27 10:57 ` Joakim Tjernlund
2009-11-27 21:37 ` Benjamin Herrenschmidt
2009-11-30 22:25 ` Scott Wood
2009-11-30 22:30 ` Joakim Tjernlund
2009-12-08 8:38 ` Joakim Tjernlund
2009-12-08 20:01 ` Benjamin Herrenschmidt
-- strict thread matches above, loose matches on Subject: below --
2009-11-15 17:09 [PATCH 00/10] " Joakim Tjernlund
2009-11-15 17:09 ` [PATCH 01/10] 8xx: invalidate non present TLBs Joakim Tjernlund
2009-11-15 17:09 ` [PATCH 02/10] 8xx: Update TLB asm so it behaves as linux mm expects Joakim Tjernlund
2009-11-15 17:09 ` [PATCH 03/10] 8xx: Tag DAR with 0x00f0 to catch buggy instructions Joakim Tjernlund
2009-11-15 17:09 ` [PATCH 04/10] 8xx: Always pin kernel instruction TLB Joakim Tjernlund
2009-11-14 10:42 [PATCH 00/10] Fix 8xx MMU/TLB Joakim Tjernlund
2009-11-14 10:42 ` [PATCH 01/10] 8xx: invalidate non present TLBs Joakim Tjernlund
2009-11-14 10:42 ` [PATCH 02/10] 8xx: Update TLB asm so it behaves as linux mm expects Joakim Tjernlund
2009-11-14 10:42 ` [PATCH 03/10] 8xx: Tag DAR with 0x00f0 to catch buggy instructions Joakim Tjernlund
2009-11-14 10:42 ` [PATCH 04/10] 8xx: Always pin kernel instruction TLB Joakim Tjernlund
2009-11-14 18:08 ` Dan Malek
2009-11-14 19:08 ` Joakim Tjernlund
2009-11-14 21:41 ` Benjamin Herrenschmidt
2009-11-15 6:49 ` Roland Dreier
2009-11-15 16:08 ` Joakim Tjernlund
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=1260332399.16132.7.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=Joakim.Tjernlund@transmode.se \
--cc=RFeany@mrv.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=scottwood@freescale.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 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.