Re: [PATCH] powernv: Use _GLOBAL_TOC for opal wrappers

2014-10-22 Thread Benjamin Herrenschmidt
On Wed, 2014-10-22 at 16:31 +1100, Michael Ellerman wrote: On Wed, 2014-10-22 at 11:32 +0800, Jeremy Kerr wrote: Currently, we can't call opal wrappers from modules when using the LE ABIv2, which requires a TOC init. What happens if we try? Build failure or run time bug? Kaboom. This

Re: [PATCH] powernv: Use _GLOBAL_TOC for opal wrappers

2014-10-22 Thread Jeremy Kerr
Hi Michael, Currently, we can't call opal wrappers from modules when using the LE ABIv2, which requires a TOC init. What happens if we try? Build failure or run time bug? We'll get an arbitrary memory dereference (two, actually) in the opal wrappers, when we try to load the opal entry point

[PATCH] powernv: Use _GLOBAL_TOC for opal wrappers

2014-10-21 Thread Jeremy Kerr
Currently, we can't call opal wrappers from modules when using the LE ABIv2, which requires a TOC init. 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 j...@ozlabs.org ---

Re: [PATCH] powernv: Use _GLOBAL_TOC for opal wrappers

2014-10-21 Thread Michael Ellerman
On Wed, 2014-10-22 at 11:32 +0800, Jeremy Kerr wrote: Currently, we can't call opal wrappers from modules when using the LE ABIv2, which requires a TOC init. What happens if we try? Build failure or run time bug? This change uses the _GLOBAL_TOC() macro (rather than _GLOBAL) for the opal