Re: [PATCH] powerpc/misc: fix exported functions that reference the TOC

2017-04-05 Thread Michael Ellerman
Michael Ellerman writes: > Oliver O'Halloran writes: > >> When the kernel is compiled to use 64bit ABIv2 the _GLOBAL() macro does not >> include a global entry point. A function's global entry point is used when >> the >> function is called from a different TOC context and in the kernel this >>

Re: [PATCH] powerpc/misc: fix exported functions that reference the TOC

2017-04-04 Thread Michael Ellerman
Benjamin Herrenschmidt writes: > On Mon, 2017-04-03 at 23:29 +1000, Michael Ellerman wrote: >> The other option would be just to make a rule that anything EXPORT'ed >> must use _GLOBAL_TOC(). > > Can we enforce that somewhat at build time ? Yeah I had a quick look at doing that last night but di

Re: [PATCH] powerpc/misc: fix exported functions that reference the TOC

2017-04-03 Thread Benjamin Herrenschmidt
On Mon, 2017-04-03 at 23:29 +1000, Michael Ellerman wrote: > The other option would be just to make a rule that anything EXPORT'ed > must use _GLOBAL_TOC(). Can we enforce that somewhat at build time ? Cheers, Ben.

Re: [PATCH] powerpc/misc: fix exported functions that reference the TOC

2017-04-03 Thread Michael Ellerman
Oliver O'Halloran writes: > When the kernel is compiled to use 64bit ABIv2 the _GLOBAL() macro does not > include a global entry point. A function's global entry point is used when the > function is called from a different TOC context and in the kernel this > typically means a call from a module

[PATCH] powerpc/misc: fix exported functions that reference the TOC

2017-04-02 Thread Oliver O'Halloran
When the kernel is compiled to use 64bit ABIv2 the _GLOBAL() macro does not include a global entry point. A function's global entry point is used when the function is called from a different TOC context and in the kernel this typically means a call from a module into the vmlinux (or vis-a-vis). Th