@@ -33,7 +33,6 @@ static void __iomem *ipi_clear0_regs[16];
33
33
static void __iomem * ipi_status0_regs [16 ];
34
34
static void __iomem * ipi_en0_regs [16 ];
35
35
static void __iomem * ipi_mailbox_buf [16 ];
36
- static uint32_t core0_c0count [NR_CPUS ];
37
36
38
37
static u32 (* ipi_read_clear )(int cpu );
39
38
static void (* ipi_write_action )(int cpu , u32 action );
@@ -382,11 +381,10 @@ loongson3_send_ipi_mask(const struct cpumask *mask, unsigned int action)
382
381
ipi_write_action (cpu_logical_map (i ), (u32 )action );
383
382
}
384
383
385
-
386
384
static irqreturn_t loongson3_ipi_interrupt (int irq , void * dev_id )
387
385
{
388
- int i , cpu = smp_processor_id ();
389
- unsigned int action , c0count ;
386
+ int cpu = smp_processor_id ();
387
+ unsigned int action ;
390
388
391
389
action = ipi_read_clear (cpu );
392
390
@@ -399,26 +397,14 @@ static irqreturn_t loongson3_ipi_interrupt(int irq, void *dev_id)
399
397
irq_exit ();
400
398
}
401
399
402
- if (action & SMP_ASK_C0COUNT ) {
403
- BUG_ON (cpu != 0 );
404
- c0count = read_c0_count ();
405
- c0count = c0count ? c0count : 1 ;
406
- for (i = 1 ; i < nr_cpu_ids ; i ++ )
407
- core0_c0count [i ] = c0count ;
408
- nudge_writes (); /* Let others see the result ASAP */
409
- }
410
-
411
400
return IRQ_HANDLED ;
412
401
}
413
402
414
- #define MAX_LOOPS 800
415
403
/*
416
404
* SMP init and finish on secondary CPUs
417
405
*/
418
406
static void loongson3_init_secondary (void )
419
407
{
420
- int i ;
421
- uint32_t initcount ;
422
408
unsigned int cpu = smp_processor_id ();
423
409
unsigned int imask = STATUSF_IP7 | STATUSF_IP6 |
424
410
STATUSF_IP3 | STATUSF_IP2 ;
@@ -432,23 +418,6 @@ static void loongson3_init_secondary(void)
432
418
cpu_logical_map (cpu ) % loongson_sysconf .cores_per_package );
433
419
cpu_data [cpu ].package =
434
420
cpu_logical_map (cpu ) / loongson_sysconf .cores_per_package ;
435
-
436
- i = 0 ;
437
- core0_c0count [cpu ] = 0 ;
438
- loongson3_send_ipi_single (0 , SMP_ASK_C0COUNT );
439
- while (!core0_c0count [cpu ]) {
440
- i ++ ;
441
- cpu_relax ();
442
- }
443
-
444
- if (i > MAX_LOOPS )
445
- i = MAX_LOOPS ;
446
- if (cpu_data [cpu ].package )
447
- initcount = core0_c0count [cpu ] + i ;
448
- else /* Local access is faster for loops */
449
- initcount = core0_c0count [cpu ] + i /2 ;
450
-
451
- write_c0_count (initcount );
452
421
}
453
422
454
423
static void loongson3_smp_finish (void )
0 commit comments