Skip to content

pmdomain: apple: pmp-report: Read CPU idle time without cpufreq - #1612

Closed
DjDeveloperr wants to merge 1 commit into
integration/aurorafrom
djdev/pmp-report-idle-without-cpufreq
Closed

DjDeveloperr wants to merge 1 commit into
integration/aurorafrom
djdev/pmp-report-idle-without-cpufreq

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

The J613 floor samples each CPU's idle time with get_cpu_idle_time(), which cpufreq.h declares only with CONFIG_CPU_FREQ. Builds without it, like the arm64 KUnit config in #1587's kunit job, fail at pmp-report.c:1704 with an implicit declaration.

This reads the same two counters that get_cpu_idle_time(cpu, &wall, 0) adds, get_cpu_idle_time_us() and then get_cpu_iowait_time_us(), from kernel_stat.h, which declares them for every config. The order is the same, so the wall time still comes from the iowait read, and builds with CPU_FREQ=y behave as before. One file, no #ifdef.

Build check: drivers/pmdomain/apple/pmp-report.o only, arm64 LLVM=1, config from drivers/pmdomain/apple/.kunitconfig.apple-pmp-start (no suites run):

🤖 Generated with Claude Code

The J613 floor samples each CPU's idle time with get_cpu_idle_time(),
which cpufreq.h declares only with CONFIG_CPU_FREQ. Without it, as in
the arm64 KUnit configs, the call is an implicit declaration and the
driver fails to build.

Read the two counters that get_cpu_idle_time(cpu, &wall, 0) adds, idle
and iowait, from kernel_stat.h, which declares them for every config.
The order is the same, so the wall time still comes from the iowait
read.

Signed-off-by: Diljit Singh <hey@djdev.me>
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Closing as redundant: #1594 (ea45231, merged into integration/aurora) has the same change; only the comment differs.

@DjDeveloperr
DjDeveloperr deleted the djdev/pmp-report-idle-without-cpufreq branch November 12, 2026 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant