]> git.baikalelectronics.ru Git - kernel.git/commit
cpuidle: pseries: Add function to parse extended CEDE records
authorGautham R. Shenoy <ego@linux.vnet.ibm.com>
Thu, 30 Jul 2020 05:32:56 +0000 (11:02 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 30 Jul 2020 12:53:50 +0000 (22:53 +1000)
commitf348bbba5a83368b0c3f972bde6b8e99f235171b
tree8ea272e1b35c00bee9873a8f5874fb3d6de047b1
parent019c0c5904c6d49b7723047fd5ae34c3b332a9c9
cpuidle: pseries: Add function to parse extended CEDE records

Currently we use CEDE with latency-hint 0 as the only other idle state
on a dedicated LPAR apart from the polling "snooze" state.

The platform might support additional extended CEDE idle states, which
can be discovered through the "ibm,get-system-parameter" rtas-call
made with CEDE_LATENCY_TOKEN.

This patch adds a function to obtain information about the extended
CEDE idle states from the platform and parse the contents to populate
an array of extended CEDE states. These idle states thus discovered
will be added to the cpuidle framework in the next patch.

dmesg on a POWER8 and POWER9 LPAR, demonstrating the output of parsing
the extended CEDE latency parameters are as follows

POWER8
[   10.093279] xcede : xcede_record_size = 10
[   10.093285] xcede : Record 0 : hint = 1, latency = 0x3c00 tb ticks, Wake-on-irq = 1
[   10.093291] xcede : Record 1 : hint = 2, latency = 0x4e2000 tb ticks, Wake-on-irq = 0
[   10.093297] cpuidle : Skipping the 2 Extended CEDE idle states

POWER9
[    5.913180] xcede : xcede_record_size = 10
[    5.913183] xcede : Record 0 : hint = 1, latency = 0x400 tb ticks, Wake-on-irq = 1
[    5.913188] xcede : Record 1 : hint = 2, latency = 0x3e8000 tb ticks, Wake-on-irq = 0
[    5.913193] cpuidle : Skipping the 2 Extended CEDE idle states

Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
[mpe: Make space for 16 records, drop memset, minor cleanup & formatting]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1596087177-30329-3-git-send-email-ego@linux.vnet.ibm.com
drivers/cpuidle/cpuidle-pseries.c