summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2024-03-03 19:59:25 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2024-03-07 20:45:49 +0100
commit4895ab23a75cafc6c984f2f931c9e209838d8d3f (patch)
tree48c85e053d8dcda43c7d0c0095344f7754bcdb88
parentf60a5f2dd36a59a36e11b711ce950877e8dbed40 (diff)
downloadopenwrt-4895ab23a75cafc6c984f2f931c9e209838d8d3f.tar.gz
openwrt-4895ab23a75cafc6c984f2f931c9e209838d8d3f.tar.bz2
openwrt-4895ab23a75cafc6c984f2f931c9e209838d8d3f.zip
x86: Fix compile problem with kernel 5.10.211
Fix a compile problem in upstream kernel. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--target/linux/x86/patches-5.10/020-x86-Fix-compile-problem.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/target/linux/x86/patches-5.10/020-x86-Fix-compile-problem.patch b/target/linux/x86/patches-5.10/020-x86-Fix-compile-problem.patch
new file mode 100644
index 0000000000..ad33085f98
--- /dev/null
+++ b/target/linux/x86/patches-5.10/020-x86-Fix-compile-problem.patch
@@ -0,0 +1,40 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Sun, 3 Mar 2024 19:57:11 +0100
+Subject: x86: Fix compile problem
+
+This fixes the following compile problem:
+ CC arch/x86/kernel/paravirt.o
+arch/x86/kernel/paravirt.c: In function 'paravirt_patch_call':
+arch/x86/kernel/paravirt.c:65:9: error: implicit declaration of function '__text_gen_insn' [-Werror=implicit-function-declaration]
+ 65 | __text_gen_insn(insn_buff, CALL_INSN_OPCODE,
+ | ^~~~~~~~~~~~~~~
+arch/x86/kernel/paravirt.c:65:36: error: 'CALL_INSN_OPCODE' undeclared (first use in this function)
+ 65 | __text_gen_insn(insn_buff, CALL_INSN_OPCODE,
+ | ^~~~~~~~~~~~~~~~
+arch/x86/kernel/paravirt.c:65:36: note: each undeclared identifier is reported only once for each function it appears in
+arch/x86/kernel/paravirt.c:66:47: error: 'CALL_INSN_SIZE' undeclared (first use in this function)
+ 66 | (void *)addr, target, CALL_INSN_SIZE);
+ | ^~~~~~~~~~~~~~
+arch/x86/kernel/paravirt.c:68:1: error: control reaches end of non-void function [-Werror=return-type]
+ 68 | }
+ | ^
+cc1: some warnings being treated as errors
+make[7]: *** [scripts/Makefile.build:286: arch/x86/kernel/paravirt.o] Error 1
+
+Fixes: b253061d4b86 ("x86/ibt,paravirt: Use text_gen_insn() for paravirt_patch()")
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ arch/x86/kernel/paravirt.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/x86/kernel/paravirt.c
++++ b/arch/x86/kernel/paravirt.c
+@@ -14,6 +14,7 @@
+ #include <linux/highmem.h>
+ #include <linux/kprobes.h>
+ #include <linux/pgtable.h>
++#include <linux/static_call.h>
+
+ #include <asm/bug.h>
+ #include <asm/paravirt.h>