Skip to content

Commit

Permalink
powernv: Use _GLOBAL_TOC for opal wrappers
Browse files Browse the repository at this point in the history
Currently, we can't call opal wrappers from modules when using the LE
ABIv2, which requires a TOC init. If we do we'll try and load the opal
entry point using the wrong toc and probably explode or worse jump to
the wrong address.

Nothing in upstream is making opal calls from a module, but we do export
one of the wrappers so we should fix this anyway.

This change uses the _GLOBAL_TOC() macro (rather than _GLOBAL) for the
opal wrappers, so that we can do non-local calls to them.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Jeremy Kerr authored and Michael Ellerman committed Oct 23, 2014
1 parent fcbb539 commit 19d36c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/powernv/opal-wrappers.S
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ END_FTR_SECTION(0, 1); \
*/

#define OPAL_CALL(name, token) \
_GLOBAL(name); \
_GLOBAL_TOC(name); \
mflr r0; \
std r0,16(r1); \
li r0,token; \
Expand Down

0 comments on commit 19d36c2

Please sign in to comment.