kernel/kernel-rt/debian/deb_patches/0007-Update-patches-for-kernel-6.6.7.patch
Li Zhou 79e7b8794c kernel-rt: upgrade to 6.6.7
Update kernel source to 6.6.7 from linux-yocto upstream.
Update "debian" folder source to 6.1.27-1~bpo11+1 from debian upstream,
because kernel 6.6.7 is ported to our bullseye platform now and
the newest "debian" folder from debian upstream for bullseye platform
is for 6.1.

Add an optimization for the StarlingX debian kernel building framework:
We used to always maintain kernel with patches on "debian" folder
and they are put at kernel/kernel-std(rt)/debian/deb_patches dir.
Most of these patches are about "changelog" (debian/changelog) and
"config" (debian/config/amd64/none/config). The patches in "deb_patches"
dir increased rapidly.
Next We will put "changelog" and "config" at the dir
kernel/kernel-std(rt)/debian/source and use them to replace
debian/changelog and debian/config/amd64/none/config
after the upstream "debian" folder is extracted. This can not only
keep a clean "deb_patches" folder, but also avoid using a big patch to
remove the "changelog" file in the upstream "debian" folder before any
kernel build.

Below are changes about "deb_patches"/"patches" for kernel-rt:
(We use the patches' serial number in their name to represent them
becuase so many patches are involved here.)

(1)about "deb_patches" folder:

(1.1)Because of the optimization, all the patches about changelog
and config for 5.10 can be abandoned and they will be changed directly
in the files under "source" dir for 6.6.
Patches for 5.10 that are abandoned because they are about config:
0003/0005/0006/0007/0008/0010/0011/0016/0018/0022/0026/0028
Patches for 5.10 that are abandoned because they are about changelog:
0001/0002/0007/0013/0020/0023/0024/0025/0027/0029/0030/0032/0033/0034

The "changelog" and "config" under "source" dir for 6.6 are verified
to be aligned with those for 5.10 build.
CONFIG_FANOTIFY is enabled in "config" as a new request.

(1.2)Patch 0017 for 5.10 is abandoned because the new commit
<Use parallel XZ for source tar generation> is available in new
version "debian" folder, which does the same work.
Refer to: https://salsa.debian.org/kernel-team/linux/-/commit/
50b61a14e6dbc50b19dfe938c4679ecda50b83ee

(1.3)Below patches for 5.10 are ported to 6.6:
0004/0009/0015 (0009/0015 are merged into 0004) compose patch 0001
for 6.6;
0014 is ported to 0002 for 6.6;
0021 is ported to 0003 for 6.6;
0005/0019 (0005 is merged into 0019) compose patch 0004 for 6.6;
0012 is ported to 0005 for 6.6;
0031 is ported to 0006 for 6.6.

List the new patches for 6.6:
New patches 0001-0006 are ported from "deb_patches" for 5.10;
New patches 0007-0010 are added for building kernel 6.6.7 with
6.1.27-1~bpo11+1 "debian" folder.

(2)about "patches" folder:

(2.1)Patches for 5.10 that are abandoned because they are already in
6.6.7 include:
0017-0027/0031-0038/0041-0056/0058-0071/0073-0081/0083

(2.2)Patch 0011 for 5.10 is abandoned for new upstream commit
<scsi: smartpqi: Expose SAS address for SATA drives> in 6.6.
Refer to: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/commit/?id=00598b056aa6d46c7a6819efa850ec9d0d690d76
The new upstream commit has done what 0011 does.

(2.3)Patch 0039 for 5.10 is abandoned for new upstream commit
<samples/bpf: replace broken overhead microbenchmark with
fib_table_lookup> in 6.6.
Refer to: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/commit/?id=58e975d014e1e31bd1586be7d2be6d61bd3e3ada
0038 isn't needed any more with the new commit merged.

(2.4)Patch 0030 for 5.10 is abandoned because the related code has
been changed in 6.6 and the issue was verified to disappear.

(2.5)Patch 0010 for 5.10 is abandoned and the issue will be fixed by
setting /config/target/iscsi/cpus_allowed_list to be same with kernel
parameter "kthread_cpus". Because the new patch
<scsi: target: Add iscsi/cpus_allowed_list in configfs>
adds iscsi/cpus_allowed_list in configfs. The available CPU set of
iSCSI connection RX/TX threads is allowed_cpus & online_cpus.
This will do the same thing with patch 0010 so long as we set
cpus_allowed_list properly.
Refer to: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/commit/?id=d72d827f2f2636d8d72f0f3ebe5b661c9a24d343>
This issue will be addressed by later patches on stx framework part.

