diff options
author | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2019-05-28 11:17:20 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2019-06-03 10:28:57 +1000 |
commit | 66d0ad68687bb12f7fb4301652f434f886998bdf (patch) | |
tree | 8e125fe5325c147469068a2dea0b8cf5e96d1056 /hw/occ.c | |
parent | ec9f67bdaedcbfb5836677430da3738c3a3eaa84 (diff) | |
download | skiboot-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 'hw/occ.c')
-rw-r--r-- | hw/occ.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -908,8 +908,9 @@ static void occ_throttle_poll(void *data __unused) occ_msg.type = cpu_to_be64(OCC_THROTTLE); occ_msg.chip = 0; occ_msg.throttle_status = 0; - rc = _opal_queue_msg(OPAL_MSG_OCC, NULL, NULL, 3, - (uint64_t *)&occ_msg); + rc = _opal_queue_msg(OPAL_MSG_OCC, NULL, NULL, + sizeof(struct opal_occ_msg), + &occ_msg); if (!rc) occ_reset = false; } @@ -929,7 +930,8 @@ static void occ_throttle_poll(void *data __unused) occ_msg.throttle_status = cpu_to_be64(throttle); rc = _opal_queue_msg(OPAL_MSG_OCC, NULL, occ_msg_consumed, - 3, (uint64_t *)&occ_msg); + sizeof(struct opal_occ_msg), + &occ_msg); if (!rc) { chip->throttle = throttle; occ_opal_msg_outstanding = true; @@ -1938,8 +1940,8 @@ static void __occ_do_load(u8 scope, u32 dbob_id __unused, u32 seq_id) } else if (!rc) { struct opal_occ_msg occ_msg = { CPU_TO_BE64(OCC_LOAD), 0, 0 }; - rc = _opal_queue_msg(OPAL_MSG_OCC, NULL, NULL, 3, - (uint64_t *)&occ_msg); + rc = _opal_queue_msg(OPAL_MSG_OCC, NULL, NULL, + sizeof(struct opal_occ_msg), &occ_msg); if (rc) prlog(PR_INFO, "OCC: Failed to queue message %d\n", OCC_LOAD); @@ -2062,8 +2064,8 @@ int occ_msg_queue_occ_reset(void) int rc; lock(&occ_lock); - rc = _opal_queue_msg(OPAL_MSG_OCC, NULL, NULL, 3, - (uint64_t *)&occ_msg); + rc = _opal_queue_msg(OPAL_MSG_OCC, NULL, NULL, + sizeof(struct opal_occ_msg), &occ_msg); if (rc) { prlog(PR_INFO, "OCC: Failed to queue OCC_RESET message\n"); goto out; |