summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/include/asm/reg_booke.h1
-rw-r--r--arch/powerpc/kernel/exceptions-64e.S8
2 files changed, 7 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h
index 8ae6b9f..b8682a3 100644
--- a/arch/powerpc/include/asm/reg_booke.h
+++ b/arch/powerpc/include/asm/reg_booke.h
@@ -717,6 +717,7 @@
#define MMUBE1_VBE4 0x00000002
#define MMUBE1_VBE5 0x00000001
+#define TMRN_TMCFG0 0x010 /* Thread Management Configuration Register 0 */
#define TMRN_TPRI0 0x0C0 /* Thread Priority Register 0 */
#define TMRN_TPRI1 0x0C1 /* Thread Priority Register 1 */
#define TMRN_TPRI2 0x0C2 /* Thread Priority Register 2 */
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
index 0b7b33f..39308c7 100644
--- a/arch/powerpc/kernel/exceptions-64e.S
+++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -1363,6 +1363,11 @@ _STATIC(init_core_book3e)
_GLOBAL(fsl_enable_threads)
BEGIN_FTR_SECTION
+ MFTMR(TMRN_TMCFG0, 3)
+ andi. r3,r3,0x3f
+ cmpi 0,r3,2
+ blt 2f
+
/* Disable the other thread */
li r3,2
mtspr SPRN_TENC,r3
@@ -1386,8 +1391,7 @@ BEGIN_FTR_SECTION
li r3, 2
mtspr SPRN_TENS, r3
END_FTR_SECTION_IFSET(CPU_FTR_SMT)
-
- blr
+2: blr
_STATIC(init_thread_book3e)
lis r3,(SPRN_EPCR_ICM | SPRN_EPCR_GICM)@h