diff mbox series

[RFC,10/10] powerpc/rtas_flash: convert to rtas_sched_if_busy()

Message ID 20210504030358.1715034-11-nathanl@linux.ibm.com (mailing list archive)
State RFC
Headers show
Series powerpc/rtas: improved busy and extended delay status handling | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch powerpc/merge (134b5c8a49b594ff6cfb4ea1a92400bb382b46d2)
snowpatch_ozlabs/build-ppc64le fail Build failed!
snowpatch_ozlabs/build-ppc64be fail Build failed!
snowpatch_ozlabs/build-ppc64e success Build succeeded
snowpatch_ozlabs/build-pmac32 success Build succeeded
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked
snowpatch_ozlabs/needsstable success Patch has no Fixes tags

Commit Message

Nathan Lynch May 4, 2021, 3:03 a.m. UTC
rtas_sched_if_busy() has better behavior for RTAS_BUSY (-2) and small
extended delay values.

Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
---
 arch/powerpc/kernel/rtas_flash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c
index a99179d83538..bedefb9178ec 100644
--- a/arch/powerpc/kernel/rtas_flash.c
+++ b/arch/powerpc/kernel/rtas_flash.c
@@ -378,7 +378,7 @@  static void manage_flash(struct rtas_manage_flash_t *args_buf, unsigned int op)
 	do {
 		rc = rtas_call(rtas_token("ibm,manage-flash-image"), 1, 1,
 			       NULL, op);
-	} while (rtas_busy_delay(rc));
+	} while (rtas_sched_if_busy(rc));
 
 	args_buf->status = rc;
 }
@@ -456,7 +456,7 @@  static void validate_flash(struct rtas_validate_flash_t *args_buf)
 			       (u32) __pa(rtas_data_buf), args_buf->buf_size);
 		memcpy(args_buf->buf, rtas_data_buf, VALIDATE_BUF_SIZE);
 		spin_unlock(&rtas_data_buf_lock);
-	} while (rtas_busy_delay(rc));
+	} while (rtas_sched_if_busy(rc));
 
 	args_buf->status = rc;
 	args_buf->update_results = update_results;