diff mbox series

[RFC] occ: Add pstate corresponding to base frequency to DT

Message ID 1549862329-25968-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com
State RFC
Headers show
Series [RFC] occ: Add pstate corresponding to base frequency to DT | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success master/apply_patch Successfully applied
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master

Commit Message

Shilpasri G Bhat Feb. 11, 2019, 5:18 a.m. UTC
Unlike POWER8, nominal frequency is not the highest guaranteed
frequency of the POWER9 chip. In POWER9, the highest guaranteed
frequency is greater than the nominal frequency and is referred
to as base frequency. In POWER9 base frequency is the highest
frequency the processor will operate at when ALL cores are active
and in ANY operating condition. This patch exports the turbo pstate
as the base frequency as per OCC documentation.

Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
---
- Using RFC tag till OCC-OPAL interface doc is upstreamed to include
  turbo pstate as base frequency.

 doc/device-tree/ibm,opal/power-mgt.rst | 12 +++++++++++-
 hw/occ.c                               |  1 +
 2 files changed, 12 insertions(+), 1 deletion(-)

Comments

Shilpasri G Bhat Feb. 12, 2019, 5:20 a.m. UTC | #1
On 02/11/2019 10:48 AM, Shilpasri G Bhat wrote:
> Unlike POWER8, nominal frequency is not the highest guaranteed
> frequency of the POWER9 chip. In POWER9, the highest guaranteed
> frequency is greater than the nominal frequency and is referred
> to as base frequency. In POWER9 base frequency is the highest
> frequency the processor will operate at when ALL cores are active
> and in ANY operating condition. This patch exports the turbo pstate
> as the base frequency as per OCC documentation.
> 
> Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
> ---
> - Using RFC tag till OCC-OPAL interface doc is upstreamed to include
>   turbo pstate as base frequency.

This is updated in OCC-OPAL interface document (Page number 127)
https://github.com/open-power/docs/blob/master/occ/OCC_P9_FW_Interfaces.pdf
diff mbox series

Patch

diff --git a/doc/device-tree/ibm,opal/power-mgt.rst b/doc/device-tree/ibm,opal/power-mgt.rst
index b326a24..b0a871e 100644
--- a/doc/device-tree/ibm,opal/power-mgt.rst
+++ b/doc/device-tree/ibm,opal/power-mgt.rst
@@ -114,7 +114,10 @@  ibm,pstate-ultra-turbo ibm,pstate-turbo
 ---------------------------------------
 
 These properties are added when ultra-turbo(WOF) is enabled. These properties
-give the max turbo and max ultra-turbo pstate.
+give the max turbo and max ultra-turbo pstate-id as specified in the
+ibm,pstate-ids file. The frequencies present in turbo to ultra-turbo range are
+referred to as boost/WOF frequencies and these are attained by the CPU under
+favourable environmental conditions, low workloads and low active core counts.
 
 Example:
 
@@ -132,3 +135,10 @@  ibm,pstate-core-max
 This property is added when ultra_turbo(WOF) is enabled. This property gives
 the list of max pstate for each 'n' number of active cores in the chip.
 
+ibm,pstate-base
+----------------
+
+This pstate points to the base frequency of the chip. POWER9 base frequency is
+the highest frequency that is guaranteed when ALL cores are active in ANY
+operating condition (ie. workloads, environmental conditions such as max
+ambient temperature, active core counts)
diff --git a/hw/occ.c b/hw/occ.c
index 9580bb8..6a33202 100644
--- a/hw/occ.c
+++ b/hw/occ.c
@@ -722,6 +722,7 @@  static bool add_cpu_pstate_properties(int *pstate_nom)
 		dt_add_property(power_mgt, "ibm,pstate-core-max", dt_cmax,
 				nr_cores * sizeof(u32));
 
+		dt_add_property_cells(power_mgt, "ibm,pstate-base", pturbo);
 		free(dt_cmax);
 	}