File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # This patch is based on
2+ # https://opendev.org/starlingx/kernel/raw/commit/b6f8503866c3cae009d5b2e8e8db17149c917d9c/kernel-modules/mlnx-ofa_kernel/debian/patches/0003-Fix-the-obsolete-module-init.patch
3+ # modified to apply cleanly with no change in logic.
4+
5+ --- a/include/linux/compat-2.6.h
6+ +++ b/include/linux/compat-2.6.h
7+ @@ -31,9 +31,11 @@
8+ #define module_init(initfn) \
9+ static int __init __init_backport(void) \
10+ { \
11+ - mlx_backport_dependency_symbol(); \
12+ + mlx_backport_dependency_symbol(); \
13+ return initfn(); \
14+ } \
15+ - int init_module(void) __copy(initfn) __attribute__((alias("__init_backport")));
16+ + int init_module(void) __copy(initfn) \
17+ + __attribute__((alias("__init_backport"))); \
18+ + ___ADDRESSABLE(init_module, __initdata);
19+
20+ #endif /* LINUX_26_COMPAT_H */
Original file line number Diff line number Diff line change @@ -103,7 +103,9 @@ Release: 1%{?dist}
103103License: GPLv2
104104Url: http://www.mellanox.com/
105105Group: System Environment/Base
106- Source0: https://linux.mellanox.com/public/repo/mlnx_ofed/24.10-0.7.0.0/SRPMS/mlnx-ofa_kernel-24.10.tgz#/%{_name}-%{_version}.tgz
106+ Source0: https://linux.mellanox.com/public/repo/mlnx_ofed/24.10-0.7.0.0/SRPMS/mlnx-ofa_kernel-24.10.tgz#/%{_name}-%{_version}.tgz
107+ Patch0: 001-fix-module-init-for-ibt.patch
108+
107109BuildRoot: /var/tmp/%{name }-%{version }-build
108110Vendor: Microsoft Corporation
109111Distribution: Azure Linux
@@ -289,6 +291,7 @@ drivers against it.
289291
290292%prep
291293%setup -n %{_name }-%{_version }
294+ %patch 0 -p1
292295set -- *
293296mkdir source
294297mv " $@ " source/
You can’t perform that action at this time.
0 commit comments