diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-04-01 14:47:45 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-04-01 14:47:45 +1100 |
commit | a56b9aa8e654aa559538694dac539135b942f8e0 (patch) | |
tree | 3d58aba067705cc09728675bdc1cd0ef5bf1aba6 /core | |
parent | 53402d0f569506f2baf8b2820dc30691a0764833 (diff) | |
parent | d597168a0ea6958955a2a2fc845354059fd057c2 (diff) | |
download | skiboot-a56b9aa8e654aa559538694dac539135b942f8e0.zip skiboot-a56b9aa8e654aa559538694dac539135b942f8e0.tar.gz skiboot-a56b9aa8e654aa559538694dac539135b942f8e0.tar.bz2 |
Merge branch 'skiboot-5.2.x' - partial HMI
Diffstat (limited to 'core')
-rw-r--r-- | core/hmi.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -219,7 +219,7 @@ static struct lock hmi_lock = LOCK_UNLOCKED; static int queue_hmi_event(struct OpalHMIEvent *hmi_evt, int recover) { - uint64_t *hmi_data; + size_t num_params; /* Don't queue up event if recover == -1 */ if (recover == -1) @@ -232,16 +232,17 @@ static int queue_hmi_event(struct OpalHMIEvent *hmi_evt, int recover) hmi_evt->disposition = OpalHMI_DISPOSITION_NOT_RECOVERED; /* - * V2 of struct OpalHMIEvent is of (4 * 64 bits) size and well packed + * V2 of struct OpalHMIEvent is of (5 * 64 bits) size and well packed * structure. Hence use uint64_t pointer to pass entire structure - * using 4 params in generic message format. + * using 5 params in generic message format. Instead of hard coding + * num_params divide the struct size by 8 bytes to get exact + * num_params value. */ - hmi_data = (uint64_t *)hmi_evt; + num_params = ALIGN_UP(sizeof(*hmi_evt), sizeof(u64)) / sizeof(u64); /* queue up for delivery to host. */ - return opal_queue_msg(OPAL_MSG_HMI_EVT, NULL, NULL, - hmi_data[0], hmi_data[1], hmi_data[2], - hmi_data[3]); + return _opal_queue_msg(OPAL_MSG_HMI_EVT, NULL, NULL, + num_params, (uint64_t *)hmi_evt); } static int is_capp_recoverable(int chip_id) |