diff options
author | Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> | 2018-02-02 12:32:32 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2018-02-08 18:21:42 -0600 |
commit | 85a1de35cbe47618e9d4104880f182121806af4d (patch) | |
tree | a8d91ce33973908fc3403be14217c5b0aa0d4c8d /hw | |
parent | d2cc3957abef48f3afdf8ec61d69e87e3446d562 (diff) | |
download | skiboot-85a1de35cbe47618e9d4104880f182121806af4d.zip skiboot-85a1de35cbe47618e9d4104880f182121806af4d.tar.gz skiboot-85a1de35cbe47618e9d4104880f182121806af4d.tar.bz2 |
fast-boot: occ: Re-parse the pstate table during fast-boot
OCC shares the frequency list to host by copying the pstate table to
main memory in HOMER. This table is parsed during boot to create
device-tree properties for frequency and pstate IDs. OCC can update
the pstate table to present a new set of frequencies to the host. But
host will remain oblivious to these changes unless it is re-inited
with the updated device-tree CPU frequency properties. So this patch
allows to re-parse the pstate table and update the device-tree
properties during fast-reboot.
OCC updates the pstate table when asked to do so using pstate-table
bias command. And this is mainly used by WOF team for
characterization purposes.
Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Tested-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/occ.c | 23 |
1 files changed, 21 insertions, 2 deletions
@@ -1556,8 +1556,24 @@ void occ_pstates_init(void) if (proc_gen < proc_gen_p8) return; /* Handle fast reboots */ - if (occ_pstates_initialized) - return; + if (occ_pstates_initialized) { + struct dt_node *power_mgt; + int i; + const char *props[] = { + "ibm,pstate-core-max", + "ibm,pstate-frequencies-mhz", + "ibm,pstate-ids", + "ibm,pstate-max", + "ibm,pstate-min", + "ibm,pstate-nominal", + "ibm,pstate-turbo", + "ibm,pstate-ultra-turbo", + }; + + power_mgt = dt_find_by_path(dt_root, "/ibm,opal/power-mgt"); + for (i = 0; i < ARRAY_SIZE(props); i++) + dt_check_del_prop(power_mgt, props[i]); + } switch (proc_gen) { case proc_gen_p8: @@ -1605,6 +1621,9 @@ void occ_pstates_init(void) cpu_pstates_prepare_core(chip, c, pstate_nom); } + if (occ_pstates_initialized) + return; + /* Add opal_poller to poll OCC throttle status of each chip */ for_each_chip(chip) chip->throttle = 0; |