Thread (8 messages) 8 messages, 3 authors, 2020-04-28

Re: [PATCH v3 1/3] powerpc/rtas: Export rtas_error_rc

From: Sam Bobroff <hidden>
Date: 2020-04-28 02:57:14

On Fri, Apr 24, 2020 at 11:07:43AM -0500, Nathan Lynch wrote:
Sam Bobroff [off-list ref] writes:
quoted
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.)
Ah, interesting.

I'll do another version as you suggest.

Cheers,
Sam.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help