On Tue, May 31, 2016 at 4:25 PM, Michael Neuling <[email protected]> wrote:
> On Tue, 2016-05-10 at 14:57 +1000, Oliver O'Halloran wrote:
>> static int decrementer_set_next_event(unsigned long evt,
>> struct clock_event_device *dev);
>> @@ -503,7 +504,7 @@ static void __timer_interrupt(void)
>> __this_cpu_inc(irq_stat.timer_irqs_event);
>> } else {
>> now = *next_tb - now;
>> - if (now <= DECREMENTER_MAX)
>> + if (now <= decrementer_max)
>> set_dec((int)now);
>
> You can remove the int cast here now since set_dec() takes a u64.
I thought I had fixed this, but it looks like I squashed the change to
into the second patch by accident, whoops.
>> +/* enables the large decrementer for the current CPU */
>> +static void enable_large_decrementer(void)
>> +{
>> + /* do we have a large decrementer? */
>> + if (!cpu_has_large_dec())
>> + return;
>> +
>> + /* do we need a large decrementer? */
>> + if (decrementer_max <= DECREMENTER_DEFAULT_MAX)
>> + return;
>> +
>> + mtspr(SPRN_LPCR, mfspr(SPRN_LPCR) | LPCR_LD);
>> +
>> + if (!large_dec_enabled()) {
>> + decrementer_max = DECREMENTER_DEFAULT_MAX;
>> +
>> + pr_warn("time_init: Failed to enable large decrementer on CPU
>> %d\n",
>> + smp_processor_id());
>
> Can you make this pr_warn_once() since every CPU is going to call this?
Sure.
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev