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>
This commit is contained in:
LEROY Christophe 2015-01-20 10:57:34 +01:00 committed by Scott Wood
parent fde5a9057f
commit 4545ff7ed8
1 changed files with 4 additions and 6 deletions

View File

@ -850,23 +850,21 @@ _GLOBAL(set_context)
*/ */
li r5, (swapper_pg_dir-PAGE_OFFSET)@l li r5, (swapper_pg_dir-PAGE_OFFSET)@l
sub r4, r4, r5 sub r4, r4, r5
tophys (r4, r4)
#ifdef CONFIG_8xx_CPU6 #ifdef CONFIG_8xx_CPU6
lis r6, cpu6_errata_word@h lis r6, cpu6_errata_word@h
ori r6, r6, cpu6_errata_word@l ori r6, r6, cpu6_errata_word@l
tophys (r4, r4)
li r7, 0x3f80 li r7, 0x3f80
stw r7, 12(r6) stw r7, 12(r6)
lwz r7, 12(r6) lwz r7, 12(r6)
#endif
mtspr SPRN_M_TW, r4 /* Update pointeur to level 1 table */ mtspr SPRN_M_TW, r4 /* Update pointeur to level 1 table */
#ifdef CONFIG_8xx_CPU6
li r7, 0x3380 li r7, 0x3380
stw r7, 12(r6) stw r7, 12(r6)
lwz 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 #endif
mtspr SPRN_M_CASID, r3 /* Update context */
SYNC SYNC
blr blr