Jiping Ma b6f8503866 mlnx-ofa_kernel:Fix the obsolete module init
Update module init call to use kernel provided macros, such
that they gain correct IBT attributes.

We encouter the following error during load the module mlx_compat
when IBT(Indirect Branch Tracking) feature is enabled for CPU and
CONFIG_X86_KERNEL_IBT is enable by the kernel config file.
"Missing ENDBR: __init_backport+0x0/0xff0 [mlx_compat]"

CONFIG_X86_KERNEL_IBT is enable by default after
https://git.yoctoproject.org/linux-yocto/commit/?id=4fd5f70ce14d
("x86/Kconfig: Enable kernel IBT by default") was introduced in
kernel v6.4.

Verification:
 * An ISO image can be built with this commit applied to a repo
   project of StarlingX's kernel 6.6.7 branch.
 * The ISO image can be installed to a R760 server without
   "Missing ENDBR: __init_backport+0x0/0xff0 [mlx_compat]" in dmesg log.
   The issue can be repduced in the lab without the fix.

Story: 2011056
Task: 50422

Change-Id: I02af6b0cd26c1d02e58f77388f67619a48e06de6
Reported-by: Guilherme Batista Leite <guilhermebatista.leite@windriver.com>
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
(cherry picked from commit e596012956bbf5c34d1d1d2d6029e6c420fa8d9e)
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
2024-07-19 01:33:48 +00:00
..