On Fri, Feb 26, 2016 at 02:37:19AM +0100, Rafael J. Wysocki wrote: > That's all correct, but my question should rather be: is arch the right > granularity? > > In theory, there may be ARM64-based platforms using ACPI and behaving > like x86 in that respect in the future.
Ah, so I started these hooks way before the cpufreq/cpuidle etc. integration push. Maybe we should look at something like that, but performance is really critical, you most definitely do not want 3 indirections just because abstract framework crap, that's measurable overhead on these callsites. Hence the current inline with constant value or single function call. And if archs would want a selector, I would recommend boot time call instruction rewrites a-la alternatives/paravirt.

