Rename the IPI API from smp_ipi_* to ipi_* since the smp_ prefix is just
"redundant noise" and to match the IPI constant namespace (IPI_*). Requested by: bde
This commit is contained in:
parent
45908b2472
commit
79ad43b4b3
@ -173,7 +173,7 @@ smp_init_secondary(void)
|
||||
if (PCPU_GET(cpuid) + 1 > mp_ncpus)
|
||||
mp_ncpus = PCPU_GET(cpuid) + 1;
|
||||
spl0();
|
||||
smp_ipi_all(0);
|
||||
ipi_all(0);
|
||||
|
||||
mtx_unlock(&Giant);
|
||||
}
|
||||
@ -491,7 +491,7 @@ forward_statclock(int pscnt)
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
checkstate_probed_cpus = 0;
|
||||
if (map != 0)
|
||||
smp_ipi_selected(map, IPI_CHECKSTATE);
|
||||
ipi_selected(map, IPI_CHECKSTATE);
|
||||
|
||||
i = 0;
|
||||
while (checkstate_probed_cpus != map) {
|
||||
@ -521,7 +521,7 @@ forward_statclock(int pscnt)
|
||||
}
|
||||
if (map != 0) {
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -567,7 +567,7 @@ forward_hardclock(int pscnt)
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
checkstate_probed_cpus = 0;
|
||||
if (map != 0)
|
||||
smp_ipi_selected(map, IPI_CHECKSTATE);
|
||||
ipi_selected(map, IPI_CHECKSTATE);
|
||||
|
||||
i = 0;
|
||||
while (checkstate_probed_cpus != map) {
|
||||
@ -616,7 +616,7 @@ forward_hardclock(int pscnt)
|
||||
}
|
||||
if (map != 0) {
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -668,7 +668,7 @@ forward_signal(struct proc *p)
|
||||
return;
|
||||
map = (1<<id);
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -703,7 +703,7 @@ forward_roundrobin(void)
|
||||
return;
|
||||
resched_cpus |= PCPU_GET(other_cpus);
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -746,7 +746,7 @@ stop_cpus(u_int map)
|
||||
CTR1(KTR_SMP, "stop_cpus(%x)", map);
|
||||
|
||||
/* send the stop IPI to all CPUs in map */
|
||||
smp_ipi_selected(map, IPI_STOP);
|
||||
ipi_selected(map, IPI_STOP);
|
||||
|
||||
i = 0;
|
||||
while ((stopped_cpus & map) != map) {
|
||||
@ -851,7 +851,7 @@ smp_rendezvous(void (* setup_func)(void *),
|
||||
smp_rv_waiters[1] = 0;
|
||||
|
||||
/* signal other processors, which will enter the IPI with interrupts off */
|
||||
smp_ipi_all_but_self(IPI_RENDEZVOUS);
|
||||
ipi_all_but_self(IPI_RENDEZVOUS);
|
||||
|
||||
/* call executor function */
|
||||
smp_rendezvous_action();
|
||||
@ -864,11 +864,11 @@ smp_rendezvous(void (* setup_func)(void *),
|
||||
* send an IPI to a set of cpus.
|
||||
*/
|
||||
void
|
||||
smp_ipi_selected(u_int32_t cpus, u_int64_t ipi)
|
||||
ipi_selected(u_int32_t cpus, u_int64_t ipi)
|
||||
{
|
||||
struct globaldata *globaldata;
|
||||
|
||||
CTR2(KTR_SMP, "smp_ipi_selected: cpus: %x ipi: %lx", cpus, ipi);
|
||||
CTR2(KTR_SMP, "ipi_selected: cpus: %x ipi: %lx", cpus, ipi);
|
||||
alpha_mb();
|
||||
while (cpus) {
|
||||
int cpuid = ffs(cpus) - 1;
|
||||
@ -888,27 +888,27 @@ smp_ipi_selected(u_int32_t cpus, u_int64_t ipi)
|
||||
* send an IPI INTerrupt containing 'vector' to all CPUs, including myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_all(u_int64_t ipi)
|
||||
ipi_all(u_int64_t ipi)
|
||||
{
|
||||
smp_ipi_selected(all_cpus, ipi);
|
||||
ipi_selected(all_cpus, ipi);
|
||||
}
|
||||
|
||||
/*
|
||||
* send an IPI to all CPUs EXCEPT myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_all_but_self(u_int64_t ipi)
|
||||
ipi_all_but_self(u_int64_t ipi)
|
||||
{
|
||||
smp_ipi_selected(PCPU_GET(other_cpus), ipi);
|
||||
ipi_selected(PCPU_GET(other_cpus), ipi);
|
||||
}
|
||||
|
||||
/*
|
||||
* send an IPI to myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_self(u_int64_t ipi)
|
||||
ipi_self(u_int64_t ipi)
|
||||
{
|
||||
smp_ipi_selected(1 << PCPU_GET(cpuid), ipi);
|
||||
ipi_selected(1 << PCPU_GET(cpuid), ipi);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -42,10 +42,10 @@
|
||||
#define IPI_CHECKSTATE 0x0008
|
||||
#define IPI_STOP 0x0010
|
||||
|
||||
void smp_ipi_selected(u_int32_t cpus, u_int64_t ipi);
|
||||
void smp_ipi_all(u_int64_t ipi);
|
||||
void smp_ipi_all_but_self(u_int64_t ipi);
|
||||
void smp_ipi_self(u_int64_t ipi);
|
||||
void ipi_selected(u_int32_t cpus, u_int64_t ipi);
|
||||
void ipi_all(u_int64_t ipi);
|
||||
void ipi_all_but_self(u_int64_t ipi);
|
||||
void ipi_self(u_int64_t ipi);
|
||||
void smp_handle_ipi(struct trapframe *frame);
|
||||
#endif
|
||||
|
||||
|
@ -242,7 +242,7 @@ i686_mrstore(struct mem_range_softc *sc)
|
||||
{
|
||||
#ifdef SMP
|
||||
/*
|
||||
* We should use smp_ipi_all_but_self() to call other CPUs into a
|
||||
* We should use ipi_all_but_self() to call other CPUs into a
|
||||
* locking gate, then call a target function to do this work.
|
||||
* The "proper" solution involves a generalised locking gate
|
||||
* implementation, not ready yet.
|
||||
|
@ -2216,7 +2216,7 @@ smp_invltlb(void)
|
||||
{
|
||||
#if defined(APIC_IO)
|
||||
if (smp_started && invltlb_ok)
|
||||
smp_ipi_all_but_self(IPI_INVLTLB);
|
||||
ipi_all_but_self(IPI_INVLTLB);
|
||||
#endif /* APIC_IO */
|
||||
}
|
||||
|
||||
@ -2490,7 +2490,7 @@ forward_statclock(int pscnt)
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
checkstate_probed_cpus = 0;
|
||||
if (map != 0)
|
||||
smp_ipi_selected(map, IPI_CHECKSTATE);
|
||||
ipi_selected(map, IPI_CHECKSTATE);
|
||||
|
||||
i = 0;
|
||||
while (checkstate_probed_cpus != map) {
|
||||
@ -2520,7 +2520,7 @@ forward_statclock(int pscnt)
|
||||
}
|
||||
if (map != 0) {
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2566,7 +2566,7 @@ forward_hardclock(int pscnt)
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
checkstate_probed_cpus = 0;
|
||||
if (map != 0)
|
||||
smp_ipi_selected(map, IPI_CHECKSTATE);
|
||||
ipi_selected(map, IPI_CHECKSTATE);
|
||||
|
||||
i = 0;
|
||||
while (checkstate_probed_cpus != map) {
|
||||
@ -2614,7 +2614,7 @@ forward_hardclock(int pscnt)
|
||||
}
|
||||
if (map != 0) {
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2666,7 +2666,7 @@ forward_signal(struct proc *p)
|
||||
return;
|
||||
map = (1<<id);
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2702,9 +2702,9 @@ forward_roundrobin(void)
|
||||
resched_cpus |= PCPU_GET(other_cpus);
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
#if 1
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
#else
|
||||
smp_ipi_all_but_self(IPI_AST);
|
||||
ipi_all_but_self(IPI_AST);
|
||||
#endif
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
@ -2746,7 +2746,7 @@ stop_cpus(u_int map)
|
||||
return 0;
|
||||
|
||||
/* send the Xcpustop IPI to all CPUs in map */
|
||||
smp_ipi_selected(map, IPI_STOP);
|
||||
ipi_selected(map, IPI_STOP);
|
||||
|
||||
while (count++ < 100000 && (stopped_cpus & map) != map)
|
||||
/* spin */ ;
|
||||
@ -2872,7 +2872,7 @@ smp_rendezvous(void (* setup_func)(void *),
|
||||
/*
|
||||
* signal other processors, which will enter the IPI with interrupts off
|
||||
*/
|
||||
smp_ipi_all_but_self(IPI_RENDEZVOUS);
|
||||
ipi_all_but_self(IPI_RENDEZVOUS);
|
||||
|
||||
/* call executor function */
|
||||
smp_rendezvous_action();
|
||||
@ -2885,7 +2885,7 @@ smp_rendezvous(void (* setup_func)(void *),
|
||||
* send an IPI to a set of cpus.
|
||||
*/
|
||||
void
|
||||
smp_ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
{
|
||||
|
||||
CTR2(KTR_SMP, __func__ ": cpus: %x ipi: %x", cpus, ipi);
|
||||
@ -2896,7 +2896,7 @@ smp_ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
* send an IPI INTerrupt containing 'vector' to all CPUs, including myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_all(u_int ipi)
|
||||
ipi_all(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
@ -2907,7 +2907,7 @@ smp_ipi_all(u_int ipi)
|
||||
* send an IPI to all CPUs EXCEPT myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_all_but_self(u_int ipi)
|
||||
ipi_all_but_self(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
@ -2918,7 +2918,7 @@ smp_ipi_all_but_self(u_int ipi)
|
||||
* send an IPI to myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_self(u_int ipi)
|
||||
ipi_self(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
|
@ -2216,7 +2216,7 @@ smp_invltlb(void)
|
||||
{
|
||||
#if defined(APIC_IO)
|
||||
if (smp_started && invltlb_ok)
|
||||
smp_ipi_all_but_self(IPI_INVLTLB);
|
||||
ipi_all_but_self(IPI_INVLTLB);
|
||||
#endif /* APIC_IO */
|
||||
}
|
||||
|
||||
@ -2490,7 +2490,7 @@ forward_statclock(int pscnt)
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
checkstate_probed_cpus = 0;
|
||||
if (map != 0)
|
||||
smp_ipi_selected(map, IPI_CHECKSTATE);
|
||||
ipi_selected(map, IPI_CHECKSTATE);
|
||||
|
||||
i = 0;
|
||||
while (checkstate_probed_cpus != map) {
|
||||
@ -2520,7 +2520,7 @@ forward_statclock(int pscnt)
|
||||
}
|
||||
if (map != 0) {
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2566,7 +2566,7 @@ forward_hardclock(int pscnt)
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
checkstate_probed_cpus = 0;
|
||||
if (map != 0)
|
||||
smp_ipi_selected(map, IPI_CHECKSTATE);
|
||||
ipi_selected(map, IPI_CHECKSTATE);
|
||||
|
||||
i = 0;
|
||||
while (checkstate_probed_cpus != map) {
|
||||
@ -2614,7 +2614,7 @@ forward_hardclock(int pscnt)
|
||||
}
|
||||
if (map != 0) {
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2666,7 +2666,7 @@ forward_signal(struct proc *p)
|
||||
return;
|
||||
map = (1<<id);
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2702,9 +2702,9 @@ forward_roundrobin(void)
|
||||
resched_cpus |= PCPU_GET(other_cpus);
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
#if 1
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
#else
|
||||
smp_ipi_all_but_self(IPI_AST);
|
||||
ipi_all_but_self(IPI_AST);
|
||||
#endif
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
@ -2746,7 +2746,7 @@ stop_cpus(u_int map)
|
||||
return 0;
|
||||
|
||||
/* send the Xcpustop IPI to all CPUs in map */
|
||||
smp_ipi_selected(map, IPI_STOP);
|
||||
ipi_selected(map, IPI_STOP);
|
||||
|
||||
while (count++ < 100000 && (stopped_cpus & map) != map)
|
||||
/* spin */ ;
|
||||
@ -2872,7 +2872,7 @@ smp_rendezvous(void (* setup_func)(void *),
|
||||
/*
|
||||
* signal other processors, which will enter the IPI with interrupts off
|
||||
*/
|
||||
smp_ipi_all_but_self(IPI_RENDEZVOUS);
|
||||
ipi_all_but_self(IPI_RENDEZVOUS);
|
||||
|
||||
/* call executor function */
|
||||
smp_rendezvous_action();
|
||||
@ -2885,7 +2885,7 @@ smp_rendezvous(void (* setup_func)(void *),
|
||||
* send an IPI to a set of cpus.
|
||||
*/
|
||||
void
|
||||
smp_ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
{
|
||||
|
||||
CTR2(KTR_SMP, __func__ ": cpus: %x ipi: %x", cpus, ipi);
|
||||
@ -2896,7 +2896,7 @@ smp_ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
* send an IPI INTerrupt containing 'vector' to all CPUs, including myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_all(u_int ipi)
|
||||
ipi_all(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
@ -2907,7 +2907,7 @@ smp_ipi_all(u_int ipi)
|
||||
* send an IPI to all CPUs EXCEPT myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_all_but_self(u_int ipi)
|
||||
ipi_all_but_self(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
@ -2918,7 +2918,7 @@ smp_ipi_all_but_self(u_int ipi)
|
||||
* send an IPI to myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_self(u_int ipi)
|
||||
ipi_self(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
|
@ -2216,7 +2216,7 @@ smp_invltlb(void)
|
||||
{
|
||||
#if defined(APIC_IO)
|
||||
if (smp_started && invltlb_ok)
|
||||
smp_ipi_all_but_self(IPI_INVLTLB);
|
||||
ipi_all_but_self(IPI_INVLTLB);
|
||||
#endif /* APIC_IO */
|
||||
}
|
||||
|
||||
@ -2490,7 +2490,7 @@ forward_statclock(int pscnt)
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
checkstate_probed_cpus = 0;
|
||||
if (map != 0)
|
||||
smp_ipi_selected(map, IPI_CHECKSTATE);
|
||||
ipi_selected(map, IPI_CHECKSTATE);
|
||||
|
||||
i = 0;
|
||||
while (checkstate_probed_cpus != map) {
|
||||
@ -2520,7 +2520,7 @@ forward_statclock(int pscnt)
|
||||
}
|
||||
if (map != 0) {
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2566,7 +2566,7 @@ forward_hardclock(int pscnt)
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
checkstate_probed_cpus = 0;
|
||||
if (map != 0)
|
||||
smp_ipi_selected(map, IPI_CHECKSTATE);
|
||||
ipi_selected(map, IPI_CHECKSTATE);
|
||||
|
||||
i = 0;
|
||||
while (checkstate_probed_cpus != map) {
|
||||
@ -2614,7 +2614,7 @@ forward_hardclock(int pscnt)
|
||||
}
|
||||
if (map != 0) {
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2666,7 +2666,7 @@ forward_signal(struct proc *p)
|
||||
return;
|
||||
map = (1<<id);
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2702,9 +2702,9 @@ forward_roundrobin(void)
|
||||
resched_cpus |= PCPU_GET(other_cpus);
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
#if 1
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
#else
|
||||
smp_ipi_all_but_self(IPI_AST);
|
||||
ipi_all_but_self(IPI_AST);
|
||||
#endif
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
@ -2746,7 +2746,7 @@ stop_cpus(u_int map)
|
||||
return 0;
|
||||
|
||||
/* send the Xcpustop IPI to all CPUs in map */
|
||||
smp_ipi_selected(map, IPI_STOP);
|
||||
ipi_selected(map, IPI_STOP);
|
||||
|
||||
while (count++ < 100000 && (stopped_cpus & map) != map)
|
||||
/* spin */ ;
|
||||
@ -2872,7 +2872,7 @@ smp_rendezvous(void (* setup_func)(void *),
|
||||
/*
|
||||
* signal other processors, which will enter the IPI with interrupts off
|
||||
*/
|
||||
smp_ipi_all_but_self(IPI_RENDEZVOUS);
|
||||
ipi_all_but_self(IPI_RENDEZVOUS);
|
||||
|
||||
/* call executor function */
|
||||
smp_rendezvous_action();
|
||||
@ -2885,7 +2885,7 @@ smp_rendezvous(void (* setup_func)(void *),
|
||||
* send an IPI to a set of cpus.
|
||||
*/
|
||||
void
|
||||
smp_ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
{
|
||||
|
||||
CTR2(KTR_SMP, __func__ ": cpus: %x ipi: %x", cpus, ipi);
|
||||
@ -2896,7 +2896,7 @@ smp_ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
* send an IPI INTerrupt containing 'vector' to all CPUs, including myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_all(u_int ipi)
|
||||
ipi_all(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
@ -2907,7 +2907,7 @@ smp_ipi_all(u_int ipi)
|
||||
* send an IPI to all CPUs EXCEPT myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_all_but_self(u_int ipi)
|
||||
ipi_all_but_self(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
@ -2918,7 +2918,7 @@ smp_ipi_all_but_self(u_int ipi)
|
||||
* send an IPI to myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_self(u_int ipi)
|
||||
ipi_self(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
|
@ -242,7 +242,7 @@ i686_mrstore(struct mem_range_softc *sc)
|
||||
{
|
||||
#ifdef SMP
|
||||
/*
|
||||
* We should use smp_ipi_all_but_self() to call other CPUs into a
|
||||
* We should use ipi_all_but_self() to call other CPUs into a
|
||||
* locking gate, then call a target function to do this work.
|
||||
* The "proper" solution involves a generalised locking gate
|
||||
* implementation, not ready yet.
|
||||
|
@ -2216,7 +2216,7 @@ smp_invltlb(void)
|
||||
{
|
||||
#if defined(APIC_IO)
|
||||
if (smp_started && invltlb_ok)
|
||||
smp_ipi_all_but_self(IPI_INVLTLB);
|
||||
ipi_all_but_self(IPI_INVLTLB);
|
||||
#endif /* APIC_IO */
|
||||
}
|
||||
|
||||
@ -2490,7 +2490,7 @@ forward_statclock(int pscnt)
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
checkstate_probed_cpus = 0;
|
||||
if (map != 0)
|
||||
smp_ipi_selected(map, IPI_CHECKSTATE);
|
||||
ipi_selected(map, IPI_CHECKSTATE);
|
||||
|
||||
i = 0;
|
||||
while (checkstate_probed_cpus != map) {
|
||||
@ -2520,7 +2520,7 @@ forward_statclock(int pscnt)
|
||||
}
|
||||
if (map != 0) {
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2566,7 +2566,7 @@ forward_hardclock(int pscnt)
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
checkstate_probed_cpus = 0;
|
||||
if (map != 0)
|
||||
smp_ipi_selected(map, IPI_CHECKSTATE);
|
||||
ipi_selected(map, IPI_CHECKSTATE);
|
||||
|
||||
i = 0;
|
||||
while (checkstate_probed_cpus != map) {
|
||||
@ -2614,7 +2614,7 @@ forward_hardclock(int pscnt)
|
||||
}
|
||||
if (map != 0) {
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2666,7 +2666,7 @@ forward_signal(struct proc *p)
|
||||
return;
|
||||
map = (1<<id);
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2702,9 +2702,9 @@ forward_roundrobin(void)
|
||||
resched_cpus |= PCPU_GET(other_cpus);
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
#if 1
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
#else
|
||||
smp_ipi_all_but_self(IPI_AST);
|
||||
ipi_all_but_self(IPI_AST);
|
||||
#endif
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
@ -2746,7 +2746,7 @@ stop_cpus(u_int map)
|
||||
return 0;
|
||||
|
||||
/* send the Xcpustop IPI to all CPUs in map */
|
||||
smp_ipi_selected(map, IPI_STOP);
|
||||
ipi_selected(map, IPI_STOP);
|
||||
|
||||
while (count++ < 100000 && (stopped_cpus & map) != map)
|
||||
/* spin */ ;
|
||||
@ -2872,7 +2872,7 @@ smp_rendezvous(void (* setup_func)(void *),
|
||||
/*
|
||||
* signal other processors, which will enter the IPI with interrupts off
|
||||
*/
|
||||
smp_ipi_all_but_self(IPI_RENDEZVOUS);
|
||||
ipi_all_but_self(IPI_RENDEZVOUS);
|
||||
|
||||
/* call executor function */
|
||||
smp_rendezvous_action();
|
||||
@ -2885,7 +2885,7 @@ smp_rendezvous(void (* setup_func)(void *),
|
||||
* send an IPI to a set of cpus.
|
||||
*/
|
||||
void
|
||||
smp_ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
{
|
||||
|
||||
CTR2(KTR_SMP, __func__ ": cpus: %x ipi: %x", cpus, ipi);
|
||||
@ -2896,7 +2896,7 @@ smp_ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
* send an IPI INTerrupt containing 'vector' to all CPUs, including myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_all(u_int ipi)
|
||||
ipi_all(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
@ -2907,7 +2907,7 @@ smp_ipi_all(u_int ipi)
|
||||
* send an IPI to all CPUs EXCEPT myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_all_but_self(u_int ipi)
|
||||
ipi_all_but_self(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
@ -2918,7 +2918,7 @@ smp_ipi_all_but_self(u_int ipi)
|
||||
* send an IPI to myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_self(u_int ipi)
|
||||
ipi_self(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
|
@ -2216,7 +2216,7 @@ smp_invltlb(void)
|
||||
{
|
||||
#if defined(APIC_IO)
|
||||
if (smp_started && invltlb_ok)
|
||||
smp_ipi_all_but_self(IPI_INVLTLB);
|
||||
ipi_all_but_self(IPI_INVLTLB);
|
||||
#endif /* APIC_IO */
|
||||
}
|
||||
|
||||
@ -2490,7 +2490,7 @@ forward_statclock(int pscnt)
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
checkstate_probed_cpus = 0;
|
||||
if (map != 0)
|
||||
smp_ipi_selected(map, IPI_CHECKSTATE);
|
||||
ipi_selected(map, IPI_CHECKSTATE);
|
||||
|
||||
i = 0;
|
||||
while (checkstate_probed_cpus != map) {
|
||||
@ -2520,7 +2520,7 @@ forward_statclock(int pscnt)
|
||||
}
|
||||
if (map != 0) {
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2566,7 +2566,7 @@ forward_hardclock(int pscnt)
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
checkstate_probed_cpus = 0;
|
||||
if (map != 0)
|
||||
smp_ipi_selected(map, IPI_CHECKSTATE);
|
||||
ipi_selected(map, IPI_CHECKSTATE);
|
||||
|
||||
i = 0;
|
||||
while (checkstate_probed_cpus != map) {
|
||||
@ -2614,7 +2614,7 @@ forward_hardclock(int pscnt)
|
||||
}
|
||||
if (map != 0) {
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2666,7 +2666,7 @@ forward_signal(struct proc *p)
|
||||
return;
|
||||
map = (1<<id);
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2702,9 +2702,9 @@ forward_roundrobin(void)
|
||||
resched_cpus |= PCPU_GET(other_cpus);
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
#if 1
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
#else
|
||||
smp_ipi_all_but_self(IPI_AST);
|
||||
ipi_all_but_self(IPI_AST);
|
||||
#endif
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
@ -2746,7 +2746,7 @@ stop_cpus(u_int map)
|
||||
return 0;
|
||||
|
||||
/* send the Xcpustop IPI to all CPUs in map */
|
||||
smp_ipi_selected(map, IPI_STOP);
|
||||
ipi_selected(map, IPI_STOP);
|
||||
|
||||
while (count++ < 100000 && (stopped_cpus & map) != map)
|
||||
/* spin */ ;
|
||||
@ -2872,7 +2872,7 @@ smp_rendezvous(void (* setup_func)(void *),
|
||||
/*
|
||||
* signal other processors, which will enter the IPI with interrupts off
|
||||
*/
|
||||
smp_ipi_all_but_self(IPI_RENDEZVOUS);
|
||||
ipi_all_but_self(IPI_RENDEZVOUS);
|
||||
|
||||
/* call executor function */
|
||||
smp_rendezvous_action();
|
||||
@ -2885,7 +2885,7 @@ smp_rendezvous(void (* setup_func)(void *),
|
||||
* send an IPI to a set of cpus.
|
||||
*/
|
||||
void
|
||||
smp_ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
{
|
||||
|
||||
CTR2(KTR_SMP, __func__ ": cpus: %x ipi: %x", cpus, ipi);
|
||||
@ -2896,7 +2896,7 @@ smp_ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
* send an IPI INTerrupt containing 'vector' to all CPUs, including myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_all(u_int ipi)
|
||||
ipi_all(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
@ -2907,7 +2907,7 @@ smp_ipi_all(u_int ipi)
|
||||
* send an IPI to all CPUs EXCEPT myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_all_but_self(u_int ipi)
|
||||
ipi_all_but_self(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
@ -2918,7 +2918,7 @@ smp_ipi_all_but_self(u_int ipi)
|
||||
* send an IPI to myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_self(u_int ipi)
|
||||
ipi_self(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
|
@ -54,10 +54,10 @@
|
||||
#define IPI_CHECKSTATE XCPUCHECKSTATE_OFFSET
|
||||
#define IPI_STOP XCPUSTOP_OFFSET
|
||||
|
||||
void smp_ipi_selected(u_int32_t cpus, u_int ipi);
|
||||
void smp_ipi_all(u_int ipi);
|
||||
void smp_ipi_all_but_self(u_int ipi);
|
||||
void smp_ipi_self(u_int ipi);
|
||||
void ipi_selected(u_int32_t cpus, u_int ipi);
|
||||
void ipi_all(u_int ipi);
|
||||
void ipi_all_but_self(u_int ipi);
|
||||
void ipi_self(u_int ipi);
|
||||
#endif /* SMP */
|
||||
#endif /* !LOCORE */
|
||||
|
||||
|
@ -2216,7 +2216,7 @@ smp_invltlb(void)
|
||||
{
|
||||
#if defined(APIC_IO)
|
||||
if (smp_started && invltlb_ok)
|
||||
smp_ipi_all_but_self(IPI_INVLTLB);
|
||||
ipi_all_but_self(IPI_INVLTLB);
|
||||
#endif /* APIC_IO */
|
||||
}
|
||||
|
||||
@ -2490,7 +2490,7 @@ forward_statclock(int pscnt)
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
checkstate_probed_cpus = 0;
|
||||
if (map != 0)
|
||||
smp_ipi_selected(map, IPI_CHECKSTATE);
|
||||
ipi_selected(map, IPI_CHECKSTATE);
|
||||
|
||||
i = 0;
|
||||
while (checkstate_probed_cpus != map) {
|
||||
@ -2520,7 +2520,7 @@ forward_statclock(int pscnt)
|
||||
}
|
||||
if (map != 0) {
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2566,7 +2566,7 @@ forward_hardclock(int pscnt)
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
checkstate_probed_cpus = 0;
|
||||
if (map != 0)
|
||||
smp_ipi_selected(map, IPI_CHECKSTATE);
|
||||
ipi_selected(map, IPI_CHECKSTATE);
|
||||
|
||||
i = 0;
|
||||
while (checkstate_probed_cpus != map) {
|
||||
@ -2614,7 +2614,7 @@ forward_hardclock(int pscnt)
|
||||
}
|
||||
if (map != 0) {
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2666,7 +2666,7 @@ forward_signal(struct proc *p)
|
||||
return;
|
||||
map = (1<<id);
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2702,9 +2702,9 @@ forward_roundrobin(void)
|
||||
resched_cpus |= PCPU_GET(other_cpus);
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
#if 1
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
#else
|
||||
smp_ipi_all_but_self(IPI_AST);
|
||||
ipi_all_but_self(IPI_AST);
|
||||
#endif
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
@ -2746,7 +2746,7 @@ stop_cpus(u_int map)
|
||||
return 0;
|
||||
|
||||
/* send the Xcpustop IPI to all CPUs in map */
|
||||
smp_ipi_selected(map, IPI_STOP);
|
||||
ipi_selected(map, IPI_STOP);
|
||||
|
||||
while (count++ < 100000 && (stopped_cpus & map) != map)
|
||||
/* spin */ ;
|
||||
@ -2872,7 +2872,7 @@ smp_rendezvous(void (* setup_func)(void *),
|
||||
/*
|
||||
* signal other processors, which will enter the IPI with interrupts off
|
||||
*/
|
||||
smp_ipi_all_but_self(IPI_RENDEZVOUS);
|
||||
ipi_all_but_self(IPI_RENDEZVOUS);
|
||||
|
||||
/* call executor function */
|
||||
smp_rendezvous_action();
|
||||
@ -2885,7 +2885,7 @@ smp_rendezvous(void (* setup_func)(void *),
|
||||
* send an IPI to a set of cpus.
|
||||
*/
|
||||
void
|
||||
smp_ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
{
|
||||
|
||||
CTR2(KTR_SMP, __func__ ": cpus: %x ipi: %x", cpus, ipi);
|
||||
@ -2896,7 +2896,7 @@ smp_ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
* send an IPI INTerrupt containing 'vector' to all CPUs, including myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_all(u_int ipi)
|
||||
ipi_all(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
@ -2907,7 +2907,7 @@ smp_ipi_all(u_int ipi)
|
||||
* send an IPI to all CPUs EXCEPT myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_all_but_self(u_int ipi)
|
||||
ipi_all_but_self(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
@ -2918,7 +2918,7 @@ smp_ipi_all_but_self(u_int ipi)
|
||||
* send an IPI to myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_self(u_int ipi)
|
||||
ipi_self(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
|
@ -285,7 +285,7 @@ forward_statclock(int pscnt)
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
checkstate_probed_cpus = 0;
|
||||
if (map != 0)
|
||||
smp_ipi_selected(map, IPI_CHECKSTATE);
|
||||
ipi_selected(map, IPI_CHECKSTATE);
|
||||
|
||||
i = 0;
|
||||
while (checkstate_probed_cpus != map) {
|
||||
@ -315,7 +315,7 @@ forward_statclock(int pscnt)
|
||||
}
|
||||
if (map != 0) {
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -361,7 +361,7 @@ forward_hardclock(int pscnt)
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
checkstate_probed_cpus = 0;
|
||||
if (map != 0)
|
||||
smp_ipi_selected(map, IPI_CHECKSTATE);
|
||||
ipi_selected(map, IPI_CHECKSTATE);
|
||||
|
||||
i = 0;
|
||||
while (checkstate_probed_cpus != map) {
|
||||
@ -410,7 +410,7 @@ forward_hardclock(int pscnt)
|
||||
}
|
||||
if (map != 0) {
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -458,7 +458,7 @@ forward_signal(struct proc *p)
|
||||
return;
|
||||
map = (1<<id);
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -490,7 +490,7 @@ forward_roundrobin(void)
|
||||
return;
|
||||
resched_cpus |= PCPU_GET(other_cpus);
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -533,7 +533,7 @@ stop_cpus(u_int map)
|
||||
CTR1(KTR_SMP, "stop_cpus(%x)", map);
|
||||
|
||||
/* send the stop IPI to all CPUs in map */
|
||||
smp_ipi_selected(map, IPI_STOP);
|
||||
ipi_selected(map, IPI_STOP);
|
||||
|
||||
i = 0;
|
||||
while ((stopped_cpus & map) != map) {
|
||||
@ -638,7 +638,7 @@ smp_rendezvous(void (* setup_func)(void *),
|
||||
smp_rv_waiters[1] = 0;
|
||||
|
||||
/* signal other processors, which will enter the IPI with interrupts off */
|
||||
smp_ipi_all_but_self(IPI_RENDEZVOUS);
|
||||
ipi_all_but_self(IPI_RENDEZVOUS);
|
||||
|
||||
/* call executor function */
|
||||
smp_rendezvous_action();
|
||||
@ -651,11 +651,11 @@ smp_rendezvous(void (* setup_func)(void *),
|
||||
* send an IPI to a set of cpus.
|
||||
*/
|
||||
void
|
||||
smp_ipi_selected(u_int32_t cpus, u_int64_t ipi)
|
||||
ipi_selected(u_int32_t cpus, u_int64_t ipi)
|
||||
{
|
||||
struct globaldata *globaldata;
|
||||
|
||||
CTR2(KTR_SMP, "smp_ipi_selected: cpus: %x ipi: %lx", cpus, ipi);
|
||||
CTR2(KTR_SMP, "ipi_selected: cpus: %x ipi: %lx", cpus, ipi);
|
||||
ia64_mf();
|
||||
while (cpus) {
|
||||
int cpuid = ffs(cpus) - 1;
|
||||
@ -677,27 +677,27 @@ smp_ipi_selected(u_int32_t cpus, u_int64_t ipi)
|
||||
* send an IPI INTerrupt containing 'vector' to all CPUs, including myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_all(u_int64_t ipi)
|
||||
ipi_all(u_int64_t ipi)
|
||||
{
|
||||
smp_ipi_selected(all_cpus, ipi);
|
||||
ipi_selected(all_cpus, ipi);
|
||||
}
|
||||
|
||||
/*
|
||||
* send an IPI to all CPUs EXCEPT myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_all_but_self(u_int64_t ipi)
|
||||
ipi_all_but_self(u_int64_t ipi)
|
||||
{
|
||||
smp_ipi_selected(PCPU_GET(other_cpus), ipi);
|
||||
ipi_selected(PCPU_GET(other_cpus), ipi);
|
||||
}
|
||||
|
||||
/*
|
||||
* send an IPI to myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_self(u_int64_t ipi)
|
||||
ipi_self(u_int64_t ipi)
|
||||
{
|
||||
smp_ipi_selected(1 << PCPU_GET(cpuid), ipi);
|
||||
ipi_selected(1 << PCPU_GET(cpuid), ipi);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -38,10 +38,10 @@
|
||||
#define IPI_CHECKSTATE 0x0008
|
||||
#define IPI_STOP 0x0010
|
||||
|
||||
void smp_ipi_selected(u_int32_t cpus, u_int64_t ipi);
|
||||
void smp_ipi_all(u_int64_t ipi);
|
||||
void smp_ipi_all_but_self(u_int64_t ipi);
|
||||
void smp_ipi_self(u_int64_t ipi);
|
||||
void ipi_selected(u_int32_t cpus, u_int64_t ipi);
|
||||
void ipi_all(u_int64_t ipi);
|
||||
void ipi_all_but_self(u_int64_t ipi);
|
||||
void ipi_self(u_int64_t ipi);
|
||||
void smp_handle_ipi(struct trapframe *frame);
|
||||
|
||||
#endif /* !_MACHINE_IPL_H_ */
|
||||
|
@ -2216,7 +2216,7 @@ smp_invltlb(void)
|
||||
{
|
||||
#if defined(APIC_IO)
|
||||
if (smp_started && invltlb_ok)
|
||||
smp_ipi_all_but_self(IPI_INVLTLB);
|
||||
ipi_all_but_self(IPI_INVLTLB);
|
||||
#endif /* APIC_IO */
|
||||
}
|
||||
|
||||
@ -2490,7 +2490,7 @@ forward_statclock(int pscnt)
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
checkstate_probed_cpus = 0;
|
||||
if (map != 0)
|
||||
smp_ipi_selected(map, IPI_CHECKSTATE);
|
||||
ipi_selected(map, IPI_CHECKSTATE);
|
||||
|
||||
i = 0;
|
||||
while (checkstate_probed_cpus != map) {
|
||||
@ -2520,7 +2520,7 @@ forward_statclock(int pscnt)
|
||||
}
|
||||
if (map != 0) {
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2566,7 +2566,7 @@ forward_hardclock(int pscnt)
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
checkstate_probed_cpus = 0;
|
||||
if (map != 0)
|
||||
smp_ipi_selected(map, IPI_CHECKSTATE);
|
||||
ipi_selected(map, IPI_CHECKSTATE);
|
||||
|
||||
i = 0;
|
||||
while (checkstate_probed_cpus != map) {
|
||||
@ -2614,7 +2614,7 @@ forward_hardclock(int pscnt)
|
||||
}
|
||||
if (map != 0) {
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2666,7 +2666,7 @@ forward_signal(struct proc *p)
|
||||
return;
|
||||
map = (1<<id);
|
||||
checkstate_need_ast |= map;
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
/* spin */
|
||||
@ -2702,9 +2702,9 @@ forward_roundrobin(void)
|
||||
resched_cpus |= PCPU_GET(other_cpus);
|
||||
map = PCPU_GET(other_cpus) & ~stopped_cpus ;
|
||||
#if 1
|
||||
smp_ipi_selected(map, IPI_AST);
|
||||
ipi_selected(map, IPI_AST);
|
||||
#else
|
||||
smp_ipi_all_but_self(IPI_AST);
|
||||
ipi_all_but_self(IPI_AST);
|
||||
#endif
|
||||
i = 0;
|
||||
while ((checkstate_need_ast & map) != 0) {
|
||||
@ -2746,7 +2746,7 @@ stop_cpus(u_int map)
|
||||
return 0;
|
||||
|
||||
/* send the Xcpustop IPI to all CPUs in map */
|
||||
smp_ipi_selected(map, IPI_STOP);
|
||||
ipi_selected(map, IPI_STOP);
|
||||
|
||||
while (count++ < 100000 && (stopped_cpus & map) != map)
|
||||
/* spin */ ;
|
||||
@ -2872,7 +2872,7 @@ smp_rendezvous(void (* setup_func)(void *),
|
||||
/*
|
||||
* signal other processors, which will enter the IPI with interrupts off
|
||||
*/
|
||||
smp_ipi_all_but_self(IPI_RENDEZVOUS);
|
||||
ipi_all_but_self(IPI_RENDEZVOUS);
|
||||
|
||||
/* call executor function */
|
||||
smp_rendezvous_action();
|
||||
@ -2885,7 +2885,7 @@ smp_rendezvous(void (* setup_func)(void *),
|
||||
* send an IPI to a set of cpus.
|
||||
*/
|
||||
void
|
||||
smp_ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
{
|
||||
|
||||
CTR2(KTR_SMP, __func__ ": cpus: %x ipi: %x", cpus, ipi);
|
||||
@ -2896,7 +2896,7 @@ smp_ipi_selected(u_int32_t cpus, u_int ipi)
|
||||
* send an IPI INTerrupt containing 'vector' to all CPUs, including myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_all(u_int ipi)
|
||||
ipi_all(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
@ -2907,7 +2907,7 @@ smp_ipi_all(u_int ipi)
|
||||
* send an IPI to all CPUs EXCEPT myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_all_but_self(u_int ipi)
|
||||
ipi_all_but_self(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
@ -2918,7 +2918,7 @@ smp_ipi_all_but_self(u_int ipi)
|
||||
* send an IPI to myself
|
||||
*/
|
||||
void
|
||||
smp_ipi_self(u_int ipi)
|
||||
ipi_self(u_int ipi)
|
||||
{
|
||||
|
||||
CTR1(KTR_SMP, __func__ ": ipi: %x", ipi);
|
||||
|
Loading…
Reference in New Issue
Block a user