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

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

From: Nathan Lynch <hidden>
Date: 2020-04-24 16:12:21

Sam Bobroff [off-list ref] 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.)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help