[Skiboot] [PATCH] Fix booting & OPAL call return values with DEBUG=1

Stewart Smith stewart at linux.vnet.ibm.com
Thu Dec 7 08:36:57 AEDT 2017


Stewart Smith <stewart at linux.vnet.ibm.com> writes:
> On a debug build, _mcount would trash r3 and opal_exit_check
> would not restore it, leaving OPAL calls returning garbage.
>
> this fix simply preserves the return value and doesn't let
> the compiler get fancy on us. We effectively just get an
> extra `mr` instruction to restore r3.
>
> Fixes: 9c565ee6bca4b665d9d1120bfff5e88ee80615bc
> Reported-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
> Reported-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>
> Suggested-by: Nicholas Piggin <npiggin at gmail.com>
> Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
> ---
>  core/opal.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Merged to master as of 0562b64e55b0e0780064823155f45b1ddf0893a6
-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list