Thread (25 messages) 25 messages, 5 authors, 2022-10-06

Re: [PATCH v3 5/6] powerpc/64: Add support for out-of-line static calls

From: Benjamin Gray <hidden>
Date: 2022-10-06 05:03:11

On Thu, 2022-10-06 at 11:39 +1100, Michael Ellerman wrote:
Christophe Leroy [off-list ref] writes:
quoted
However, thinking out loudly, I'm wondering, could we make things
any 
simpler when CONFIG_MODULES is not selected, or is that a too much 
corner case on PPC64 ?
I'd say it's mostly a corner case.

Obviously no distros ship with modules disabled. 

AFAIK even the stripped down kernels we use in CPU bringup have
modules
enabled.

So I think it's probably not worth worrying about, unless there's an
obvious and fairly simple optimisation.

cheers
Yeah, I think supporting this case would amount to a whole new
trampoline implementation. Something like the original RFC
implementation would be best here as there would only be one TOC to
worry about.

Instead, I expect this can all be optimised better once we can apply
patches to call-sites. If so, we can patch the call-site NOPs ourselves
without marking the trampoline as caller-saved TOC, which would remove
the suboptimal save-r2 trampolines. Then we could use separate local &
global entry points like the RFC. This would unify the kernel/module
trampolines again.

The benefit of this series is that it works with just what the ABI
offers, without extra kernel tools / linker magic. But I would
definitely revisit it once call-site patching is possible, especially
when working on inline static calls.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help