Skip to contentSkip to conversation

Move Cross VPE writes to a latter stage in loop after a TC is assigned to VPE.

PATCH Applied Raghu Gandham 2 participants 2 messages Jul 9, 2009 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Move Cross VPE writes to a latter stage in loop after a TC is assigned to VPE.

From: Kurt Martin <[email protected]>

This patch was part of the series of patches I sent previously. In this version, I accomodated and tested Kevin D.Kissel's suggestion. Also the case when no TCs are assigned to a VPE is checked.

---

 arch/mips/kernel/smtc.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)
arch/mips/kernel/smtc.c +8 -5
index 8a0626c..c16bb6d 100644
@@ -465,11 +465,8 @@ void smtc_prepare_cpus(int cpus)
 	smtc_configure_tlb();
 
 	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)
 			printk(", ");
 		printk("VPE %d: TC", vpe);
@@ -488,6 +485,12 @@ void smtc_prepare_cpus(int cpus)
 		}
 		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
 			 */
 			write_vpe_c0_cause(0);
Applied
#1 lore raw

On Wed, Jul 08, 2009 at 07:22:35PM -0700, Raghu Gandham wrote:

Applied. Thanks, Raghu!!

Ralf