occ: Skip setting cores to nominal frequency in P9

Submitted by Shilpasri G Bhat on April 1, 2017, 9:29 a.m.

Details

Message ID 1491038979-10492-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com
State New
Headers show

Commit Message

Shilpasri G Bhat April 1, 2017, 9:29 a.m.
In P9, once OCC is up, it is supposed to setup the cores to nominal
frequency. So skip this step in OPAL.

Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
---
 hw/occ.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

Comments

ppaidipe@linux.vnet.ibm.com April 3, 2017, 6:02 a.m.
Hi Shilpa

On 2017-04-01 14:59, Shilpasri G Bhat wrote:
> In P9, once OCC is up, it is supposed to setup the cores to nominal
> frequency. So skip this step in OPAL.
> 
> Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
> ---
>  hw/occ.c | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/hw/occ.c b/hw/occ.c
> index 2ffb677..b222521 100644
> --- a/hw/occ.c
> +++ b/hw/occ.c
> @@ -897,11 +897,14 @@ void occ_pstates_init(void)
>  		return;
>  	}
> 
> -	/* Setup host based pstates and set nominal frequency */
> -	for_each_chip(chip) {
> -		for_each_available_core_in_chip(c, chip->id) {
> -			cpu_pstates_prepare_core(chip, c, pstate_nom);
> -		}
> +	/*
> +	 * Setup host based pstates and set nominal frequency only in
> +	 * P8.
> +	 */

Instead of skipping, is it good to add validating whether core comes 
with nominal frequency
or psafe frequency? So that we can catch in OPAL log about any failure 
if OCC doesn't set
up the core nominal frequency properly during boot time.
What will be the impact, if core comes with psafe frequency?



> +	if (proc_gen == proc_gen_p8) {
> +		for_each_chip(chip)
> +			for_each_available_core_in_chip(c, chip->id)
> +				cpu_pstates_prepare_core(chip, c, pstate_nom);
>  	}
> 
>  	/* Add opal_poller to poll OCC throttle status of each chip */

Patch hide | download patch | download mbox

diff --git a/hw/occ.c b/hw/occ.c
index 2ffb677..b222521 100644
--- a/hw/occ.c
+++ b/hw/occ.c
@@ -897,11 +897,14 @@  void occ_pstates_init(void)
 		return;
 	}
 
-	/* Setup host based pstates and set nominal frequency */
-	for_each_chip(chip) {
-		for_each_available_core_in_chip(c, chip->id) {
-			cpu_pstates_prepare_core(chip, c, pstate_nom);
-		}
+	/*
+	 * Setup host based pstates and set nominal frequency only in
+	 * P8.
+	 */
+	if (proc_gen == proc_gen_p8) {
+		for_each_chip(chip)
+			for_each_available_core_in_chip(c, chip->id)
+				cpu_pstates_prepare_core(chip, c, pstate_nom);
 	}
 
 	/* Add opal_poller to poll OCC throttle status of each chip */