Message ID | 20240329020954.537236-2-nayna@linux.ibm.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | [v3,1/2] powerpc/pseries: fix max polling time in plpks_confirm_object_flushed() function | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/github-powerpc_ppctests | success | Successfully ran 8 jobs. |
snowpatch_ozlabs/github-powerpc_selftests | success | Successfully ran 8 jobs. |
snowpatch_ozlabs/github-powerpc_sparse | success | Successfully ran 4 jobs. |
snowpatch_ozlabs/github-powerpc_clang | success | Successfully ran 6 jobs. |
snowpatch_ozlabs/github-powerpc_kernel_qemu | success | Successfully ran 23 jobs. |
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@linux.ibm.com> > Tested-by: Nageswara R Sastry <rnsastry@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);
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);