(2.6)Patch 0015-0016 are abandoned because the issue has been fixed
from the user space side by using the stable /dev/disk/by-path/...
symbolic links instead of names like /dev/sda that can change
(confirmed by M. Vefa Bicakci).

(2.7)Below patches for 5.10 are ported to 6.6:
0001-0009/0012/0028-0029/0040/0057/0082

(3)about kernel config:
(3.1) Enable CONFIG_GNSS for the ice driver.

Test plan:
 The out of tree kernel modules for 6.6 aren't ready by now.
 So many tests can't be done yet because the related test environments
 need those OOT drivers. Here list the tests which have been done with
 a test patch to remove the OOT drivers from the ISO temporarily.
 There are also 2 patches as workaround for solving 2 issues met when
 installing lab in jenkins job.
 PASS: Build linux/linux-rt OK.
 PASS: Build ISO OK.
 PASS: Install and boot up OK on a AIO-SX lab with std/rt kernel.
 PASS: The 12 hours cyclictest result for rt kernel is:
       samples:  259199998	avg:   1658	max:   5455
       99.9999th percentile: 3725	overflows: 0

Story: 2011000
Task: 49365

Signed-off-by: Li Zhou <li.zhou@windriver.com>
Change-Id: I6601fd2d7be4fc314ef2bc03b46f851eabebe3ea
(cherry picked from commit 06f53ed8e2a11676d4c8fca745c34dcaa3d889be)
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
2024-07-09 23:59:50 +00:00

106 lines
5.5 KiB
Diff

