[Skiboot] [PATCH 2/2] opal-prd: Fix opal-prd command line options
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Fri Sep 22 00:19:48 AEST 2017
HBRT OCC reset interface depends on service processor type.
FSP -> reset_pm_complex()
BMC -> process_occ_reset()
We have both `occ` and `pm-complex` command line interfaces.
This patch adds support to dispaly appropriate message depending
on system type.
FSP -> opal-prd occ --> display error message
FSP -> opal-prd pm-complex --> Call pm_complex_reset()
BMC -> opal-prd occ --> Call process_occ_reset()
BMC -> opal-prd pm-complex --> display error message
CC: Jeremy Kerr <jk at ozlabs.org>
CC: Daniel M Crowell <dcrowell at us.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
external/opal-prd/opal-prd.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/external/opal-prd/opal-prd.c b/external/opal-prd/opal-prd.c
index 20ce5da..c26cc95 100644
--- a/external/opal-prd/opal-prd.c
+++ b/external/opal-prd/opal-prd.c
@@ -1584,7 +1584,7 @@ static void handle_prd_control_occ_reset(struct control_msg *send_msg,
chip = msg->occ_reset.chip;
/* do reset */
- pr_debug("CTRL: resetting PM complex on chip %ld", chip);
+ pr_debug("CTRL: Calling OCC reset on chip %ld", chip);
pm_complex_reset(chip);
send_msg->data_len = 0;
@@ -2326,9 +2326,24 @@ static int parse_action(const char *str, enum action *action)
{
int rc;
- if (!strcmp(str, "occ") || !strcmp(str, "pm-complex")) {
+ if (!strcmp(str, "occ")) {
*action = ACTION_OCC_CONTROL;
rc = 0;
+
+ if (is_fsp_system()) {
+ pr_log(LOG_ERR, "CTRL: occ commands are not "
+ "supported on this system");
+ rc = -1;
+ }
+ } else if (!strcmp(str, "pm-complex")) {
+ *action = ACTION_OCC_CONTROL;
+ rc = 0;
+
+ if (!is_fsp_system()) {
+ pr_log(LOG_ERR, "CTRL: pm-complex commands are not "
+ "supported on this system");
+ rc = -1;
+ }
} else if (!strcmp(str, "daemon")) {
*action = ACTION_RUN_DAEMON;
rc = 0;
--
2.9.3
More information about the Skiboot
mailing list