patch-2.2.15 linux/arch/alpha/kernel/smp.c

Next file: linux/arch/alpha/kernel/sys_jensen.c
Previous file: linux/arch/alpha/kernel/smc37c669.c
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from ../../exclude v2.2.14/arch/alpha/kernel/smp.c linux/arch/alpha/kernel/smp.c
@@ -348,7 +348,7 @@
 	hwpcb->res1 = hwpcb->res2 = 0;
 
 	DBGS(("KSP 0x%lx PTBR 0x%lx VPTBR 0x%lx UNIQUE 0x%lx\n",
-	      hwpcb->ksp, hwpcb->ptbr, hwrpb->vptb, hwcpb->unique));
+	      hwpcb->ksp, hwpcb->ptbr, hwrpb->vptb, hwpcb->unique));
 	DBGS(("Starting secondary cpu %d: state 0x%lx pal_flags 0x%lx\n",
 	      cpuid, idle->state, idle->tss.pal_flags));
 
@@ -704,7 +704,7 @@
 	unsigned long *pending_ipis = &ipi_data[this_cpu].bits;
 	unsigned long ops;
 
-	DBGS(("handle_ipi: on CPU %d ops 0x%x PC 0x%lx\n",
+	DBGS(("handle_ipi: on CPU %d ops 0x%lx PC 0x%lx\n",
 	      this_cpu, *pending_ipis, regs->pc));
 
 	mb();	/* Order interrupt and bit testing. */
@@ -836,6 +836,23 @@
 	}
 
 	return 0;
+}
+
+static void
+ipi_imb(void *ignored)
+{
+	imb();
+}
+
+void
+smp_imb(void)
+{
+	/* Must wait for other processors to flush their icache
+	   before continuing. */
+	if (smp_call_function(ipi_imb, NULL, 1, 1))
+		printk(KERN_CRIT "smp_imb: timed out\n");
+
+	imb();
 }
 
 static void

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)