Re: [PATCH 12/15] x86/static_call: Add out-of-line static call implementation

2019-06-07 Thread Peter Zijlstra
On Fri, Jun 07, 2019 at 10:38:46AM +0200, Peter Zijlstra wrote: > On Fri, Jun 07, 2019 at 06:13:58AM +, Nadav Amit wrote: > > > On Jun 5, 2019, at 6:08 AM, Peter Zijlstra wrote: > > > > +void arch_static_call_transform(void *site, void *tramp, void *func) > > > +{ > > > + unsigned char opcode

Re: [PATCH 12/15] x86/static_call: Add out-of-line static call implementation

2019-06-07 Thread Peter Zijlstra
On Fri, Jun 07, 2019 at 06:13:58AM +, Nadav Amit wrote: > > On Jun 5, 2019, at 6:08 AM, Peter Zijlstra wrote: > > +void arch_static_call_transform(void *site, void *tramp, void *func) > > +{ > > + unsigned char opcodes[CALL_INSN_SIZE]; > > + unsigned char insn_opcode; > > + unsigned lon

Re: [PATCH 12/15] x86/static_call: Add out-of-line static call implementation

2019-06-07 Thread Steven Rostedt
On Fri, 7 Jun 2019 06:13:58 + Nadav Amit wrote: > > On Jun 5, 2019, at 6:08 AM, Peter Zijlstra wrote: > > > > From: Josh Poimboeuf > > > > Add the x86 out-of-line static call implementation. For each key, a > > permanent trampoline is created which is the destination for all static > > c

Re: [PATCH 12/15] x86/static_call: Add out-of-line static call implementation

2019-06-06 Thread Nadav Amit
> On Jun 5, 2019, at 6:08 AM, Peter Zijlstra wrote: > > From: Josh Poimboeuf > > Add the x86 out-of-line static call implementation. For each key, a > permanent trampoline is created which is the destination for all static > calls for the given key. The trampoline has a direct jump which gets

[PATCH 12/15] x86/static_call: Add out-of-line static call implementation

2019-06-05 Thread Peter Zijlstra
From: Josh Poimboeuf Add the x86 out-of-line static call implementation. For each key, a permanent trampoline is created which is the destination for all static calls for the given key. The trampoline has a direct jump which gets patched by static_call_update() when the destination function cha