summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorLEROY Christophe <christophe.leroy@c-s.fr>2015-01-20 10:57:34 +0100
committerScott Wood <scottwood@freescale.com>2015-01-30 04:59:02 +0100
commit4545ff7ed841df77a239a22bffed4fc977a7d7bc (patch)
treec589a70f4e8af9cb2c97d72adf9863d189e303a1 /arch/powerpc
parentpowerpc/8xx: Optimise access to swapper_pg_dir (diff)
downloadlinux-4545ff7ed841df77a239a22bffed4fc977a7d7bc.tar.xz
linux-4545ff7ed841df77a239a22bffed4fc977a7d7bc.zip
powerpc/8xx: Remove duplicated code in set_context()
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/head_8xx.S10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
index 24934e79cd23..9b53fe139bf6 100644
--- a/arch/powerpc/kernel/head_8xx.S
+++ b/arch/powerpc/kernel/head_8xx.S
@@ -850,23 +850,21 @@ _GLOBAL(set_context)
*/
li r5, (swapper_pg_dir-PAGE_OFFSET)@l
sub r4, r4, r5
+ tophys (r4, r4)
#ifdef CONFIG_8xx_CPU6
lis r6, cpu6_errata_word@h
ori r6, r6, cpu6_errata_word@l
- tophys (r4, r4)
li r7, 0x3f80
stw r7, 12(r6)
lwz r7, 12(r6)
+#endif
mtspr SPRN_M_TW, r4 /* Update pointeur to level 1 table */
+#ifdef CONFIG_8xx_CPU6
li r7, 0x3380
stw r7, 12(r6)
lwz r7, 12(r6)
- mtspr SPRN_M_CASID, r3 /* Update context */
-#else
- mtspr SPRN_M_CASID,r3 /* Update context */
- tophys (r4, r4)
- mtspr SPRN_M_TW, r4 /* and pgd */
#endif
+ mtspr SPRN_M_CASID, r3 /* Update context */
SYNC
blr