[Skiboot] [RFC PATCH] OPAL v4 cpu idle driver skeleton

Abhishek huntbag at linux.vnet.ibm.com
Thu Jan 30 17:54:35 AEDT 2020

Hi Nicholas,

On 12/12/2019 09:42 AM, Nicholas Piggin wrote:
> With OPAL using the same endianness, same stack, and with OS
> callbacks, it looks relatively easy to provide a CPU idle driver.
> The Linux sreset interrupt won't have to change, if it registers
> almost like isa300_idle_stop_mayloss as the os_stop function,
> then skiboot will call that to stop, and it will return like a
> normal function call returning the srr1 wakeup value.
> This allows the firmware to deal with supported stop states and
> psscr and consequences for saving and restoring various resources,
> and the kernel can implement a simple OPAL idle driver which has
> some interface like wakeup latency requested or something.

Governor will request a stop state based on historic idle value.
And the cpuidle driver will call the platform idle code with psscr set
based on stop state requested.
I am not sure of using wakeup latency. Am I missing something
> Calls in and out of OPAL (once it's running with MMU=on) are not
> much more expensive calling a function in a kernel module, so
> performance should be okay. Kernel can still choose to implement
> an optimised CPU specific driver as it does today.
> The patch is just a hack with no actual policy or SPR saving in
> it at the moment and only does stop0, but illustrates the mechanism.
> Thanks,
> Nick
> ---


More information about the Skiboot mailing list