Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147059738
D30018.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D30018.diff
View Options
diff --git a/sys/powerpc/powerpc/mp_machdep.c b/sys/powerpc/powerpc/mp_machdep.c
--- a/sys/powerpc/powerpc/mp_machdep.c
+++ b/sys/powerpc/powerpc/mp_machdep.c
@@ -299,49 +299,43 @@
{
u_int cpuid;
uint32_t ipimask;
- int msg;
CTR2(KTR_SMP, "%s: MSR 0x%08x", __func__, mfmsr());
ipimask = atomic_readandclear_32(&(pcpup->pc_ipimask));
if (ipimask == 0)
return (FILTER_STRAY);
- while ((msg = ffs(ipimask) - 1) != -1) {
- ipimask &= ~(1u << msg);
- switch (msg) {
- case IPI_AST:
- CTR1(KTR_SMP, "%s: IPI_AST", __func__);
- break;
- case IPI_PREEMPT:
- CTR1(KTR_SMP, "%s: IPI_PREEMPT", __func__);
- sched_preempt(curthread);
- break;
- case IPI_RENDEZVOUS:
- CTR1(KTR_SMP, "%s: IPI_RENDEZVOUS", __func__);
- smp_rendezvous_action();
- break;
- case IPI_STOP:
-
- /*
- * IPI_STOP_HARD is mapped to IPI_STOP so it is not
- * necessary to add such case in the switch.
- */
- CTR1(KTR_SMP, "%s: IPI_STOP or IPI_STOP_HARD (stop)",
- __func__);
- cpuid = PCPU_GET(cpuid);
- savectx(&stoppcbs[cpuid]);
- CPU_SET_ATOMIC(cpuid, &stopped_cpus);
- while (!CPU_ISSET(cpuid, &started_cpus))
- cpu_spinwait();
- CPU_CLR_ATOMIC(cpuid, &stopped_cpus);
- CPU_CLR_ATOMIC(cpuid, &started_cpus);
- CTR1(KTR_SMP, "%s: IPI_STOP (restart)", __func__);
- break;
- case IPI_HARDCLOCK:
- CTR1(KTR_SMP, "%s: IPI_HARDCLOCK", __func__);
- hardclockintr();
- break;
- }
+ if (ipimask & (1 << IPI_AST)) {
+ CTR1(KTR_SMP, "%s: IPI_AST", __func__);
+ }
+ if (ipimask & (1 << IPI_PREEMPT)) {
+ CTR1(KTR_SMP, "%s: IPI_PREEMPT", __func__);
+ sched_preempt(curthread);
+ }
+ if (ipimask & (1 << IPI_RENDEZVOUS)) {
+ CTR1(KTR_SMP, "%s: IPI_RENDEZVOUS", __func__);
+ smp_rendezvous_action();
+ }
+ if (ipimask & (1 << IPI_STOP)) {
+
+ /*
+ * IPI_STOP_HARD is mapped to IPI_STOP so it is not
+ * necessary to add such case.
+ */
+ CTR1(KTR_SMP, "%s: IPI_STOP or IPI_STOP_HARD (stop)",
+ __func__);
+ cpuid = PCPU_GET(cpuid);
+ savectx(&stoppcbs[cpuid]);
+ CPU_SET_ATOMIC(cpuid, &stopped_cpus);
+ while (!CPU_ISSET(cpuid, &started_cpus))
+ cpu_spinwait();
+ CPU_CLR_ATOMIC(cpuid, &stopped_cpus);
+ CPU_CLR_ATOMIC(cpuid, &started_cpus);
+ CTR1(KTR_SMP, "%s: IPI_STOP (restart)", __func__);
+ }
+ if (ipimask & (1 << IPI_HARDCLOCK)) {
+ CTR1(KTR_SMP, "%s: IPI_HARDCLOCK", __func__);
+ hardclockintr();
}
return (FILTER_HANDLED);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 9, 12:03 AM (15 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29365661
Default Alt Text
D30018.diff (2 KB)
Attached To
Mode
D30018: powerpc: Rework IPI message processing
Attached
Detach File
Event Timeline
Log In to Comment