/* * dtrace_xcall() is not called from probe context. */ void dtrace_xcall(processorid_t cpu, dtrace_xcall_t f, void *arg) { xcArg_t xcArg; xcArg.cpu = cpu; xcArg.f = f; xcArg.arg = arg; mp_broadcast( xcRemote, (void *)&xcArg); }
/* Farm an update out to all CPUs */ static void xcpu_update(void) { if (register_locks() != KERN_SUCCESS) return; /* Get all CPUs to perform the update */ mp_broadcast(cpu_update, NULL); /* Update the cpuid info */ cpuid_set_info(); }
int broadcast_slave(int cnt, int bytes) { int i; for (i=0; i<cnt; i++) { if (flush & FLUSH_BETWEEN_ITERATIONS) { inval_dcache(); inval_mcache(); } mp_broadcast(&comm_world, 1); } return 0; }
int broadcast_master(int cnt, int bytes) { int i; unsigned long long total = 0; TIMER_START; for (i=0; i<cnt; i++) { if (flush & FLUSH_BETWEEN_ITERATIONS) { inval_dcache(); inval_mcache(); } mp_broadcast(&comm_world, 1); } TIMER_STOP; total = TIMER_ELAPSED; total -= calibrate_cache_flush(cnt); return(((unsigned long long)cnt*bytes*1000000)/(total*1024.0)); /* KB/sec */ }