From: Laurent Dufour <ldufour@linux.ibm.com>
To: Nathan Lynch <nathanl@linux.ibm.com>, linuxppc-dev@lists.ozlabs.org
Cc: tyreld@linux.ibm.com
Subject: Re: [PATCH] powerpc/pseries/dlpar: use rtas_get_sensor()
Date: Tue, 4 May 2021 14:42:28 +0200 [thread overview]
Message-ID: <59402d92-38c1-bd73-a110-11a80f5e4c7c@linux.ibm.com> (raw)
In-Reply-To: <20210504025329.1713878-1-nathanl@linux.ibm.com>
Le 04/05/2021 à 04:53, Nathan Lynch a écrit :
> Instead of making bare calls to get-sensor-state, use
> rtas_get_sensor(), which correctly handles busy and extended delay
> statuses.
Reviewed-by: Laurent Dufour <ldufour@linux.ibm.com>
> Fixes: ab519a011caa ("powerpc/pseries: Kernel DLPAR Infrastructure")
> Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
> ---
> arch/powerpc/platforms/pseries/dlpar.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
> index 3ac70790ec7a..b1f01ac0c29e 100644
> --- a/arch/powerpc/platforms/pseries/dlpar.c
> +++ b/arch/powerpc/platforms/pseries/dlpar.c
> @@ -289,8 +289,7 @@ int dlpar_acquire_drc(u32 drc_index)
> {
> int dr_status, rc;
>
> - rc = rtas_call(rtas_token("get-sensor-state"), 2, 2, &dr_status,
> - DR_ENTITY_SENSE, drc_index);
> + rc = rtas_get_sensor(DR_ENTITY_SENSE, drc_index, &dr_status);
> if (rc || dr_status != DR_ENTITY_UNUSABLE)
> return -1;
>
> @@ -311,8 +310,7 @@ int dlpar_release_drc(u32 drc_index)
> {
> int dr_status, rc;
>
> - rc = rtas_call(rtas_token("get-sensor-state"), 2, 2, &dr_status,
> - DR_ENTITY_SENSE, drc_index);
> + rc = rtas_get_sensor(DR_ENTITY_SENSE, drc_index, &dr_status);
> if (rc || dr_status != DR_ENTITY_PRESENT)
> return -1;
>
> @@ -333,8 +331,7 @@ int dlpar_unisolate_drc(u32 drc_index)
> {
> int dr_status, rc;
>
> - rc = rtas_call(rtas_token("get-sensor-state"), 2, 2, &dr_status,
> - DR_ENTITY_SENSE, drc_index);
> + rc = rtas_get_sensor(DR_ENTITY_SENSE, drc_index, &dr_status);
> if (rc || dr_status != DR_ENTITY_PRESENT)
> return -1;
>
>
next prev parent reply other threads:[~2021-05-04 12:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-04 2:53 [PATCH] powerpc/pseries/dlpar: use rtas_get_sensor() Nathan Lynch
2021-05-04 12:42 ` Laurent Dufour [this message]
2021-06-26 10:37 ` Michael Ellerman
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=59402d92-38c1-bd73-a110-11a80f5e4c7c@linux.ibm.com \
--to=ldufour@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nathanl@linux.ibm.com \
--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).