aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorShilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>2016-06-29 10:34:22 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-09-26 14:12:11 +1000
commitb5e54375bdc424eb2e709d41d2306d854f7e07bb (patch)
tree57372ca141273947bf9cda55ee4fd68078eb9424 /external
parent583c8203dcb26b42cea81e4734ea926dae05dbb9 (diff)
downloadskiboot-b5e54375bdc424eb2e709d41d2306d854f7e07bb.zip
skiboot-b5e54375bdc424eb2e709d41d2306d854f7e07bb.tar.gz
skiboot-b5e54375bdc424eb2e709d41d2306d854f7e07bb.tar.bz2
occ/prd/opal-prd: Queue OCC_RESET event message to host in OpenPOWER
During an OCC reset cycle the system is forced to Psafe pstate. When OCC becomes active, the system has to be restored to its last pstate as requested by host. So host needs to be notified of OCC_RESET event or else system will continue to remian in Psafe state until host requests a new pstate after the OCC reset cycle. This patch defines 'OPAL_PRD_MSG_TYPE_OCC_RESET_NOTIFY' to notify OPAL when opal-prd issues OCC reset. OPAL will queue OCC_RESET message to host when it receives opal_prd_msg of type '*_OCC_RESET_NOTIFY'. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external')
-rw-r--r--external/opal-prd/opal-prd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/external/opal-prd/opal-prd.c b/external/opal-prd/opal-prd.c
index 56943c4..1723924 100644
--- a/external/opal-prd/opal-prd.c
+++ b/external/opal-prd/opal-prd.c
@@ -1381,6 +1381,7 @@ static void handle_prd_control_run_cmd(struct control_msg *send_msg,
static void handle_prd_control(struct opal_prd_ctx *ctx, int fd)
{
struct control_msg msg, *recv_msg, *send_msg;
+ struct opal_prd_msg omsg;
bool enabled = false;
int rc, size;
@@ -1433,6 +1434,11 @@ static void handle_prd_control(struct opal_prd_ctx *ctx, int fd)
handle_prd_control_occ_actuation(send_msg, enabled);
break;
case CONTROL_MSG_TEMP_OCC_RESET:
+ omsg.hdr.type = OPAL_PRD_MSG_TYPE_OCC_RESET_NOTIFY;
+ omsg.hdr.size = htobe16(sizeof(omsg));
+ rc = write(ctx->fd, &omsg, sizeof(omsg));
+ if (rc != sizeof(omsg))
+ pr_log(LOG_WARNING, "FW: Failed to send OCC_RESET message: %m");
handle_prd_control_occ_reset(send_msg);
break;
case CONTROL_MSG_TEMP_OCC_ERROR: