diff mbox series

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

Message ID 20210504030358.1715034-10-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/checkpatch success total: 0 errors, 0 warnings, 0 checks, 32 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.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index 4177f7385ea2..c5cc4542856f 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -743,7 +743,7 @@  int rtas_set_power_level(int powerdomain, int level, int *setlevel)
 
 	do {
 		rc = rtas_call(token, 2, 2, setlevel, powerdomain, level);
-	} while (rtas_busy_delay(rc));
+	} while (rtas_sched_if_busy(rc));
 
 	if (rc < 0)
 		return rtas_error_rc(rc);
@@ -761,7 +761,7 @@  int rtas_get_sensor(int sensor, int index, int *state)
 
 	do {
 		rc = rtas_call(token, 2, 2, state, sensor, index);
-	} while (rtas_busy_delay(rc));
+	} while (rtas_sched_if_busy(rc));
 
 	if (rc < 0)
 		return rtas_error_rc(rc);
@@ -822,7 +822,7 @@  int rtas_set_indicator(int indicator, int index, int new_value)
 
 	do {
 		rc = rtas_call(token, 3, 1, NULL, indicator, index, new_value);
-	} while (rtas_busy_delay(rc));
+	} while (rtas_sched_if_busy(rc));
 
 	if (rc < 0)
 		return rtas_error_rc(rc);
@@ -990,7 +990,7 @@  void rtas_activate_firmware(void)
 
 	do {
 		fwrc = rtas_call(token, 0, 1, NULL);
-	} while (rtas_busy_delay(fwrc));
+	} while (rtas_sched_if_busy(fwrc));
 
 	if (fwrc)
 		pr_err("ibm,activate-firmware failed (%i)\n", fwrc);