@@ -114,12 +114,6 @@ void send_ipi(const struct cpumask *cpumask, enum ipi_message_type msg)
114
114
local_irq_restore (flags );
115
115
}
116
116
117
- static struct irqaction ipi_intdesc = {
118
- .handler = handle_ipi ,
119
- .flags = IRQF_TRIGGER_RISING ,
120
- .name = "ipi_handler"
121
- };
122
-
123
117
void __init smp_prepare_boot_cpu (void )
124
118
{
125
119
}
@@ -132,8 +126,8 @@ void __init smp_prepare_boot_cpu(void)
132
126
133
127
void start_secondary (void )
134
128
{
135
- unsigned int cpu ;
136
129
unsigned long thread_ptr ;
130
+ unsigned int cpu , irq ;
137
131
138
132
/* Calculate thread_info pointer from stack pointer */
139
133
__asm__ __volatile__(
@@ -155,7 +149,10 @@ void start_secondary(void)
155
149
156
150
cpu = smp_processor_id ();
157
151
158
- setup_irq (BASE_IPI_IRQ + cpu , & ipi_intdesc );
152
+ irq = BASE_IPI_IRQ + cpu ;
153
+ if (request_irq (irq , handle_ipi , IRQF_TRIGGER_RISING , "ipi_handler" ,
154
+ NULL ))
155
+ pr_err ("Failed to request irq %u (ipi_handler)\n" , irq );
159
156
160
157
/* Register the clock_event dummy */
161
158
setup_percpu_clockdev ();
@@ -201,7 +198,7 @@ void __init smp_cpus_done(unsigned int max_cpus)
201
198
202
199
void __init smp_prepare_cpus (unsigned int max_cpus )
203
200
{
204
- int i ;
201
+ int i , irq = BASE_IPI_IRQ ;
205
202
206
203
/*
207
204
* should eventually have some sort of machine
@@ -213,8 +210,11 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
213
210
set_cpu_present (i , true);
214
211
215
212
/* Also need to register the interrupts for IPI */
216
- if (max_cpus > 1 )
217
- setup_irq (BASE_IPI_IRQ , & ipi_intdesc );
213
+ if (max_cpus > 1 ) {
214
+ if (request_irq (irq , handle_ipi , IRQF_TRIGGER_RISING ,
215
+ "ipi_handler" , NULL ))
216
+ pr_err ("Failed to request irq %d (ipi_handler)\n" , irq );
217
+ }
218
218
}
219
219
220
220
void smp_send_reschedule (int cpu )
0 commit comments