[Skiboot] [PATCH] ipmi-sel: use opal_booting() over poking at debug descriptor

Stewart Smith stewart at linux.ibm.com
Fri Jun 8 14:46:17 AEST 2018


Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
 hw/ipmi/ipmi-sel.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/hw/ipmi/ipmi-sel.c b/hw/ipmi/ipmi-sel.c
index 338685414153..466fcb2608d8 100644
--- a/hw/ipmi/ipmi-sel.c
+++ b/hw/ipmi/ipmi-sel.c
@@ -504,8 +504,7 @@ static void sel_power(uint8_t power)
 	switch (power) {
 	case SOFT_OFF:
 		prlog(PR_NOTICE, "Soft shutdown requested\n");
-		if (!(debug_descriptor.state_flags & OPAL_BOOT_COMPLETE) &&
-		    platform.cec_power_down) {
+		if (opal_booting() && platform.cec_power_down) {
 			prlog(PR_NOTICE, "Host not up, shutting down now\n");
 			platform.cec_power_down(IPMI_CHASSIS_PWR_DOWN);
 		} else {
@@ -515,8 +514,7 @@ static void sel_power(uint8_t power)
 		break;
 	case SOFT_REBOOT:
 		prlog(PR_NOTICE, "Soft reboot requested\n");
-		if (!(debug_descriptor.state_flags & OPAL_BOOT_COMPLETE) &&
-		    platform.cec_reboot) {
+		if (opal_booting() && platform.cec_reboot) {
 			prlog(PR_NOTICE, "Host not up, rebooting now\n");
 			platform.cec_reboot();
 		} else {
-- 
2.17.1



More information about the Skiboot mailing list