smp_twd fix for adapting to cpu frequency change

shiraz hashim shiraz.linux.kernel at gmail.com
Thu May 3 07:15:06 EDT 2012


Hi Linus,

In your following patch,

    commit 4fd7f9b128107034fa925b6877fae3c275f0da86
    Author: Linus Walleij <linus.walleij at linaro.org>
    Date:   Tue Dec 13 12:48:18 2011 +0100

        ARM: 7212/1: smp_twd: reconfigure clockevents after cpufreq change

        This break-out from Colin Cross' cpufreq-aware TWD patch
        will handle the case when our localtimer's clock changes with
        the cpu clock. A cpufreq transtion notifier will be registered
        only if the platform has supplied a specified clock to the TWD.

        After a cpufreq transition, update the clockevent's frequency
        by fetching the new clock rate from the clock framework and
        reprogram the next clock event.

        The necessary changes in the clockevents framework was done by
        Thomas Gleixner in kernel v3.0.


When we handle twd_cpufreq_transition and reprogram the clock event,
the TWD_TIMER_LOAD register still contains the old load value
for CLOCK_EVT_MODE_PERIODIC case.

This results in wrong number of events generated per second.

Shouldn't we reprogram the TWD_TIMER_LOAD register to new
twd_timer_rate / HZ on frequency change as well ?

-- 
regards
Shiraz Hashim



More information about the linux-arm-kernel mailing list