summaryrefslogtreecommitdiffstats
path: root/sys/sun4v
diff options
context:
space:
mode:
Diffstat (limited to 'sys/sun4v')
-rw-r--r--sys/sun4v/include/smp.h3
-rw-r--r--sys/sun4v/sun4v/mp_machdep.c30
2 files changed, 28 insertions, 5 deletions
diff --git a/sys/sun4v/include/smp.h b/sys/sun4v/include/smp.h
index ec30d0d..4f5fc76 100644
--- a/sys/sun4v/include/smp.h
+++ b/sys/sun4v/include/smp.h
@@ -85,8 +85,9 @@ void cpu_ipi_preempt(struct trapframe *tf);
void cpu_ipi_hardclock(struct trapframe *tf);
void cpu_ipi_statclock(struct trapframe *tf);
-void ipi_selected(u_int cpus, u_int ipi);
void ipi_all_but_self(u_int ipi);
+void ipi_cpu(int cpu, u_int ipi);
+void ipi_selected(u_int cpus, u_int ipi);
vm_offset_t mp_tramp_alloc(void);
void mp_set_tsb_desc_ra(vm_paddr_t);
diff --git a/sys/sun4v/sun4v/mp_machdep.c b/sys/sun4v/sun4v/mp_machdep.c
index 6461cf8..a5fa692 100644
--- a/sys/sun4v/sun4v/mp_machdep.c
+++ b/sys/sun4v/sun4v/mp_machdep.c
@@ -535,7 +535,6 @@ retry:
}
}
-
void
ipi_selected(u_int icpus, u_int ipi)
{
@@ -550,7 +549,6 @@ ipi_selected(u_int icpus, u_int ipi)
* 4) handling 4-way threading vs 2-way threading should happen here
* and not in forward wakeup
*/
-
cpulist = PCPU_GET(cpulist);
cpus = (icpus & ~PCPU_GET(cpumask));
@@ -562,8 +560,32 @@ ipi_selected(u_int icpus, u_int ipi)
cpu_count++;
}
- cpu_ipi_selected(cpu_count, cpulist, (u_long)tl_ipi_level, ipi, 0, &ackmask);
-
+ cpu_ipi_selected(cpu_count, cpulist, (u_long)tl_ipi_level, ipi, 0,
+ &ackmask);
+}
+
+void
+ipi_cpu(int cpu, u_int ipi)
+{
+ int cpu_count;
+ uint16_t *cpulist;
+ uint64_t ackmask;
+
+ /*
+ *
+ * 3) forward_wakeup appears to abuse ASTs
+ * 4) handling 4-way threading vs 2-way threading should happen here
+ * and not in forward wakeup
+ */
+ cpulist = PCPU_GET(cpulist);
+ if (PCPU_GET(cpumask) & (1 << cpu))
+ cpu_count = 0;
+ else {
+ cpulist[0] = (uint16_t)cpu;
+ cpu_count = 1;
+ }
+ cpu_ipi_selected(cpu_count, cpulist, (u_long)tl_ipi_level, ipi, 0,
+ &ackmask);
}
void
OpenPOWER on IntegriCloud