@@ -136,20 +136,20 @@ static void ipi_write_action(int cpu, u32 action)
136136 }
137137}
138138
139- void loongson3_send_ipi_single (int cpu , unsigned int action )
139+ void loongson_send_ipi_single (int cpu , unsigned int action )
140140{
141141 ipi_write_action (cpu_logical_map (cpu ), (u32 )action );
142142}
143143
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 )
145145{
146146 unsigned int i ;
147147
148148 for_each_cpu (i , mask )
149149 ipi_write_action (cpu_logical_map (i ), (u32 )action );
150150}
151151
152- irqreturn_t loongson3_ipi_interrupt (int irq , void * dev )
152+ irqreturn_t loongson_ipi_interrupt (int irq , void * dev )
153153{
154154 unsigned int action ;
155155 unsigned int cpu = smp_processor_id ();
@@ -169,7 +169,7 @@ irqreturn_t loongson3_ipi_interrupt(int irq, void *dev)
169169 return IRQ_HANDLED ;
170170}
171171
172- void __init loongson3_smp_setup (void )
172+ void __init loongson_smp_setup (void )
173173{
174174 cpu_data [0 ].core = cpu_logical_map (0 ) % loongson_sysconf .cores_per_package ;
175175 cpu_data [0 ].package = cpu_logical_map (0 ) / loongson_sysconf .cores_per_package ;
@@ -178,7 +178,7 @@ void __init loongson3_smp_setup(void)
178178 pr_info ("Detected %i available CPU(s)\n" , loongson_sysconf .nr_cpus );
179179}
180180
181- void __init loongson3_prepare_cpus (unsigned int max_cpus )
181+ void __init loongson_prepare_cpus (unsigned int max_cpus )
182182{
183183 int i = 0 ;
184184
@@ -193,7 +193,7 @@ void __init loongson3_prepare_cpus(unsigned int max_cpus)
193193/*
194194 * Setup the PC, SP, and TP of a secondary processor and start it running!
195195 */
196- void loongson3_boot_secondary (int cpu , struct task_struct * idle )
196+ void loongson_boot_secondary (int cpu , struct task_struct * idle )
197197{
198198 unsigned long entry ;
199199
@@ -205,13 +205,13 @@ void loongson3_boot_secondary(int cpu, struct task_struct *idle)
205205
206206 csr_mail_send (entry , cpu_logical_map (cpu ), 0 );
207207
208- loongson3_send_ipi_single (cpu , SMP_BOOT_CPU );
208+ loongson_send_ipi_single (cpu , SMP_BOOT_CPU );
209209}
210210
211211/*
212212 * SMP init and finish on secondary CPUs
213213 */
214- void loongson3_init_secondary (void )
214+ void loongson_init_secondary (void )
215215{
216216 unsigned int cpu = smp_processor_id ();
217217 unsigned int imask = ECFGF_IP0 | ECFGF_IP1 | ECFGF_IP2 |
@@ -231,7 +231,7 @@ void loongson3_init_secondary(void)
231231 cpu_logical_map (cpu ) / loongson_sysconf .cores_per_package ;
232232}
233233
234- void loongson3_smp_finish (void )
234+ void loongson_smp_finish (void )
235235{
236236 local_irq_enable ();
237237 iocsr_write64 (0 , LOONGARCH_IOCSR_MBUF0 );
@@ -240,7 +240,7 @@ void loongson3_smp_finish(void)
240240
241241#ifdef CONFIG_HOTPLUG_CPU
242242
243- int loongson3_cpu_disable (void )
243+ int loongson_cpu_disable (void )
244244{
245245 unsigned long flags ;
246246 unsigned int cpu = smp_processor_id ();
@@ -262,7 +262,7 @@ int loongson3_cpu_disable(void)
262262 return 0 ;
263263}
264264
265- void loongson3_cpu_die (unsigned int cpu )
265+ void loongson_cpu_die (unsigned int cpu )
266266{
267267 while (per_cpu (cpu_state , cpu ) != CPU_DEAD )
268268 cpu_relax ();
@@ -300,19 +300,19 @@ void play_dead(void)
300300 */
301301#ifdef CONFIG_PM
302302
303- static int loongson3_ipi_suspend (void )
303+ static int loongson_ipi_suspend (void )
304304{
305305 return 0 ;
306306}
307307
308- static void loongson3_ipi_resume (void )
308+ static void loongson_ipi_resume (void )
309309{
310310 iocsr_write32 (0xffffffff , LOONGARCH_IOCSR_IPI_EN );
311311}
312312
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 ,
316316};
317317
318318/*
@@ -321,7 +321,7 @@ static struct syscore_ops loongson3_ipi_syscore_ops = {
321321 */
322322static int __init ipi_pm_init (void )
323323{
324- register_syscore_ops (& loongson3_ipi_syscore_ops );
324+ register_syscore_ops (& loongson_ipi_syscore_ops );
325325 return 0 ;
326326}
327327
@@ -425,7 +425,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
425425{
426426 init_new_context (current , & init_mm );
427427 current_thread_info ()-> cpu = 0 ;
428- loongson3_prepare_cpus (max_cpus );
428+ loongson_prepare_cpus (max_cpus );
429429 set_cpu_sibling_map (0 );
430430 set_cpu_core_map (0 );
431431 calculate_cpu_foreign_map ();
@@ -436,7 +436,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
436436
437437int __cpu_up (unsigned int cpu , struct task_struct * tidle )
438438{
439- loongson3_boot_secondary (cpu , tidle );
439+ loongson_boot_secondary (cpu , tidle );
440440
441441 /* Wait for CPU to start and be ready to sync counters */
442442 if (!wait_for_completion_timeout (& cpu_starting ,
@@ -465,7 +465,7 @@ asmlinkage void start_secondary(void)
465465
466466 cpu_probe ();
467467 constant_clockevent_init ();
468- loongson3_init_secondary ();
468+ loongson_init_secondary ();
469469
470470 set_cpu_sibling_map (cpu );
471471 set_cpu_core_map (cpu );
@@ -487,11 +487,11 @@ asmlinkage void start_secondary(void)
487487 complete (& cpu_running );
488488
489489 /*
490- * irq will be enabled in loongson3_smp_finish (), enabling it too
490+ * irq will be enabled in loongson_smp_finish (), enabling it too
491491 * early is dangerous.
492492 */
493493 WARN_ON_ONCE (!irqs_disabled ());
494- loongson3_smp_finish ();
494+ loongson_smp_finish ();
495495
496496 cpu_startup_entry (CPUHP_AP_ONLINE_IDLE );
497497}
0 commit comments