浏览代码

MIPS: SMTC: Move cross VPE writes to after a TC is assigned to VPE.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Raghu Gandham <raghu@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Kurt Martin 16 年之前
父节点
当前提交
d8e5f9fe5d
共有 1 个文件被更改,包括 8 次插入5 次删除
  1. 8 5
      arch/mips/kernel/smtc.c

+ 8 - 5
arch/mips/kernel/smtc.c

@@ -465,11 +465,8 @@ void smtc_prepare_cpus(int cpus)
 	smtc_configure_tlb();
 	smtc_configure_tlb();
 
 
 	for (tc = 0, vpe = 0 ; (vpe < nvpe) && (tc < ntc) ; vpe++) {
 	for (tc = 0, vpe = 0 ; (vpe < nvpe) && (tc < ntc) ; vpe++) {
-		/*
-		 * Set the MVP bits.
-		 */
-		settc(tc);
-		write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() | VPECONF0_MVP);
+		if (tcpervpe[vpe] == 0)
+			continue;
 		if (vpe != 0)
 		if (vpe != 0)
 			printk(", ");
 			printk(", ");
 		printk("VPE %d: TC", vpe);
 		printk("VPE %d: TC", vpe);
@@ -487,6 +484,12 @@ void smtc_prepare_cpus(int cpus)
 			tc++;
 			tc++;
 		}
 		}
 		if (vpe != 0) {
 		if (vpe != 0) {
+			/*
+			 * Allow this VPE to control others.
+			 */
+			write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() |
+					      VPECONF0_MVP);
+
 			/*
 			/*
 			 * Clear any stale software interrupts from VPE's Cause
 			 * Clear any stale software interrupts from VPE's Cause
 			 */
 			 */