Re: [RESEND][PATCH v3 07/17] static_call: Add inline static call infrastructure

From: Borislav Petkov
Date: Thu Mar 26 2020 - 11:54:28 EST


On Tue, Mar 24, 2020 at 02:56:10PM +0100, Peter Zijlstra wrote:
> +#define DEFINE_STATIC_CALL(name, _func) \
> + DECLARE_STATIC_CALL(name, _func); \
> + struct static_call_key STATIC_CALL_NAME(name) = { \
> + .func = _func, \
> + .next = NULL, \
> + }; \
> + __ADDRESSABLE(STATIC_CALL_NAME(name)); \
> + ARCH_DEFINE_STATIC_CALL_TRAMP(name, _func)
> +
> +#define static_call(name) STATIC_CALL_TRAMP(name)
> +
> +#define EXPORT_STATIC_CALL(name) \
> + EXPORT_SYMBOL(STATIC_CALL_NAME(name)); \
> + EXPORT_SYMBOL(STATIC_CALL_TRAMP(name))

I think we want only the _GPL versions below - not those. As you said on
IRC, jump_label/static_branch is GPL only.

> +
> +#define EXPORT_STATIC_CALL_GPL(name) \
> + EXPORT_SYMBOL_GPL(STATIC_CALL_NAME(name)); \
> + EXPORT_SYMBOL_GPL(STATIC_CALL_TRAMP(name))

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette