[PATCH v3 2/2] powerpc/pseries: increase timeout value for plpks_signed_update_var() H_CALL

Andrew Donnellan ajd at linux.ibm.com
Tue Apr 2 15:02:12 AEDT 2024


On Thu, 2024-03-28 at 22:09 -0400, Nayna Jain wrote:
> Signed update H_CALL currently polls PHYP for 5msec. Update this to
> 5sec.

I think this description of the existing code's behaviour is incorrect:

- without your patch #1, the existing code polls for up to 5,000ms
- with your patch #1, the existing code polls for up to 5,000,000ms
(PLPKS_MAX_TIMEOUT is redefined in terms of microseconds, while we
still assume it's in milliseconds).

This patch should just be squashed into patch #1.

Andrew

> 
> Signed-off-by: Nayna Jain <nayna at linux.ibm.com>
> Tested-by: Nageswara R Sastry <rnsastry at linux.ibm.com>
> ---
> v3:
>  * Addition to Patch 1 timeout patch based on Andrew's feedback.
> 
>  arch/powerpc/platforms/pseries/plpks.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/pseries/plpks.c
> b/arch/powerpc/platforms/pseries/plpks.c
> index bcfcd5acc5c2..4a595493d28a 100644
> --- a/arch/powerpc/platforms/pseries/plpks.c
> +++ b/arch/powerpc/platforms/pseries/plpks.c
> @@ -463,9 +463,10 @@ int plpks_signed_update_var(struct plpks_var
> *var, u64 flags)
>  
>  		continuetoken = retbuf[0];
>  		if (pseries_status_to_err(rc) == -EBUSY) {
> -			int delay_ms = get_longbusy_msecs(rc);
> -			mdelay(delay_ms);
> -			timeout += delay_ms;
> +			int delay_us = get_longbusy_msecs(rc) *
> 1000;
> +
> +			fsleep(delay_us);
> +			timeout += delay_us;
>  		}
>  		rc = pseries_status_to_err(rc);
>  	} while (rc == -EBUSY && timeout < PLPKS_MAX_TIMEOUT);

-- 
Andrew Donnellan    OzLabs, ADL Canberra
ajd at linux.ibm.com   IBM Australia Limited


More information about the Linuxppc-dev mailing list