@@ -136,20 +136,20 @@ static void ipi_write_action(int cpu, u32 action)
136
136
}
137
137
}
138
138
139
- void loongson3_send_ipi_single (int cpu , unsigned int action )
139
+ void loongson_send_ipi_single (int cpu , unsigned int action )
140
140
{
141
141
ipi_write_action (cpu_logical_map (cpu ), (u32 )action );
142
142
}
143
143
144
- void loongson3_send_ipi_mask (const struct cpumask * mask , unsigned int action )
144
+ void loongson_send_ipi_mask (const struct cpumask * mask , unsigned int action )
145
145
{
146
146
unsigned int i ;
147
147
148
148
for_each_cpu (i , mask )
149
149
ipi_write_action (cpu_logical_map (i ), (u32 )action );
150
150
}
151
151
152
- irqreturn_t loongson3_ipi_interrupt (int irq , void * dev )
152
+ irqreturn_t loongson_ipi_interrupt (int irq , void * dev )
153
153
{
154
154
unsigned int action ;
155
155
unsigned int cpu = smp_processor_id ();
@@ -169,7 +169,7 @@ irqreturn_t loongson3_ipi_interrupt(int irq, void *dev)
169
169
return IRQ_HANDLED ;
170
170
}
171
171
172
- void __init loongson3_smp_setup (void )
172
+ void __init loongson_smp_setup (void )
173
173
{
174
174
cpu_data [0 ].core = cpu_logical_map (0 ) % loongson_sysconf .cores_per_package ;
175
175
cpu_data [0 ].package = cpu_logical_map (0 ) / loongson_sysconf .cores_per_package ;
@@ -178,7 +178,7 @@ void __init loongson3_smp_setup(void)
178
178
pr_info ("Detected %i available CPU(s)\n" , loongson_sysconf .nr_cpus );
179
179
}
180
180
181
- void __init loongson3_prepare_cpus (unsigned int max_cpus )
181
+ void __init loongson_prepare_cpus (unsigned int max_cpus )
182
182
{
183
183
int i = 0 ;
184
184
@@ -193,7 +193,7 @@ void __init loongson3_prepare_cpus(unsigned int max_cpus)
193
193
/*
194
194
* Setup the PC, SP, and TP of a secondary processor and start it running!
195
195
*/
196
- void loongson3_boot_secondary (int cpu , struct task_struct * idle )
196
+ void loongson_boot_secondary (int cpu , struct task_struct * idle )
197
197
{
198
198
unsigned long entry ;
199
199
@@ -205,13 +205,13 @@ void loongson3_boot_secondary(int cpu, struct task_struct *idle)
205
205
206
206
csr_mail_send (entry , cpu_logical_map (cpu ), 0 );
207
207
208
- loongson3_send_ipi_single (cpu , SMP_BOOT_CPU );
208
+ loongson_send_ipi_single (cpu , SMP_BOOT_CPU );
209
209
}
210
210
211
211
/*
212
212
* SMP init and finish on secondary CPUs
213
213
*/
214
- void loongson3_init_secondary (void )
214
+ void loongson_init_secondary (void )
215
215
{
216
216
unsigned int cpu = smp_processor_id ();
217
217
unsigned int imask = ECFGF_IP0 | ECFGF_IP1 | ECFGF_IP2 |
@@ -231,7 +231,7 @@ void loongson3_init_secondary(void)
231
231
cpu_logical_map (cpu ) / loongson_sysconf .cores_per_package ;
232
232
}
233
233
234
- void loongson3_smp_finish (void )
234
+ void loongson_smp_finish (void )
235
235
{
236
236
local_irq_enable ();
237
237
iocsr_write64 (0 , LOONGARCH_IOCSR_MBUF0 );
@@ -240,7 +240,7 @@ void loongson3_smp_finish(void)
240
240
241
241
#ifdef CONFIG_HOTPLUG_CPU
242
242
243
- int loongson3_cpu_disable (void )
243
+ int loongson_cpu_disable (void )
244
244
{
245
245
unsigned long flags ;
246
246
unsigned int cpu = smp_processor_id ();
@@ -262,7 +262,7 @@ int loongson3_cpu_disable(void)
262
262
return 0 ;
263
263
}
264
264
265
- void loongson3_cpu_die (unsigned int cpu )
265
+ void loongson_cpu_die (unsigned int cpu )
266
266
{
267
267
while (per_cpu (cpu_state , cpu ) != CPU_DEAD )
268
268
cpu_relax ();
@@ -300,19 +300,19 @@ void play_dead(void)
300
300
*/
301
301
#ifdef CONFIG_PM
302
302
303
- static int loongson3_ipi_suspend (void )
303
+ static int loongson_ipi_suspend (void )
304
304
{
305
305
return 0 ;
306
306
}
307
307
308
- static void loongson3_ipi_resume (void )
308
+ static void loongson_ipi_resume (void )
309
309
{
310
310
iocsr_write32 (0xffffffff , LOONGARCH_IOCSR_IPI_EN );
311
311
}
312
312
313
- static struct syscore_ops loongson3_ipi_syscore_ops = {
314
- .resume = loongson3_ipi_resume ,
315
- .suspend = loongson3_ipi_suspend ,
313
+ static struct syscore_ops loongson_ipi_syscore_ops = {
314
+ .resume = loongson_ipi_resume ,
315
+ .suspend = loongson_ipi_suspend ,
316
316
};
317
317
318
318
/*
@@ -321,7 +321,7 @@ static struct syscore_ops loongson3_ipi_syscore_ops = {
321
321
*/
322
322
static int __init ipi_pm_init (void )
323
323
{
324
- register_syscore_ops (& loongson3_ipi_syscore_ops );
324
+ register_syscore_ops (& loongson_ipi_syscore_ops );
325
325
return 0 ;
326
326
}
327
327
@@ -425,7 +425,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
425
425
{
426
426
init_new_context (current , & init_mm );
427
427
current_thread_info ()-> cpu = 0 ;
428
- loongson3_prepare_cpus (max_cpus );
428
+ loongson_prepare_cpus (max_cpus );
429
429
set_cpu_sibling_map (0 );
430
430
set_cpu_core_map (0 );
431
431
calculate_cpu_foreign_map ();
@@ -436,7 +436,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
436
436
437
437
int __cpu_up (unsigned int cpu , struct task_struct * tidle )
438
438
{
439
- loongson3_boot_secondary (cpu , tidle );
439
+ loongson_boot_secondary (cpu , tidle );
440
440
441
441
/* Wait for CPU to start and be ready to sync counters */
442
442
if (!wait_for_completion_timeout (& cpu_starting ,
@@ -465,7 +465,7 @@ asmlinkage void start_secondary(void)
465
465
466
466
cpu_probe ();
467
467
constant_clockevent_init ();
468
- loongson3_init_secondary ();
468
+ loongson_init_secondary ();
469
469
470
470
set_cpu_sibling_map (cpu );
471
471
set_cpu_core_map (cpu );
@@ -487,11 +487,11 @@ asmlinkage void start_secondary(void)
487
487
complete (& cpu_running );
488
488
489
489
/*
490
- * irq will be enabled in loongson3_smp_finish (), enabling it too
490
+ * irq will be enabled in loongson_smp_finish (), enabling it too
491
491
* early is dangerous.
492
492
*/
493
493
WARN_ON_ONCE (!irqs_disabled ());
494
- loongson3_smp_finish ();
494
+ loongson_smp_finish ();
495
495
496
496
cpu_startup_entry (CPUHP_AP_ONLINE_IDLE );
497
497
}
0 commit comments