From fd48ecd28245f14bc1ccb3af2933a5c81db2464a Mon Sep 17 00:00:00 2001
From: Li Zhou <li.zhou@windriver.com>
Date: Fri, 22 Dec 2023 14:33:45 +0800
Subject: [PATCH 07/10] Update patches for kernel 6.6.7
Kernel 6.6.7 is ported to our bullseye platform now.
Need build kernel 6.6.7 with 6.1.27-bpo11 "debian" folder.
Update the patches involved in "debian" folder for context changes.
Signed-off-by: Li Zhou <li.zhou@windriver.com>
---
...ok-for-module.lds-under-arch-directory-too.patch | 6 +++---
...event-support-asciidoctor-for-documentatio.patch | 13 -------------
debian/patches/debian/version.patch | 2 +-
...-efi_secure_boot-flag-to-indicate-secure-b.patch | 2 +-
...own-the-kernel-if-booted-in-secure-boot-mo.patch | 2 +-
5 files changed, 6 insertions(+), 19 deletions(-)
diff --git a/debian/patches/debian/kbuild-look-for-module.lds-under-arch-directory-too.patch b/debian/patches/debian/kbuild-look-for-module.lds-under-arch-directory-too.patch
index f9a22d8..eea69e4 100644
--- a/debian/patches/debian/kbuild-look-for-module.lds-under-arch-directory-too.patch
+++ b/debian/patches/debian/kbuild-look-for-module.lds-under-arch-directory-too.patch
@@ -42,11 +42,11 @@ Index: linux/scripts/Makefile.modfinal
quiet_cmd_btf_ko = BTF [M] $@
@@ -57,7 +58,7 @@ if_changed_except = $(if $(call newer_pr
- printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd, @:)
+ printf '%s\n' 'savedcmd_$@ := $(make-cmd)' > $(dot-target).cmd, @:)
# Re-generate module BTFs if either module's .ko or vmlinux changed
--$(modules): %.ko: %.o %.mod.o scripts/module.lds $(and $(CONFIG_DEBUG_INFO_BTF_MODULES),$(KBUILD_BUILTIN),vmlinux) FORCE
-+$(modules): %.ko: %.o %.mod.o $(ARCH_MODULE_LDS) $(and $(CONFIG_DEBUG_INFO_BTF_MODULES),$(KBUILD_BUILTIN),vmlinux) FORCE
+-%.ko: %.o %.mod.o scripts/module.lds $(and $(CONFIG_DEBUG_INFO_BTF_MODULES),$(KBUILD_BUILTIN),vmlinux) FORCE
++%.ko: %.o %.mod.o $(ARCH_MODULE_LDS) $(and $(CONFIG_DEBUG_INFO_BTF_MODULES),$(KBUILD_BUILTIN),vmlinux) FORCE
+$(call if_changed_except,ld_ko_o,vmlinux)
ifdef CONFIG_DEBUG_INFO_BTF_MODULES
+$(if $(newer-prereqs),$(call cmd,btf_ko))
diff --git a/debian/patches/debian/perf-traceevent-support-asciidoctor-for-documentatio.patch b/debian/patches/debian/perf-traceevent-support-asciidoctor-for-documentatio.patch
index 89df33a..3971218 100644
--- a/debian/patches/debian/perf-traceevent-support-asciidoctor-for-documentatio.patch
+++ b/debian/patches/debian/perf-traceevent-support-asciidoctor-for-documentatio.patch
@@ -23,19 +23,6 @@ index 972754082a85..272d06173a3e 100644
ASCIIDOC_HTML = xhtml11
MANPAGE_XSL = manpage-normal.xsl
XMLTO_EXTRA =
-diff --git a/tools/lib/traceevent/Documentation/Makefile b/tools/lib/traceevent/Documentation/Makefile
-index aa72ab96c3c1..f3a4ff3b8b0e 100644
---- a/tools/lib/traceevent/Documentation/Makefile
-+++ b/tools/lib/traceevent/Documentation/Makefile
-@@ -28,7 +28,7 @@ mandir?=$(prefix)/share/man
- man3dir=$(mandir)/man3
-
- ASCIIDOC=asciidoc
--ASCIIDOC_EXTRA = --unsafe -f asciidoc.conf
-+ASCIIDOC_EXTRA =
- ASCIIDOC_HTML = xhtml11
- MANPAGE_XSL = manpage-normal.xsl
- XMLTO_EXTRA =
diff --git a/tools/perf/Documentation/Makefile b/tools/perf/Documentation/Makefile
index 6e54979c2124..7bfa6ae971ab 100644
--- a/tools/perf/Documentation/Makefile
diff --git a/debian/patches/debian/version.patch b/debian/patches/debian/version.patch
index 1425f55..47fc6c0 100644
--- a/debian/patches/debian/version.patch
+++ b/debian/patches/debian/version.patch
@@ -22,7 +22,7 @@ Index: linux/Makefile
@@ -1263,7 +1263,8 @@ PHONY += prepare archprepare
archprepare: outputmakefile archheaders archscripts scripts include/config/kernel.release \
- asm-generic $(version_h) $(autoksyms_h) include/generated/utsrelease.h \
+ asm-generic $(version_h) include/generated/utsrelease.h \
- include/generated/compile.h include/generated/autoconf.h remove-stale-files
+ include/generated/compile.h include/generated/autoconf.h \
+ include/generated/package.h remove-stale-files
diff --git a/debian/patches/features/all/lockdown/efi-add-an-efi_secure_boot-flag-to-indicate-secure-b.patch b/debian/patches/features/all/lockdown/efi-add-an-efi_secure_boot-flag-to-indicate-secure-b.patch
index b466987..6a8940d 100644
--- a/debian/patches/features/all/lockdown/efi-add-an-efi_secure_boot-flag-to-indicate-secure-b.patch
+++ b/debian/patches/features/all/lockdown/efi-add-an-efi_secure_boot-flag-to-indicate-secure-b.patch
@@ -138,7 +138,7 @@ cc: linux-efi@vger.kernel.org
extern int efi_status_to_err(efi_status_t status);
@@ -1107,13 +1117,6 @@ static inline bool efi_runtime_disabled(
- extern void efi_call_virt_check_flags(unsigned long flags, const char *call);
+ extern void efi_call_virt_check_flags(unsigned long flags, const void *caller);
extern unsigned long efi_call_virt_save_flags(void);
-enum efi_secureboot_mode {
diff --git a/debian/patches/features/all/lockdown/efi-lock-down-the-kernel-if-booted-in-secure-boot-mo.patch b/debian/patches/features/all/lockdown/efi-lock-down-the-kernel-if-booted-in-secure-boot-mo.patch
index 9ec4258..9687fa9 100644
--- a/debian/patches/features/all/lockdown/efi-lock-down-the-kernel-if-booted-in-secure-boot-mo.patch
+++ b/debian/patches/features/all/lockdown/efi-lock-down-the-kernel-if-booted-in-secure-boot-mo.patch
@@ -34,9 +34,9 @@ Index: debian-kernel/arch/x86/kernel/setup.c
+ efi_set_secure_boot(boot_params.secure_boot);
+
+ reserve_ibft_region();
dmi_setup();
- /*
@@ -1130,8 +1132,6 @@ void __init setup_arch(char **cmdline_p)
/* Allocate bigger log buffer */
setup_log_buf(1);
--
2.17.1