[5/9] SLW: Move MAMBO simulator checks to slw_init

Message ID 1515065286-8656-6-git-send-email-akshay.adiga@linux.vnet.ibm.com
State Accepted
Headers show
Series
  • p9_stop_api error handling
Related show

Commit Message

Akshay Adiga Jan. 4, 2018, 11:28 a.m.
Move MAMBO simulator checks to slw_init.

Signed-off-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
---
 hw/slw.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Patch

diff --git a/hw/slw.c b/hw/slw.c
index 119f1e28..a2004c60 100644
--- a/hw/slw.c
+++ b/hw/slw.c
@@ -292,11 +292,6 @@  static bool slw_set_overrides_p9(struct proc_chip *chip, struct cpu_thread *c)
 	int rc;
 	uint32_t core = pir_to_core_id(c->pir);
 
-	/* MAMBO does not require this init */
-	if (proc_chip_quirks & QUIRK_MAMBO_CALLOUTS) {
-		return true;
-	}
-
 	/* Clear special wakeup bits that could hold power mgt */
 	rc = xscom_write(chip->id,
 			 XSCOM_ADDR_P9_EC_SLAVE(core, EC_PPM_SPECIAL_WKUP_HYP),
@@ -931,8 +926,6 @@  void add_cpu_idle_state_properties(void)
 		nr_states = ARRAY_SIZE(power7_cpu_idle_states);
 	}
 
-	if (proc_chip_quirks & QUIRK_MAMBO_CALLOUTS)
-		wakeup_engine_state = WAKEUP_ENGINE_NOT_PRESENT;
 
 	/*
 	 * Currently we can't append strings and cells to dt properties.
@@ -1695,6 +1688,8 @@  void slw_init(void)
 {
 	struct proc_chip *chip;
 
+	if (proc_chip_quirks & QUIRK_MAMBO_CALLOUTS)
+		wakeup_engine_state = WAKEUP_ENGINE_NOT_PRESENT;
 	if (proc_gen == proc_gen_p8) {
 		for_each_chip(chip) {
 			slw_init_chip_p8(chip);