Re: [PATCH 6/9] ACPICA: Make ACPI Power Management Timer (PM Timer) optional.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, Aug 8, 2013 at 4:29 PM, Lv Zheng <lv.zheng@xxxxxxxxx> wrote:
>
> From: Bob Moore <robert.moore@xxxxxxxxx>
>
> PM Timer is now optional.
...
> The change doesn't affect Linux directly, because it has never relied
> on the presence of the PM timer.
>
Has it been so?

IIRC, there're a couple of accesses to PM Timer via:
-  inl(acpi_gbl_FADT.xpm_timer_block.address);
typically in processor driver code: ex) drivers/acpi/processor_idle.c
which seems to rely on the presence of the PM timer.

The below snippet shows how it was like (which can be seen in earlier
linux kernel such as 2.6 series...)

- drivers/acpi/processor_idle.c:acpi_processor_idle()

    switch (cx->type) {
    case ACPI_STATE_C1:
        ...
        break;

    case ACPI_STATE_C2:
        /* Get start time (ticks) */
-->   t1 = inl(acpi_gbl_FADT.xpm_timer_block.address);
        /* Tell the scheduler that we are going deep-idle: */
        sched_clock_idle_sleep_event();
        /* Invoke C2 */
        acpi_state_timer_broadcast(pr, cx, 1);
        acpi_cstate_enter(cx);
        /* Get end time (ticks) */
-->   t2 = inl(acpi_gbl_FADT.xpm_timer_block.address);

#if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86)
        /* TSC halts in C2, so notify users */
        if (tsc_halts_in_c(ACPI_STATE_C2))
            mark_tsc_unstable("possible TSC halt in C2");
#endif
        /* Compute time (ticks) that we were actually asleep */
===>   sleep_ticks = ticks_elapsed(t1, t2);

        /* Tell the scheduler how much we idled: */
===>   sched_clock_idle_wakeup_event(sleep_ticks*PM_TIMER_TICK_NS);
...
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux