From: Nathan Lynch <nathanl@linux.ibm.com>
To: Sam Bobroff <sbobroff@linux.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, Oliver O'Halloran <oohall@gmail.com>
Subject: Re: [PATCH v3 1/3] powerpc/rtas: Export rtas_error_rc
Date: Fri, 24 Apr 2020 11:07:43 -0500 [thread overview]
Message-ID: <874kt8lve8.fsf@linux.ibm.com> (raw)
In-Reply-To: <e9c245df4a0b1cd1f68171c81e0d9e64a13ab0e9.1587704308.git.sbobroff@linux.ibm.com>
Sam Bobroff <sbobroff@linux.ibm.com> writes:
> Export rtas_error_rc() so that it can be used by other users of
> rtas_call() (which is already exported).
This will do the right thing for your ibm,configure-pe use case in patch
2, but the -900x => errno translations in rtas_error_rc() appear
tailored for the indicator- and sensor-related calls that currently use
it. From my reading of PAPR+, the meaning of a -900x RTAS status word
depends on the call. For example, -9002 commonly means "not authorized",
which we would typically translate to -EPERM, but rtas_error_rc() would
translate it to -ENODEV.
Also the semantics of -9001 as a return value seem to vary a bit.
So I don't think rtas_error_rc() should be advertised as a generically
useful facility in its current form.
(I have had some thoughts about how firmware/hypervisor call status can
be translated to meaningful Linux error values without tedious switch
statements, which I'm happy to expand on if anyone is interested, but I
don't want to hijack your submission for that discussion.)
next prev parent reply other threads:[~2020-04-24 16:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-24 4:58 [PATCH v3 0/3] powerpc/eeh: Release EEH device state synchronously Sam Bobroff
2020-04-24 4:58 ` [PATCH v3 1/3] powerpc/rtas: Export rtas_error_rc Sam Bobroff
2020-04-24 16:07 ` Nathan Lynch [this message]
2020-04-28 2:27 ` Sam Bobroff
2020-04-28 3:31 ` Michael Ellerman
2020-04-24 4:58 ` [PATCH v3 2/3] powerpc/eeh: fix pseries_eeh_configure_bridge() Sam Bobroff
2020-04-24 16:17 ` Nathan Lynch
2020-04-24 4:58 ` [PATCH v3 3/3] powerpc/eeh: Release EEH device state synchronously Sam Bobroff
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=874kt8lve8.fsf@linux.ibm.com \
--to=nathanl@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=oohall@gmail.com \
--cc=sbobroff@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).