[Skiboot] [PATCH v3 03/10] opal-msg: Pass parameter size to _opal_queue_msg()

Jeremy Kerr jk at ozlabs.org
Thu May 16 16:27:27 AEST 2019


Hi Vasant,

> 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.

Looks good to me.

Acked-by Jeremy Kerr <jk at ozlabs.org>

... with just one suggestion, if you end up re-rolling for other
reasons:

> --- a/core/hmi.c
> +++ b/core/hmi.c
> @@ -331,13 +331,13 @@ static int queue_hmi_event(struct OpalHMIEvent *hmi_evt, int recover, uint64_t *
>  	 * num_params divide the struct size by 8 bytes to get exact
>  	 * num_params value.
>  	 */
> -	num_params = ALIGN_UP(sizeof(*hmi_evt), sizeof(u64)) / sizeof(u64);
> +	num_params = ALIGN_UP(sizeof(*hmi_evt), sizeof(u64));

Maybe rename this to `size`, as it's no longer the number of parameters.

Cheers,


Jeremy




More information about the Skiboot mailing list