From: Nathan Lynch <nathanl@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: aik@ozlabs.ru, ajd@linux.ibm.com, tyreld@linux.ibm.com
Subject: [RFC 05/10] powerpc/pseries/fadump: convert to rtas_sched_if_busy()
Date: Mon, 3 May 2021 22:03:53 -0500 [thread overview]
Message-ID: <20210504030358.1715034-6-nathanl@linux.ibm.com> (raw)
In-Reply-To: <20210504030358.1715034-1-nathanl@linux.ibm.com>
None of these call sites need to use mdelay(); convert them to
rtas_sched_if_busy().
Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
---
arch/powerpc/platforms/pseries/rtas-fadump.c | 22 +++-----------------
1 file changed, 3 insertions(+), 19 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/rtas-fadump.c b/arch/powerpc/platforms/pseries/rtas-fadump.c
index f8f73b47b107..9a200d3bf5e0 100644
--- a/arch/powerpc/platforms/pseries/rtas-fadump.c
+++ b/arch/powerpc/platforms/pseries/rtas-fadump.c
@@ -129,7 +129,6 @@ static u64 rtas_fadump_get_bootmem_min(void)
static int rtas_fadump_register(struct fw_dump *fadump_conf)
{
- unsigned int wait_time;
int rc, err = -EIO;
/* TODO: Add upper time limit for the delay */
@@ -137,12 +136,7 @@ static int rtas_fadump_register(struct fw_dump *fadump_conf)
rc = rtas_call(fadump_conf->ibm_configure_kernel_dump, 3, 1,
NULL, FADUMP_REGISTER, &fdm,
sizeof(struct rtas_fadump_mem_struct));
-
- wait_time = rtas_busy_delay_time(rc);
- if (wait_time)
- mdelay(wait_time);
-
- } while (wait_time);
+ } while (rtas_sched_if_busy(rc));
switch (rc) {
case 0:
@@ -177,7 +171,6 @@ static int rtas_fadump_register(struct fw_dump *fadump_conf)
static int rtas_fadump_unregister(struct fw_dump *fadump_conf)
{
- unsigned int wait_time;
int rc;
/* TODO: Add upper time limit for the delay */
@@ -185,11 +178,7 @@ static int rtas_fadump_unregister(struct fw_dump *fadump_conf)
rc = rtas_call(fadump_conf->ibm_configure_kernel_dump, 3, 1,
NULL, FADUMP_UNREGISTER, &fdm,
sizeof(struct rtas_fadump_mem_struct));
-
- wait_time = rtas_busy_delay_time(rc);
- if (wait_time)
- mdelay(wait_time);
- } while (wait_time);
+ } while (rtas_sched_if_busy(rc));
if (rc) {
pr_err("Failed to un-register - unexpected error(%d).\n", rc);
@@ -202,7 +191,6 @@ static int rtas_fadump_unregister(struct fw_dump *fadump_conf)
static int rtas_fadump_invalidate(struct fw_dump *fadump_conf)
{
- unsigned int wait_time;
int rc;
/* TODO: Add upper time limit for the delay */
@@ -210,11 +198,7 @@ static int rtas_fadump_invalidate(struct fw_dump *fadump_conf)
rc = rtas_call(fadump_conf->ibm_configure_kernel_dump, 3, 1,
NULL, FADUMP_INVALIDATE, fdm_active,
sizeof(struct rtas_fadump_mem_struct));
-
- wait_time = rtas_busy_delay_time(rc);
- if (wait_time)
- mdelay(wait_time);
- } while (wait_time);
+ } while (rtas_sched_if_busy(rc));
if (rc) {
pr_err("Failed to invalidate - unexpected error (%d).\n", rc);
--
2.30.2
next prev parent reply other threads:[~2021-05-04 3:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-04 3:03 [RFC 00/10] powerpc/rtas: improved busy and extended delay status handling Nathan Lynch
2021-05-04 3:03 ` [RFC 01/10] powerpc/rtas: new APIs for busy and extended delay statuses Nathan Lynch
2021-05-13 9:59 ` Alexey Kardashevskiy
2021-05-04 3:03 ` [RFC 02/10] powerpc/rtas: do not schedule in rtas_os_term() Nathan Lynch
2021-05-04 3:03 ` [RFC 03/10] powerpc/rtas-rtc: convert get-time-of-day to rtas_force_spin_if_busy() Nathan Lynch
2021-05-04 3:03 ` [RFC 04/10] powerpc/rtas-rtc: convert set-time-of-day to rtas_sched_if_busy() Nathan Lynch
2021-05-04 3:03 ` Nathan Lynch [this message]
2021-05-04 3:03 ` [RFC 06/10] powerpc/pseries/msi: convert " Nathan Lynch
2021-05-04 3:03 ` [RFC 07/10] powerpc/pseries/iommu: " Nathan Lynch
2021-05-04 3:03 ` [RFC 08/10] powerpc/pseries/dlpar: " Nathan Lynch
2021-05-04 3:03 ` [RFC 09/10] powerpc/rtas: " Nathan Lynch
2021-05-04 3:03 ` [RFC 10/10] powerpc/rtas_flash: " Nathan Lynch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210504030358.1715034-6-nathanl@linux.ibm.com \
--to=nathanl@linux.ibm.com \
--cc=aik@ozlabs.ru \
--cc=ajd@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=tyreld@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).