Skip to content

Commit

Permalink
fast-reboot: occ: Delete OCC child nodes in /ibm, opal/power-mgt
Browse files Browse the repository at this point in the history
Fast-reboot in P8 fails to re-init OCC data as there are chipwise OCC
nodes which are already present in the /ibm,opal/power-mgt node. These
per-chip nodes hold the voltage IDs for each pstate and these can be
changed on OCC pstate table biasing. So delete these before calling
the re-init code to re-parse and populate the pstate data.

Reported-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
shilpasri authored and stewartsmith committed Mar 1, 2018
1 parent f6159cf commit ac4272b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hw/occ.c
Original file line number Diff line number Diff line change
Expand Up @@ -1664,7 +1664,7 @@ void occ_pstates_init(void)
return;
/* Handle fast reboots */
if (occ_pstates_initialized) {
struct dt_node *power_mgt;
struct dt_node *power_mgt, *child;
int i;
const char *props[] = {
"ibm,pstate-core-max",
Expand All @@ -1682,6 +1682,10 @@ void occ_pstates_init(void)
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]);

dt_for_each_child(power_mgt, child)
if (!strncmp(child->name, "occ", 3))
dt_free(child);
}

switch (proc_gen) {
Expand Down

0 comments on commit ac4272b

Please sign in to comment.