diff options
author | jhb <jhb@FreeBSD.org> | 2010-08-06 15:36:59 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2010-08-06 15:36:59 +0000 |
commit | 19ddbf5c3845e0aaeed327e2be2f168e30013b63 (patch) | |
tree | 90823b92f30822fa8ac56ad8c70614f9aae1017a /sys/sparc64/include/smp.h | |
parent | 57b610d580a3dd85aaac28dae65ce416f30c3f31 (diff) | |
download | FreeBSD-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/sparc64/include/smp.h')
-rw-r--r-- | sys/sparc64/include/smp.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/sparc64/include/smp.h b/sys/sparc64/include/smp.h index a0e14c9..315e5f6 100644 --- a/sys/sparc64/include/smp.h +++ b/sys/sparc64/include/smp.h @@ -135,6 +135,17 @@ ipi_selected(u_int cpus, u_int ipi) cpu_ipi_selected(cpus, 0, (u_long)tl_ipi_level, ipi); } +static __inline void +ipi_cpu(int cpu, u_int ipi) +{ + + /* + * XXX: Not ideal, but would require more work to add a cpu_ipi_cpu + * function pointer. + */ + cpu_ipi_selected(1 << cpu, 0, (u_long)tl_ipi_level, ipi); +} + #if defined(_MACHINE_PMAP_H_) && defined(_SYS_MUTEX_H_) static __inline void * |