Lines Matching defs:cpu
108 #include <sys/cpu.h>
119 * in the IPI, and the clock VIRQ which also has an event channel per cpu
124 * example. This code allows any cpu to bind to one of these, although
209 xen_bind_virq(unsigned int virq, processorid_t cpu, int *port)
215 bind.vcpu = cpu;
274 xen_bind_ipi(processorid_t cpu)
280 bind.vcpu = cpu;
288 xen_bind_vcpu(int evtchn, int cpu)
295 bind.vcpu = cpu;
366 alloc_irq_evtchn(int irq, int index, int evtchn, int cpu)
372 ipi_info[index].mi_evtchns[cpu] = evtchn;
376 virq_info[index].mi_evtchns[cpu] = evtchn;
390 if (cpu != -1) {
392 CPUSET_ONLY(tcpus, cpu);
398 alloc_irq(int type, int index, int evtchn, int cpu)
404 ASSERT(type != IRQT_IPI || cpu != -1);
422 alloc_irq_evtchn(irq, index, evtchn, cpu);
513 ec_bind_vcpu(int evtchn, int cpu)
516 xen_bind_vcpu(evtchn, cpu);
583 * Each cpu on the system can have it's own event channel
691 ec_bind_virq_to_irq(int virq, int cpu)
700 err = xen_bind_virq(virq, cpu, &evtchn);
706 virqp->mi_irq = alloc_irq(IRQT_VIRQ, virq, evtchn, cpu);
708 alloc_irq_evtchn(virqp->mi_irq, virq, evtchn, cpu);
717 ec_bind_ipi_to_irq(int ipl, int cpu)
727 evtchn = xen_bind_ipi(cpu);
732 ipip->mi_irq = alloc_irq(IRQT_IPI, ipl, evtchn, cpu);
734 alloc_irq_evtchn(ipip->mi_irq, ipl, evtchn, cpu);
738 * Unmask the new evtchn so that it can be seen by the target cpu
752 ec_bind_cpu_ipis(int cpu)
761 (void) ec_bind_ipi_to_irq(i, cpu);
784 ec_irq_needs_rebind(int irq, int cpu)
789 CPU_IN_SET(evtchn_cpus[irqp->ii_u.evtchn], cpu));
793 ec_send_ipi(int ipl, int cpu)
799 ec_notify_via_evtchn(ipip->mi_evtchns[cpu]);
803 ec_try_ipi(int ipl, int cpu)
810 ec_notify_via_evtchn(ipip->mi_evtchns[cpu]);
1034 if (cpu[c] == NULL)
1061 if (cpu[c] == NULL)
1121 if (cpu[i] == NULL || CPU_IN_SET(cpu_suspend_lost_set, i))
1153 if (cpu[i] == NULL || CPU_IN_SET(cpu_suspend_lost_set, i))
1244 * that in software here using the cpu priority field and the pending
1246 * now because they are at a lower priority than the current cpu priority
1258 struct cpu *cpu = CPU;
1260 volatile vcpu_info_t *vci = cpu->cpu_m.mcpu_vcpu_info;
1261 volatile struct xen_evt_data *cpe = cpu->cpu_m.mcpu_evt_pend;
1262 volatile uint16_t *cpu_ipp = &cpu->cpu_m.mcpu_intr_pending;
1266 ASSERT(&si->vcpu_info[cpu->cpu_id] == vci);
1291 while ((pe = UNBLOCKED_EVENTS(si, i, cpe, cpu->cpu_id)) != 0) {
1322 ttp->ttr_pri = cpu->cpu_pri;
1323 ttp->ttr_spl = cpu->cpu_base_spl;
1336 * If we are the cpu that successfully masks
1338 * for this cpu to service
1347 * for this cpu. If it is an edge
1362 * another cpu serviced this event
1384 curpri = cpu->cpu_pri;
1420 ASSERT(cpu->cpu_m.mcpu_ec_mbox == 0);
1421 cpu->cpu_m.mcpu_ec_mbox = port;
1431 * Check for cpu priority change
1434 if (cpu->cpu_pri != curpri)
1443 sip = (uint16_t)cpu->cpu_softinfo.st_pending;
1446 if (sipri > pri && sipri > cpu->cpu_pri) {
1449 * Check for cpu priority change
1452 if (cpu->cpu_pri != curpri)
1460 if (cpu->cpu_softinfo.st_pending)
1504 * Set a bit in an evtchan mask word, return true if we are the cpu that
1573 * Make a event that is pending for delivery on the current cpu "go away"