Lines Matching defs:cpu

103 void		i386_cpu_IPI(int cpu);
109 static boolean_t cpu_signal_pending(int cpu, mp_event_t event);
142 volatile uint16_t cpu;
144 .cpu = KDP_XCPU_NONE
170 void i386_send_NMI(int cpu);
256 * Cache-alignment is to avoid cross-cpu false-sharing interference.
328 /* Here on the started cpu with cpu_running set TRUE */
333 * I've just started-up, synchronize again with the starter cpu
355 DBG("start_cpu(%p) about to start cpu %d, lapic %d\n",
369 DBG("start_cpu(%p) about to wait for cpu %d\n",
397 kprintf("TSC sync for cpu %d: 0x%016llx delta 0x%llx (%lld)\n",
405 "Unsynchronized TSC for cpu %d: "
427 * Initialize (or re-initialize) the descriptor tables for this cpu.
470 kprintf("Started cpu %d (lapic id %08x)\n", slot_num, lapic);
604 cpu_interrupt(int cpu)
609 && pmCPUExitIdle(cpu_datap(cpu))) {
610 i386_cpu_IPI(cpu);
614 KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_SCHED, MACH_REMOTE_AST), cpu, did_IPI, 0, 0, 0);
621 cpu_NMI_interrupt(int cpu)
624 i386_send_NMI(cpu);
640 cpu_PM_interrupt(int cpu)
645 if (cpu == cpu_number())
648 i386_signal_cpu(cpu, MP_CALL_PM, ASYNC);
659 i386_signal_cpu(int cpu, mp_event_t event, mp_sync_t mode)
661 volatile int *signals = &cpu_datap(cpu)->cpu_signals;
665 if (!cpu_datap(cpu)->cpu_running)
669 KERNEL_DEBUG(TRACE_MP_TLB_FLUSH | DBG_FUNC_START, cpu, 0, 0, 0, 0);
671 DBGLOG(cpu_signal, cpu, event);
674 i386_cpu_IPI(cpu);
683 cpu, event);
688 KERNEL_DEBUG(TRACE_MP_TLB_FLUSH | DBG_FUNC_END, cpu, 0, 0, 0, 0);
698 unsigned int cpu;
703 for (cpu = 0; cpu < real_ncpus; cpu++) {
704 if (cpu == my_cpu || !cpu_datap(cpu)->cpu_running)
706 i386_signal_cpu(cpu, event, mode);
717 unsigned int cpu;
722 for (cpu = 0; cpu < real_ncpus; cpu++) {
723 if (cpu_datap(cpu)->cpu_running)
822 /* call executor function on this cpu */
984 * and to initialize the per-cpu call queue.
1004 DBG("mp_cpus_call_init() done on cpu %d\n", cpu_number());
1009 * And also from i386_deactivate_cpu() when a cpu is being taken offline.
1041 * mp_cpus_call() runs a given function on cpus specified in a given cpu mask.
1043 * SYNC: function is called serially on target cpus in logical cpu order
1050 * The cpu mask may include the local cpu. Offline cpus are ignored.
1100 cpu_t cpu;
1125 * Queue the call for each non-local requested cpu.
1127 * and then re-check it after taking the call lock. A cpu being taken
1130 for (cpu = 0; cpu < (cpu_t) real_ncpus; cpu++) {
1131 if (((cpu_to_cpumask(cpu) & cpus) == 0) ||
1132 !cpu_datap(cpu)->cpu_running)
1134 if (cpu == (cpu_t) cpu_number()) {
1140 cpus_called |= cpu_to_cpumask(cpu);
1150 * Here to queue a call to cpu and IPI.
1154 mp_call_queue_t *cqp = &mp_cpus_call_head[cpu];
1160 if (!cpu_datap(cpu)->cpu_running) {
1166 cpus_notcalled |= cpu_to_cpumask(cpu);
1170 cpu, 0, 0, 0, 0);
1179 cpu, 0, 0, 0, 0);
1196 cpus_called |= cpu_to_cpumask(cpu);
1197 i386_signal_cpu(cpu, MP_CALL, ASYNC);
1223 cpu = (cpu_t) mp_cpus_signals + (call_self ? 1 : 0);
1232 cpu, cpus_called, cpus_notcalled, 0, 0);
1234 return cpu;
1279 mp_bc_ncpus = i386_active_cpus(); /* total including this cpu */
1283 /* call executor function on this cpu */
1334 * Move all of this cpu's timers to the master/boot cpu,
1374 unsigned int cpu;
1383 * In case of races, only one cpu is allowed to enter kdp after
1421 for (cpu = 0; cpu < real_ncpus; cpu++) {
1422 if (cpu == my_cpu || !cpu_datap(cpu)->cpu_running)
1425 i386_signal_cpu(cpu, MP_KDP, ASYNC);
1457 for (cpu = 0; cpu < real_ncpus; cpu++) {
1458 if (cpu == my_cpu || !cpu_datap(cpu)->cpu_running)
1460 if (cpu_signal_pending(cpu, MP_KDP))
1461 cpu_NMI_interrupt(cpu);
1466 for (cpu = 0; cpu < real_ncpus; cpu++) {
1467 if (cpu == my_cpu || !cpu_datap(cpu)->cpu_running)
1469 cpu_NMI_interrupt(cpu);
1479 cpu_signal_pending(int cpu, mp_event_t event)
1481 volatile int *signals = &cpu_datap(cpu)->cpu_signals;
1502 kdp_xcpu_call_func.cpu = lcpu;
1504 while (kdp_xcpu_call_func.cpu != KDP_XCPU_NONE)
1512 if ((uint16_t)cpu_number() == kdp_xcpu_call_func.cpu) {
1517 kdp_xcpu_call_func.cpu = KDP_XCPU_NONE;
1606 int cpu = processor->cpu_id;
1608 if (cpu != cpu_number()) {
1609 i386_signal_cpu(cpu, MP_AST, ASYNC);
1610 KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_SCHED, MACH_REMOTE_AST), cpu, 1, 0, 0, 0);