]> git.baikalelectronics.ru Git - kernel.git/commit
indirect call wrappers: helpers to speed-up indirect calls of builtin
authorPaolo Abeni <pabeni@redhat.com>
Fri, 14 Dec 2018 10:51:57 +0000 (11:51 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 15 Dec 2018 21:23:02 +0000 (13:23 -0800)
commit53d786d36454793fdb710f2104bbb9024e4a9ad2
tree2769165645fb361731abd6c7c227b46f691cf9c7
parent3e34dce230287bdfd5d8121779867639b90e7c8e
indirect call wrappers: helpers to speed-up indirect calls of builtin

This header define a bunch of helpers that allow avoiding the
retpoline overhead when calling builtin functions via function pointers.
It boils down to explicitly comparing the function pointers to
known builtin functions and eventually invoke directly the latter.

The macros defined here implement the boilerplate for the above schema
and will be used by the next patches.

rfc -> v1:
 - use branch prediction hint, as suggested by Eric
v1  -> v2:
 - list explicitly the builtin function names in INDIRECT_CALL_*(),
   as suggested by Ed Cree

Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/indirect_call_wrapper.h [new file with mode: 0644]