.. | .. |
---|
32 | 32 | |
---|
33 | 33 | void xen_smp_intr_free(unsigned int cpu) |
---|
34 | 34 | { |
---|
| 35 | + kfree(per_cpu(xen_resched_irq, cpu).name); |
---|
| 36 | + per_cpu(xen_resched_irq, cpu).name = NULL; |
---|
35 | 37 | if (per_cpu(xen_resched_irq, cpu).irq >= 0) { |
---|
36 | 38 | unbind_from_irqhandler(per_cpu(xen_resched_irq, cpu).irq, NULL); |
---|
37 | 39 | per_cpu(xen_resched_irq, cpu).irq = -1; |
---|
38 | | - kfree(per_cpu(xen_resched_irq, cpu).name); |
---|
39 | | - per_cpu(xen_resched_irq, cpu).name = NULL; |
---|
40 | 40 | } |
---|
| 41 | + kfree(per_cpu(xen_callfunc_irq, cpu).name); |
---|
| 42 | + per_cpu(xen_callfunc_irq, cpu).name = NULL; |
---|
41 | 43 | if (per_cpu(xen_callfunc_irq, cpu).irq >= 0) { |
---|
42 | 44 | unbind_from_irqhandler(per_cpu(xen_callfunc_irq, cpu).irq, NULL); |
---|
43 | 45 | per_cpu(xen_callfunc_irq, cpu).irq = -1; |
---|
44 | | - kfree(per_cpu(xen_callfunc_irq, cpu).name); |
---|
45 | | - per_cpu(xen_callfunc_irq, cpu).name = NULL; |
---|
46 | 46 | } |
---|
| 47 | + kfree(per_cpu(xen_debug_irq, cpu).name); |
---|
| 48 | + per_cpu(xen_debug_irq, cpu).name = NULL; |
---|
47 | 49 | if (per_cpu(xen_debug_irq, cpu).irq >= 0) { |
---|
48 | 50 | unbind_from_irqhandler(per_cpu(xen_debug_irq, cpu).irq, NULL); |
---|
49 | 51 | per_cpu(xen_debug_irq, cpu).irq = -1; |
---|
50 | | - kfree(per_cpu(xen_debug_irq, cpu).name); |
---|
51 | | - per_cpu(xen_debug_irq, cpu).name = NULL; |
---|
52 | 52 | } |
---|
| 53 | + kfree(per_cpu(xen_callfuncsingle_irq, cpu).name); |
---|
| 54 | + per_cpu(xen_callfuncsingle_irq, cpu).name = NULL; |
---|
53 | 55 | if (per_cpu(xen_callfuncsingle_irq, cpu).irq >= 0) { |
---|
54 | 56 | unbind_from_irqhandler(per_cpu(xen_callfuncsingle_irq, cpu).irq, |
---|
55 | 57 | NULL); |
---|
56 | 58 | per_cpu(xen_callfuncsingle_irq, cpu).irq = -1; |
---|
57 | | - kfree(per_cpu(xen_callfuncsingle_irq, cpu).name); |
---|
58 | | - per_cpu(xen_callfuncsingle_irq, cpu).name = NULL; |
---|
59 | 59 | } |
---|
60 | 60 | } |
---|
61 | 61 | |
---|
.. | .. |
---|
65 | 65 | char *resched_name, *callfunc_name, *debug_name; |
---|
66 | 66 | |
---|
67 | 67 | resched_name = kasprintf(GFP_KERNEL, "resched%d", cpu); |
---|
| 68 | + per_cpu(xen_resched_irq, cpu).name = resched_name; |
---|
68 | 69 | rc = bind_ipi_to_irqhandler(XEN_RESCHEDULE_VECTOR, |
---|
69 | 70 | cpu, |
---|
70 | 71 | xen_reschedule_interrupt, |
---|
.. | .. |
---|
74 | 75 | if (rc < 0) |
---|
75 | 76 | goto fail; |
---|
76 | 77 | per_cpu(xen_resched_irq, cpu).irq = rc; |
---|
77 | | - per_cpu(xen_resched_irq, cpu).name = resched_name; |
---|
78 | 78 | |
---|
79 | 79 | callfunc_name = kasprintf(GFP_KERNEL, "callfunc%d", cpu); |
---|
| 80 | + per_cpu(xen_callfunc_irq, cpu).name = callfunc_name; |
---|
80 | 81 | rc = bind_ipi_to_irqhandler(XEN_CALL_FUNCTION_VECTOR, |
---|
81 | 82 | cpu, |
---|
82 | 83 | xen_call_function_interrupt, |
---|
.. | .. |
---|
86 | 87 | if (rc < 0) |
---|
87 | 88 | goto fail; |
---|
88 | 89 | per_cpu(xen_callfunc_irq, cpu).irq = rc; |
---|
89 | | - per_cpu(xen_callfunc_irq, cpu).name = callfunc_name; |
---|
90 | 90 | |
---|
91 | | - debug_name = kasprintf(GFP_KERNEL, "debug%d", cpu); |
---|
92 | | - rc = bind_virq_to_irqhandler(VIRQ_DEBUG, cpu, xen_debug_interrupt, |
---|
93 | | - IRQF_PERCPU | IRQF_NOBALANCING, |
---|
94 | | - debug_name, NULL); |
---|
95 | | - if (rc < 0) |
---|
96 | | - goto fail; |
---|
97 | | - per_cpu(xen_debug_irq, cpu).irq = rc; |
---|
98 | | - per_cpu(xen_debug_irq, cpu).name = debug_name; |
---|
| 91 | + if (!xen_fifo_events) { |
---|
| 92 | + debug_name = kasprintf(GFP_KERNEL, "debug%d", cpu); |
---|
| 93 | + per_cpu(xen_debug_irq, cpu).name = debug_name; |
---|
| 94 | + rc = bind_virq_to_irqhandler(VIRQ_DEBUG, cpu, |
---|
| 95 | + xen_debug_interrupt, |
---|
| 96 | + IRQF_PERCPU | IRQF_NOBALANCING, |
---|
| 97 | + debug_name, NULL); |
---|
| 98 | + if (rc < 0) |
---|
| 99 | + goto fail; |
---|
| 100 | + per_cpu(xen_debug_irq, cpu).irq = rc; |
---|
| 101 | + } |
---|
99 | 102 | |
---|
100 | 103 | callfunc_name = kasprintf(GFP_KERNEL, "callfuncsingle%d", cpu); |
---|
| 104 | + per_cpu(xen_callfuncsingle_irq, cpu).name = callfunc_name; |
---|
101 | 105 | rc = bind_ipi_to_irqhandler(XEN_CALL_FUNCTION_SINGLE_VECTOR, |
---|
102 | 106 | cpu, |
---|
103 | 107 | xen_call_function_single_interrupt, |
---|
.. | .. |
---|
107 | 111 | if (rc < 0) |
---|
108 | 112 | goto fail; |
---|
109 | 113 | per_cpu(xen_callfuncsingle_irq, cpu).irq = rc; |
---|
110 | | - per_cpu(xen_callfuncsingle_irq, cpu).name = callfunc_name; |
---|
111 | 114 | |
---|
112 | 115 | return 0; |
---|
113 | 116 | |
---|
.. | .. |
---|
132 | 135 | if (xen_vcpu_nr(cpu) < MAX_VIRT_CPUS) |
---|
133 | 136 | continue; |
---|
134 | 137 | |
---|
135 | | - rc = cpu_down(cpu); |
---|
| 138 | + rc = remove_cpu(cpu); |
---|
136 | 139 | |
---|
137 | 140 | if (rc == 0) { |
---|
138 | 141 | /* |
---|