Re: Fighting for the power.

From: Lucius Windschuh <lwindschuh_at_googlemail.com>
Date: Tue, 5 May 2009 01:22:12 +0200
2009/5/5 Alexander Motin <mav_at_freebsd.org>:
> Lucius Windschuh wrote:
>> [...]
>> panic: lapic1: zero divisor
> [...]
> --- local_apic.c.prev   2009-05-01 23:53:37.000000000 +0300
> +++ local_apic.c        2009-05-05 01:10:04.000000000 +0300
> _at__at_ -319,7 +319,7 _at__at_ lapic_setup(int boot)
>        }
>
>        /* We don't setup the timer during boot on the BSP until later. */
> -       if (!(boot && PCPU_GET(cpuid) == 0)) {
> +       if (!(boot && PCPU_GET(cpuid) == 0) && lapic_timer_hz != 0) {
>                KASSERT(lapic_timer_period != 0, ("lapic%u: zero divisor",
>                    lapic_id()));
>                lapic_timer_set_divisor(lapic_timer_divisor);

This patch solves the panic.
C3 instead of C2 saves between 0.5 and 1.5 Watt here with some quick
measurements.

Thanks.

Lucius
Received on Mon May 04 2009 - 21:22:14 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:47 UTC