powerpc/fadump: invoke ibm,os-term with rtas_call_unlocked()
PATCH 1/1 powerpc/fadump: invoke ibm,os-term with rtas_call_unlocked()
Invoke ibm,os-term call with rtas_call_unlocked(), without using the RTAS spinlock, to avoid deadlock in the unlikely event of a machine crash while making an RTAS call.
--- arch/powerpc/kernel/rtas.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/kernel/rtas.c +2 -1
@@ -1587,6 +1587,7 @@ static bool ibm_extended_os_term;void rtas_os_term (char *str) {s32 token =rtas_function_token (RTAS_FN_IBM_OS_TERM ); +static struct rtas_args args;int status;/*
@@ -1607,7 +1608,7 @@ void rtas_os_term(char *str)* schedules. */ do { - status =rtas_call (token,1 ,1 ,NULL ,__pa (rtas_os_term_buf)); + status =rtas_call_unlocked (&args, token,1 ,1 ,NULL ,__pa (rtas_os_term_buf)); }while (rtas_busy_delay_time (status));if (status !=0 )
Signature · 1 line
2.40.1
Quoted 3 lines · Hari Bathini
Invoke ibm,os-term call with
rtas_call_unlocked(), without using the RTAS spinlock, to avoid deadlock in the unlikely event of a machine crash while making an RTAS call.
Thanks for the patch. Minor comment bellow.
Quoted 19 lines
Signed-off-by Hari Bathini <[email protected]>--- arch/powerpc/kernel/rtas.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)arch/powerpc/kernel/rtas.c +1
-0@@ -1587,6 +1587,7 @@ static bool ibm_extended_os_term;void rtas_os_term (char *str) {s32 token =rtas_function_token (RTAS_FN_IBM_OS_TERM ); +static struct rtas_args args;int status;/*
arch/powerpc/kernel/rtas.c void rtas_os_term(char *str) · line 1611
Quoted 5 lines
arch/powerpc/kernel/rtas.c +1
-1@@ -1607,7 +1608,7 @@ void rtas_os_term(char *str)* schedules. */ do { - status = rtas_call(token, 1, 1, NULL, __pa(rtas_os_term_buf)); + status = rtas_call_unlocked(&args, token, 1, 1, NULL, __pa(rtas_os_term_buf));
rtas_call_unlocked() returns void. You may want to extract the status from args->rets[0].
Thanks,
-Mahesh.
Quoted 6 lines
arch/powerpc/kernel/rtas.c +0
-0}while (rtas_busy_delay_time (status));if (status !=0 )Signature · 1 line
2.40.1
Signature · 1 line
Mahesh J Salgaonkar
Quoted 24 lines · Mahesh J Salgaonkar
Quoted 3 lines · Hari Bathini
Invoke ibm,os-term call with
rtas_call_unlocked(), without using the RTAS spinlock, to avoid deadlock in the unlikely event of a machine crash while making an RTAS call.Thanks for the patch. Minor comment bellow.
Quoted 17 lines
Signed-off-by Hari Bathini <[email protected]>--- arch/powerpc/kernel/rtas.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)arch/powerpc/kernel/rtas.c +1
-0@@ -1587,6 +1587,7 @@ static bool ibm_extended_os_term;void rtas_os_term (char *str) {s32 token =rtas_function_token (RTAS_FN_IBM_OS_TERM ); +static struct rtas_args args;int status;
Quoted 10 lines
arch/powerpc/kernel/rtas.c void rtas_os_term(char *str) · line 1611
Quoted 7 lines
arch/powerpc/kernel/rtas.c +1
-1/* @@ -1607,7 +1608,7 @@ void rtas_os_term(char *str)* schedules. */ do { - status = rtas_call(token, 1, 1, NULL, __pa(rtas_os_term_buf)); + status = rtas_call_unlocked(&args, token, 1, 1, NULL, __pa(rtas_os_term_buf));
rtas_call_unlocked()returns void. You may want to extract the status from args->rets[0].
Yeah, Mahesh. I posted a stale version. Will post the updated version.
Thanks
Hari