Lines Matching full:cpu

3 #include <linux/cpu.h>
33 void xen_smp_intr_free(unsigned int cpu) in xen_smp_intr_free() argument
35 if (per_cpu(xen_resched_irq, cpu).irq >= 0) { in xen_smp_intr_free()
36 unbind_from_irqhandler(per_cpu(xen_resched_irq, cpu).irq, NULL); in xen_smp_intr_free()
37 per_cpu(xen_resched_irq, cpu).irq = -1; in xen_smp_intr_free()
38 kfree(per_cpu(xen_resched_irq, cpu).name); in xen_smp_intr_free()
39 per_cpu(xen_resched_irq, cpu).name = NULL; in xen_smp_intr_free()
41 if (per_cpu(xen_callfunc_irq, cpu).irq >= 0) { in xen_smp_intr_free()
42 unbind_from_irqhandler(per_cpu(xen_callfunc_irq, cpu).irq, NULL); in xen_smp_intr_free()
43 per_cpu(xen_callfunc_irq, cpu).irq = -1; in xen_smp_intr_free()
44 kfree(per_cpu(xen_callfunc_irq, cpu).name); in xen_smp_intr_free()
45 per_cpu(xen_callfunc_irq, cpu).name = NULL; in xen_smp_intr_free()
47 if (per_cpu(xen_debug_irq, cpu).irq >= 0) { in xen_smp_intr_free()
48 unbind_from_irqhandler(per_cpu(xen_debug_irq, cpu).irq, NULL); in xen_smp_intr_free()
49 per_cpu(xen_debug_irq, cpu).irq = -1; in xen_smp_intr_free()
50 kfree(per_cpu(xen_debug_irq, cpu).name); in xen_smp_intr_free()
51 per_cpu(xen_debug_irq, cpu).name = NULL; in xen_smp_intr_free()
53 if (per_cpu(xen_callfuncsingle_irq, cpu).irq >= 0) { in xen_smp_intr_free()
54 unbind_from_irqhandler(per_cpu(xen_callfuncsingle_irq, cpu).irq, in xen_smp_intr_free()
56 per_cpu(xen_callfuncsingle_irq, cpu).irq = -1; in xen_smp_intr_free()
57 kfree(per_cpu(xen_callfuncsingle_irq, cpu).name); in xen_smp_intr_free()
58 per_cpu(xen_callfuncsingle_irq, cpu).name = NULL; in xen_smp_intr_free()
62 int xen_smp_intr_init(unsigned int cpu) in xen_smp_intr_init() argument
67 resched_name = kasprintf(GFP_KERNEL, "resched%d", cpu); in xen_smp_intr_init()
69 cpu, in xen_smp_intr_init()
76 per_cpu(xen_resched_irq, cpu).irq = rc; in xen_smp_intr_init()
77 per_cpu(xen_resched_irq, cpu).name = resched_name; in xen_smp_intr_init()
79 callfunc_name = kasprintf(GFP_KERNEL, "callfunc%d", cpu); in xen_smp_intr_init()
81 cpu, in xen_smp_intr_init()
88 per_cpu(xen_callfunc_irq, cpu).irq = rc; in xen_smp_intr_init()
89 per_cpu(xen_callfunc_irq, cpu).name = callfunc_name; in xen_smp_intr_init()
92 debug_name = kasprintf(GFP_KERNEL, "debug%d", cpu); in xen_smp_intr_init()
93 rc = bind_virq_to_irqhandler(VIRQ_DEBUG, cpu, in xen_smp_intr_init()
99 per_cpu(xen_debug_irq, cpu).irq = rc; in xen_smp_intr_init()
100 per_cpu(xen_debug_irq, cpu).name = debug_name; in xen_smp_intr_init()
103 callfunc_name = kasprintf(GFP_KERNEL, "callfuncsingle%d", cpu); in xen_smp_intr_init()
105 cpu, in xen_smp_intr_init()
112 per_cpu(xen_callfuncsingle_irq, cpu).irq = rc; in xen_smp_intr_init()
113 per_cpu(xen_callfuncsingle_irq, cpu).name = callfunc_name; in xen_smp_intr_init()
118 xen_smp_intr_free(cpu); in xen_smp_intr_init()
130 void xen_smp_send_reschedule(int cpu) in xen_smp_send_reschedule() argument
132 xen_send_IPI_one(cpu, XEN_RESCHEDULE_VECTOR); in xen_smp_send_reschedule()
138 unsigned cpu; in __xen_send_IPI_mask() local
140 for_each_cpu_and(cpu, mask, cpu_online_mask) in __xen_send_IPI_mask()
141 xen_send_IPI_one(cpu, vector); in __xen_send_IPI_mask()
146 int cpu; in xen_smp_send_call_function_ipi() local
151 for_each_cpu(cpu, mask) { in xen_smp_send_call_function_ipi()
152 if (xen_vcpu_stolen(cpu)) { in xen_smp_send_call_function_ipi()
159 void xen_smp_send_call_function_single_ipi(int cpu) in xen_smp_send_call_function_single_ipi() argument
161 __xen_send_IPI_mask(cpumask_of(cpu), in xen_smp_send_call_function_single_ipi()
225 unsigned cpu; in xen_send_IPI_mask_allbutself() local
232 for_each_cpu_and(cpu, mask, cpu_online_mask) { in xen_send_IPI_mask_allbutself()
233 if (this_cpu == cpu) in xen_send_IPI_mask_allbutself()
236 xen_send_IPI_one(cpu, xen_vector); in xen_send_IPI_mask_allbutself()