aboutsummaryrefslogtreecommitdiff
path: root/include/opal-msg.h
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2019-05-28 11:17:20 +0530
committerStewart Smith <stewart@linux.ibm.com>2019-06-03 10:28:57 +1000
commit66d0ad68687bb12f7fb4301652f434f886998bdf (patch)
tree8e125fe5325c147469068a2dea0b8cf5e96d1056 /include/opal-msg.h
parentec9f67bdaedcbfb5836677430da3738c3a3eaa84 (diff)
downloadskiboot-66d0ad68687bb12f7fb4301652f434f886998bdf.zip
skiboot-66d0ad68687bb12f7fb4301652f434f886998bdf.tar.gz
skiboot-66d0ad68687bb12f7fb4301652f434f886998bdf.tar.bz2
opal-msg: Pass parameter size to _opal_queue_msg()
Currently _opal_queue_msg() takes number of parameters. So far this was fine as opal_queue_msg() was supporting only fixed number of parameters (8 * 8 bytes). Soon we are going to introduce variable size parameter. Hence num_params -> params_size. Cc: Jeremy Kerr <jk@ozlabs.org> Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Cc: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.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 'include/opal-msg.h')
-rw-r--r--include/opal-msg.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/opal-msg.h b/include/opal-msg.h
index 9be7033..bfe148b 100644
--- a/include/opal-msg.h
+++ b/include/opal-msg.h
@@ -30,13 +30,18 @@
/* Max size of struct opal_msg */
#define OPAL_MSG_SIZE (64 * 1024)
+/* opal_msg fixed parameters size */
+#define OPAL_MSG_HDR_SIZE (offsetof(struct opal_msg, params))
+#define OPAL_MSG_FIXED_PARAMS_SIZE \
+ (sizeof(struct opal_msg) - OPAL_MSG_HDR_SIZE)
+
int _opal_queue_msg(enum opal_msg_type msg_type, void *data,
void (*consumed)(void *data, int status),
- size_t num_params, const u64 *params);
+ size_t params_size, const void *params);
#define opal_queue_msg(msg_type, data, cb, ...) \
_opal_queue_msg(msg_type, data, cb, \
- sizeof((u64[]) {__VA_ARGS__})/sizeof(u64), \
+ sizeof((u64[]) {__VA_ARGS__}), \
(u64[]) {__VA_ARGS__});
void opal_init_msg(void);