Re: [PATCH v3] platform/x86/intel/pmc: Disable ACPI PM timer during suspend on Panther Lake
From: Tzung-Bi Shih
Date: Wed Nov 18 2026 - 02:15:30 EST
On Mon, Nov 16, 2026 at 09:17:13PM -0800, Xi Pardee wrote:
> Hi Tzung-Bi,
>
> Thanks for the v3. Avoiding pmcdev->lock and the tick_freeze() atomic
> context resolves the problem behind the revert in 5fa607880168, and the save
> and restore logic looks correct.
>
> Two requests:
>
> 1. Ordering vs. the acpi_pm clocksource.
> • The reverted code toggled the timer from the clocksource's own callbacks.
> These run inside timekeeping_suspend() after the last read and inside
> timekeeping_resume() before the first read, so the counter is never read
> while stopped.
> • Here the timer is stopped in suspend_late and restarted in resume_early
> . That is before timekeeping_forward_now() on suspend and after
> tk_clock_read() on resume.
> • If acpi_pm is the active clocksource, for example when TSC is unstable,
> timekeeping can read a stopped counter, and ktime_get() stops advancing
> from suspend_late on.
> • Have you tested with clocksource=acpi_pm ? If TSC is always used on PTL,
> please say so in the commit message.
Good catch. I haven't tested with clocksource=acpi_pm since our test
kernel has CONFIG_X86_PM_TIMER=n and uses TSC.
To preserve proper ordering when CONFIG_X86_PM_TIMER=y, in v4 I will
move the lockless toggle helper into pmc_core and register it via
acpi_pmtmr_register_suspend_resume_callback() when CONFIG_X86_PM_TIMER=y
(falling back to pmc_core_suspend()/pmc_core_resume() when disabled).
I will send out v4 after re-running the s2idle test with the updated
patches.
> 2. Evidence for S0i2.2.
> • Please share S0i2.1 and S0i2.2 residency with and without the patch.
> • Include the platform, firmware and kernel version, and say whether
> firmware enabled the timer and wdat_wdt was active.
Here are the current results from v3 on a Panther Lake Android desktop
device (coreboot with CONFIG_USE_PM_ACPI_TIMER=y, kernel 6.18 with
CONFIG_X86_PM_TIMER=n, wdat_wdt not active):
- Without patch:
S0i2.1: 100.00% (345,477 ms), S0i2.2: 0.00% (0 ms)
- With patch:
S0i2.1: 0.00% (11 ms), S0i2.2: 100.00% (338,628 ms)
I will include the residency results in the v4 commit message as well.
>
> Also, does WCL, which reuses the PTL ops, need the same fix?
I'm not sure whether WCL has the same behavior, and I don't have WCL
hardware to verify it. In v4, I'll move the support into pmc_core via
opt-in fields in struct pmc_reg_map and enable it for Panther Lake, so
WCL (or other platforms) can easily opt in if needed.