@@ -912,8 +912,14 @@ void add_cpu_idle_state_properties(void)
* P9 : homer_base is set
*/
if (!(proc_chip_quirks & QUIRK_MAMBO_CALLOUTS)) {
- if (proc_gen == proc_gen_p9)
+ if (proc_gen == proc_gen_p9) {
+ struct proc_chip *c;
has_wakeup_engine = !!(chip->homer_base);
+ /* disable if p9_stop_api fails at any previous case */
+ for_each_chip(c) {
+ has_wakeup_engine &= ~(c->wakeup_engine_error);
+ }
+ }
else /* (proc_gen == proc_gen_p8) */
has_wakeup_engine = (chip->slw_base && chip->slw_bar_size &&
chip->slw_image_size);
@@ -1298,6 +1304,9 @@ static void slw_init_chip_p9(struct proc_chip *chip)
log_simple_error(&e_info(OPAL_RC_SLW_REG),
"SLW: Failed to set HRMOR for CPU %x,RC=0x%x\n",
c->pir, rc);
+ prlog(PR_ERR, "Disabling deep stop states\n");
+ chip->wakeup_engine_error = true;
+
}
}
}
@@ -186,6 +186,7 @@ struct proc_chip {
uint64_t slw_base;
uint64_t slw_bar_size;
uint64_t slw_image_size;
+ bool wakeup_engine_error;
/* Used by hw/homer.c */
uint64_t homer_base;
Adds a per chip flag that needs to be set on stop api failure, at any point before device-tree is created. If this flag is set, deeper states (which use p9_stop_api) will not appear in device-tree. Signed-off-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com> --- hw/slw.c | 11 ++++++++++- include/chip.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-)