summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/head_64.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/head_64.S')
-rw-r--r--arch/powerpc/kernel/head_64.S29
1 files changed, 25 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index b61363d..843f71a 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -178,6 +178,21 @@ exception_marker:
#include "exceptions-64s.S"
#endif
+#ifdef CONFIG_PPC_BOOK3E
+_GLOBAL(fsl_secondary_thread_init)
+BEGIN_FTR_SECTION
+ /* Enable branch prediction */
+ lis r3,BUCSR_INIT@h
+ ori r3,r3,BUCSR_INIT@l
+ mtspr SPRN_BUCSR,r3
+ isync
+
+ mfspr r3, SPRN_PIR
+ rlwimi r3, r3, 30, 2, 30
+ mtspr SPRN_PIR, r3
+END_FTR_SECTION_IFSET(CPU_FTR_SMT)
+#endif
+
_GLOBAL(generic_secondary_thread_init)
mr r24,r3
@@ -314,7 +329,7 @@ _STATIC(__mmu_off)
*
* r5 != NULL -> OF entry, we go to prom_init, "legacy" parameter content
* in r3...r7
- *
+ *
* r5 == NULL -> kexec style entry. r3 is a physical pointer to the
* DT block, r4 is a physical pointer to the kernel itself
*
@@ -535,7 +550,7 @@ __secondary_start_pmac_0:
b 1f
li r24,3
1:
-
+
_GLOBAL(pmac_secondary_start)
/* turn on 64-bit mode */
bl .enable_64b_mode
@@ -641,7 +656,7 @@ __secondary_start:
RFI
b . /* prevent speculative execution */
-/*
+/*
* Running with relocation on at this point. All we want to do is
* zero the stack back-chain pointer and get the TOC virtual address
* before going into C code.
@@ -777,7 +792,7 @@ _INIT_STATIC(start_here_multiplatform)
mtspr SPRN_SRR1,r4
RFI
b . /* prevent speculative execution */
-
+
/* This is where all platforms converge execution */
_INIT_GLOBAL(start_here_common)
/* relocation is on at this point */
@@ -789,6 +804,12 @@ _INIT_GLOBAL(start_here_common)
/* Do more system initializations in virtual mode */
bl .setup_system
+#ifdef CONFIG_PPC_BOOK3E
+BEGIN_FTR_SECTION
+ bl .fsl_enable_threads
+END_FTR_SECTION_IFSET(CPU_FTR_SMT)
+#endif
+
/* Mark interrupts soft and hard disabled (they might be enabled
* in the PACA when doing hotplug)
*/