diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/occ.c | 16 | ||||
-rw-r--r-- | hw/prd.c | 8 |
2 files changed, 13 insertions, 11 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; @@ -212,8 +212,8 @@ static void send_next_pending_event(void) * disabled then we shouldn't propagate PRD events to the host. */ if (prd_enabled) - _opal_queue_msg(OPAL_MSG_PRD, prd_msg, prd_msg_consumed, 4, - (uint64_t *)prd_msg); + _opal_queue_msg(OPAL_MSG_PRD, prd_msg, prd_msg_consumed, + prd_msg->hdr.size, prd_msg); } static void __prd_event(uint32_t proc, uint8_t event) @@ -421,8 +421,8 @@ static int prd_msg_handle_firmware_req(struct opal_prd_msg *msg) } if (!rc) - rc = _opal_queue_msg(OPAL_MSG_PRD, prd_msg, prd_msg_consumed, 4, - (uint64_t *) prd_msg); + rc = _opal_queue_msg(OPAL_MSG_PRD, prd_msg, prd_msg_consumed, + prd_msg->hdr.size, prd_msg); else prd_msg_inuse = false; |