summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2010-08-06 15:36:59 +0000
committerjhb <jhb@FreeBSD.org>2010-08-06 15:36:59 +0000
commit19ddbf5c3845e0aaeed327e2be2f168e30013b63 (patch)
tree90823b92f30822fa8ac56ad8c70614f9aae1017a /sys/powerpc
parent57b610d580a3dd85aaac28dae65ce416f30c3f31 (diff)
downloadFreeBSD-src-19ddbf5c3845e0aaeed327e2be2f168e30013b63.zip
FreeBSD-src-19ddbf5c3845e0aaeed327e2be2f168e30013b63.tar.gz
Add a new ipi_cpu() function to the MI IPI API that can be used to send an
IPI to a specific CPU by its cpuid. Replace calls to ipi_selected() that constructed a mask for a single CPU with calls to ipi_cpu() instead. This will matter more in the future when we transition from cpumask_t to cpuset_t for CPU masks in which case building a CPU mask is more expensive. Submitted by: peter, sbruno Reviewed by: rookie Obtained from: Yahoo! (x86) MFC after: 1 month
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/include/smp.h1
-rw-r--r--sys/powerpc/powerpc/mp_machdep.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/sys/powerpc/include/smp.h b/sys/powerpc/include/smp.h
index 733c2e4..64d13db 100644
--- a/sys/powerpc/include/smp.h
+++ b/sys/powerpc/include/smp.h
@@ -40,6 +40,7 @@
#ifndef LOCORE
void ipi_all_but_self(int ipi);
+void ipi_cpu(int cpu, u_int ipi);
void ipi_selected(cpumask_t cpus, int ipi);
struct cpuref {
diff --git a/sys/powerpc/powerpc/mp_machdep.c b/sys/powerpc/powerpc/mp_machdep.c
index 76fc4a3..19b46a9 100644
--- a/sys/powerpc/powerpc/mp_machdep.c
+++ b/sys/powerpc/powerpc/mp_machdep.c
@@ -336,6 +336,14 @@ ipi_selected(cpumask_t cpus, int ipi)
}
}
+/* Send an IPI to a specific CPU. */
+void
+ipi_cpu(int cpu, u_int ipi)
+{
+
+ ipi_send(cpuid_to_pcpu[cpu], ipi);
+}
+
/* Send an IPI to all CPUs EXCEPT myself. */
void
ipi_all_but_self(int ipi)
OpenPOWER on IntegriCloud