[Skiboot] [PATCH v4 7/8] slw: Allow adding idle states to power-mgt node in mambo

Shreyas B. Prabhu shreyas at linux.vnet.ibm.com
Thu Jun 16 23:56:19 AEST 2016


This patch removes the check which prevents adding any idle state to
"power-mgt" node in mambo.

Power8 exposes 3 idle states- nap, fast-sleep and deep-winkle.
While fast-sleep depends on SCOMs and deep-winkle depends on SCOMs/SLW,
nap has no such dependencies and it can be enabled in mambo. Current code
checks for "fast-sleep" in hostboot provided
"ibm,enabled-idle-states" dt node for adding fast-sleep and checks
for presence of SLW for adding winkle to "power-mgt". Hence with this
change only nap will be added to "power-mgt" node in mambo on Power8.

On Power9, this patch enables all idle states which don't need SLW.

Acked-by: Michael Neuling <mikey at neuling.org>
Signed-off-by: Shreyas B. Prabhu <shreyas at linux.vnet.ibm.com>
---
Verified on mambo versions 1.0-1 and 1.0-2 available publicly

 core/chip.c    | 3 +--
 hw/slw.c       | 6 ------
 include/chip.h | 5 ++---
 3 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/core/chip.c b/core/chip.c
index 10e70763f848..405e81dc0052 100644
--- a/core/chip.c
+++ b/core/chip.c
@@ -78,8 +78,7 @@ void init_chips(void)
 	/* Detect mambo chip */
 	if (dt_find_by_path(dt_root, "/mambo")) {
 		proc_chip_quirks |= QUIRK_NO_CHIPTOD | QUIRK_MAMBO_CALLOUTS
-			| QUIRK_NO_F000F | QUIRK_NO_PBA | QUIRK_NO_OCC_IRQ
-			| QUIRK_DISABLE_NAP;
+			| QUIRK_NO_F000F | QUIRK_NO_PBA | QUIRK_NO_OCC_IRQ;
 		prlog(PR_NOTICE, "CHIP: Detected Mambo simulator\n");
 	}
 	if (dt_find_by_path(dt_root, "/simics")) {
diff --git a/hw/slw.c b/hw/slw.c
index 12ef494fb39c..748e319a58b4 100644
--- a/hw/slw.c
+++ b/hw/slw.c
@@ -594,12 +594,6 @@ void add_cpu_idle_state_properties(void)
 		return;
 	}
 
-	/* Mambo currently misbehaves in nap mode vs. timebase, so let's
-	 * disable idle states
-	 */
-	if (chip_quirk(QUIRK_DISABLE_NAP))
-		return;
-
 	/*
 	 * Chose the right state table for the chip
 	 *
diff --git a/include/chip.h b/include/chip.h
index 1ca8a943fdb3..d93de22088a6 100644
--- a/include/chip.h
+++ b/include/chip.h
@@ -118,9 +118,8 @@ enum proc_chip_quirks {
 	QUIRK_NO_F000F		= 0x00000004,
 	QUIRK_NO_PBA		= 0x00000008,
 	QUIRK_NO_OCC_IRQ       	= 0x00000010,
-	QUIRK_DISABLE_NAP	= 0x00000020,
-	QUIRK_SIMICS		= 0x00000040,
-	QUIRK_POWER_RADIX       = 0x00000080,
+	QUIRK_SIMICS		= 0x00000020,
+	QUIRK_POWER_RADIX       = 0x00000040,
 } proc_chip_quirks;
 
 static inline bool chip_quirk(unsigned int q)
-- 
1.9.3



More information about the Skiboot mailing list