--- zzzz-none-000/linux-4.9.279/include/linux/module.h 2021-08-08 06:38:54.000000000 +0000 +++ puma7-atom-6591-750/linux-4.9.279/include/linux/module.h 2023-02-08 11:43:43.000000000 +0000 @@ -6,6 +6,10 @@ * Rewritten by Richard Henderson Dec 1996 * Rewritten again by Rusty Russell, 2002 */ +/* + * Includes Intel Corporation's changes/modifications dated: 2018. + * Changed/modified portions - Copyright (c) 2018, Intel Corporation. + */ #include #include #include @@ -23,6 +27,7 @@ #include #include +#include /* In stripped ARM and x86-64 modules, ~ is surprisingly rare. */ #define MODULE_SIG_STRING "~Module signature appended~\n" @@ -86,6 +91,14 @@ #define module_init(x) __initcall(x); /** + * static_notifier_module_init() - driver initialization entry point + * @x: function to be run if module is compiled as built-in. We setup + * static notifier and wait for some event. + Otherwise just run module_init() function in time of insmod + */ +#define static_notifier_module_init(s,f) STATIC_NOTIFIER_REGISTER(s,f) + +/** * module_exit() - driver exit entry point * @x: function to be run when driver is removed * @@ -137,6 +150,7 @@ { return exitfn; } \ void cleanup_module(void) __copy(exitfn) __attribute__((alias(#exitfn))); +#define static_notifier_module_init(s,f) module_init(f) #endif /* This means "can be init if no module support, otherwise module load