[RFC/PATCH 2/2] Generic clockevents and no-idle-HZ for PowerPC
Olof Johansson
olof at lixom.net
Fri Sep 7 05:15:16 EST 2007
Hi,
Nice! I've been looking forward to these patches. Should help keep power
consumption down on machines with powersavings support for idle.
On Fri, Sep 07, 2007 at 12:44:46AM +1000, Paul Mackerras wrote:
> @@ -749,6 +805,8 @@ void __init clocksource_init(void)
> printk(KERN_INFO "clocksource: %s mult[%x] shift[%d] registered\n",
> clocksource_timebase.name,
> clocksource_timebase.mult, clocksource_timebase.shift);
> +
> + init_decrementer_clockevent();
> }
>
> /* This function is only called on the boot processor */
> @@ -874,8 +932,7 @@ void __init time_init(void)
> /* Register the clocksource */
> clocksource_init();
>
> - /* Not exact, but the timer interrupt takes care of this */
> - set_dec(tb_ticks_per_jiffy);
> + set_dec(DECREMENTER_MAX);
> }
I don't think that set_dec() is needed any more. I get a very long
delay during "Calibrating delay loop..." with it there.
Looks like decrementer_set_next_event() already sets a reasonable
decementer value, it's called through the notify chain set off
from register_decrementer_clockevent() -> ... -> tick_notify() ->
tick_setup_periodic() -> clockevents_program_event().
-Olof
More information about the Linuxppc-dev
mailing list