--- zzzz-none-000/linux-3.10.107/arch/mips/kernel/cevt-r4k.c 2017-06-27 09:49:32.000000000 +0000 +++ vr9-7490-729/linux-3.10.107/arch/mips/kernel/cevt-r4k.c 2021-11-10 11:53:54.000000000 +0000 @@ -45,7 +45,7 @@ } DEFINE_PER_CPU(struct clock_event_device, mips_clockevent_device); -int cp0_timer_irq_installed; +DEFINE_PER_CPU(int, cp0_timer_irq_installed); #ifndef CONFIG_MIPS_MT_SMTC irqreturn_t c0_compare_interrupt(int irq, void *dev_id) @@ -195,8 +195,8 @@ cd = &per_cpu(mips_clockevent_device, cpu); cd->name = "MIPS"; - cd->features = CLOCK_EVT_FEAT_ONESHOT; - + cd->features = CLOCK_EVT_FEAT_ONESHOT; + clockevent_set_clock(cd, mips_hpt_frequency); /* Calculate the min / max delta */ @@ -215,10 +215,10 @@ #endif clockevents_register_device(cd); - if (cp0_timer_irq_installed) + if (per_cpu(cp0_timer_irq_installed, cpu)) return 0; - cp0_timer_irq_installed = 1; + per_cpu(cp0_timer_irq_installed,cpu) = 1; setup_irq(irq, &c0_compare_irqaction);