From: Sebastian Andrzej Siewior <linuxppc-dev@ml.breakpoint.cc>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: [PATCH 2/5] powerpc/head fsl: move the temp 4KiB mapping to TLB0
Date: Fri, 15 Jan 2010 17:41:34 +0100 [thread overview]
Message-ID: <1263573697-17839-3-git-send-email-linuxppc-dev@ml.breakpoint.cc> (raw)
In-Reply-To: <1263573697-17839-1-git-send-email-linuxppc-dev@ml.breakpoint.cc>
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Right now the setup code takes ESEL of the current mapping and puts the
temporary into ESEL (old_ESEL & 1 ) + 1 which is either one or two.
This is actually not required since all slots in TLB0 are invalid by now
and can be used.
This patch moved the temp mapping to TLB0, ESEL[0]. The invalidation of
TLB0 does not care about IPPROT so that part can go as well.
The benefit is that now the setup code may set every slot of TLB1 while
before that it was not allowed to touch ESEL one or two depending on the
old_ESEL.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
arch/powerpc/kernel/head_fsl_booke.S | 20 +++++---------------
1 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index 799ddbe..cc76952 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -165,8 +165,6 @@ skpinv: addi r6,r6,1 /* Increment */
TLBSYNC
/* 3. Setup a temp mapping and jump to it */
- andi. r5, r3, 0x1 /* Find an entry not used and is non-zero */
- addi r5, r5, 0x1
lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */
mtspr SPRN_MAS0,r7
@@ -194,12 +192,11 @@ skpinv: addi r6,r6,1 /* Increment */
ori r8,r25,(MAS3_SX|MAS3_SW|MAS3_SR)
/* Just modify the entry ID and EPN for the temp mapping */
- lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
- rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */
+ li r7, 0 /* Set MAS0(TLBSEL) = 0 | ESEL(0) */
mtspr SPRN_MAS0,r7
xori r6,r4,1 /* Setup TMP mapping in the other Address space */
slwi r6,r6,12
- oris r6,r6,(MAS1_VALID|MAS1_IPROT)@h
+ oris r6,r6,(MAS1_VALID)@h
ori r6,r6,(MAS1_TSIZE(BOOK3E_PAGESZ_4K))@l
mtspr SPRN_MAS1,r6
mfspr r6,SPRN_MAS2
@@ -281,16 +278,9 @@ skpinv: addi r6,r6,1 /* Increment */
rfi /* start execution out of TLB1[0] entry */
/* 8. Clear out the temp mapping */
-2: lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
- rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */
- mtspr SPRN_MAS0,r7
- tlbre
- mfspr r8,SPRN_MAS1
- rlwinm r8,r8,0,2,0 /* clear IPROT */
- mtspr SPRN_MAS1,r8
- tlbwe
- /* Invalidate TLB1 */
- li r9,0x0c
+2:
+ /* Invalidate TLB0 */
+ li r9,0x04
tlbivax 0,r9
TLBSYNC
--
1.6.2.5
next prev parent reply other threads:[~2010-01-15 17:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-15 16:41 Kexec support for FSL-BookE, take two Sebastian Andrzej Siewior
2010-01-15 16:41 ` [PATCH 1/5] powerpc/head fsl: fix the case where we are not in the first page Sebastian Andrzej Siewior
2010-02-18 3:07 ` Kumar Gala
2010-02-18 8:53 ` Sebastian Andrzej Siewior
2010-01-15 16:41 ` Sebastian Andrzej Siewior [this message]
2010-02-18 3:09 ` [PATCH 2/5] powerpc/head fsl: move the temp 4KiB mapping to TLB0 Kumar Gala
2010-02-18 9:08 ` Sebastian Andrzej Siewior
2010-01-15 16:41 ` [PATCH 3/5] powerpc/head fsl: replace a hardcoded constant Sebastian Andrzej Siewior
2010-02-18 3:11 ` Kumar Gala
2010-01-15 16:41 ` [PATCH 4/5] powerpc/fsl head: move the entry setup code into a seperate file Sebastian Andrzej Siewior
2010-01-15 16:41 ` [PATCH 5/5] powerpc/kexec: Add support for FSL-BookE Sebastian Andrzej Siewior
2010-01-15 17:53 ` Kexec support for FSL-BookE, take two Kumar Gala
2010-01-15 19:23 ` Sebastian Andrzej Siewior
2010-02-08 14:09 ` Sebastian Andrzej Siewior
2010-01-16 12:35 ` wilbur.chan
2010-01-16 12:52 ` Sebastian Andrzej Siewior
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=1263573697-17839-3-git-send-email-linuxppc-dev@ml.breakpoint.cc \
--to=linuxppc-dev@ml.breakpoint.cc \
--cc=bigeasy@linutronix.de \
--cc=galak@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.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).