aboutsummaryrefslogtreecommitdiff
path: root/hw/fsp
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2019-05-28 11:17:19 +0530
committerStewart Smith <stewart@linux.ibm.com>2019-06-03 10:28:57 +1000
commitec9f67bdaedcbfb5836677430da3738c3a3eaa84 (patch)
treea3e5768c5b41f46a51a4f06f1452c1941d7bd58c /hw/fsp
parentbc5584c3145bc2029293674689275b55f87f246e (diff)
downloadskiboot-ec9f67bdaedcbfb5836677430da3738c3a3eaa84.zip
skiboot-ec9f67bdaedcbfb5836677430da3738c3a3eaa84.tar.gz
skiboot-ec9f67bdaedcbfb5836677430da3738c3a3eaa84.tar.bz2
opal-msg: Pass return value to callback handler
Kernel calls opal_get_msg() API to read OPAL message. In this path OPAL calls "callback" handler to inform caller that kernel read the opal message. It assumes that read is always success. This assumption was fine as message was always fixed size. Next patch introduces variable size opal message. In that situation opal_get_msg() may fail due to insufficient buffer size (ex: old kernel and new OPAL combination). So lets add `return value` parameter to "callback" handler. So that caller knows kernel didn't read the message and take appropriate action. Cc: Jeremy Kerr <jk@ozlabs.org> Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Cc: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Acked-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hw/fsp')
-rw-r--r--hw/fsp/fsp-mem-err.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/fsp/fsp-mem-err.c b/hw/fsp/fsp-mem-err.c
index a2b0619..7f01c58 100644
--- a/hw/fsp/fsp-mem-err.c
+++ b/hw/fsp/fsp-mem-err.c
@@ -1,4 +1,4 @@
-/* Copyright 2013-2014 IBM Corp.
+/* Copyright 2013-2019 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -84,7 +84,7 @@ static bool send_response_to_fsp(u32 cmd_sub_mod)
* in that case, at least until we clarify a bit better how
* we want to handle things.
*/
-static void queue_event_for_delivery(void *data __unused)
+static void queue_event_for_delivery(void *data __unused, int staus __unused)
{
struct fsp_mem_err_node *entry;
uint64_t *merr_data;
@@ -144,7 +144,7 @@ static int queue_mem_err_node(struct OpalMemoryErrorData *merr_evt)
unlock(&mem_err_lock);
/* Queue up the event for delivery to OS. */
- queue_event_for_delivery(NULL);
+ queue_event_for_delivery(NULL, OPAL_SUCCESS);
return 0;
}