Updated patch

This commit is contained in:
Gerben Jan Dijkman 2024-01-04 17:14:41 +01:00
parent 26adc1de69
commit 5780c4f4d5

View File

@ -1,66 +1,36 @@
From 160cf276427bfc4dd8f223704b4d51964e337218 Mon Sep 17 00:00:00 2001 --- /usr/share/genkernel/gen_configkernel.sh~ 2023-11-09 12:04:47.223202185 +0100
Message-ID: <160cf276427bfc4dd8f223704b4d51964e337218.1702042004.git.michal.privoznik@gmail.com> +++ /usr/share/genkernel/gen_configkernel.sh 2023-11-09 12:22:48.924474193 +0100
From: Michal Privoznik <michal.privoznik@gmail.com> @@ -1021,18 +1021,21 @@
Date: Fri, 8 Dec 2023 14:16:50 +0100 done
Subject: [PATCH] gen_configkernel: Prepare for kernel-6.6
The microcode related config options were removed in [1] and
microcode loading is enabled when support for corresponding CPU
is enabled. Basically, this is equivalent to renaming options:
CONFIG_MICROCODE_AMD -> CONFIG_CPU_SUP_AMD
CONFIG_MICROCODE_INTEL -> CONFIG_CPU_SUP_INTEL
Reflect this change in gen_configkernel.sh.
Bug: https://bugs.gentoo.org/913659
1: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e6bcfdd75d53390a67f67237f4eafc77d9772056
Signed-off-by: Michal Privoznik <michal.privoznik@gmail.com>
---
gen_configkernel.sh | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/gen_configkernel.sh b/gen_configkernel.sh
index d074005..17f9eaf 100755
--- a/gen_configkernel.sh
+++ b/gen_configkernel.sh
@@ -991,11 +991,13 @@ config_kernel() {
[ ${KV_NUMERIC} -le 4003 ] && kconfigs_microcode+=( 'CONFIG_MICROCODE_EARLY' )
# Intel
- kconfigs_microcode_intel+=( 'CONFIG_MICROCODE_INTEL' )
+ [ ${KV_NUMERIC} -ge 6006 ] && kconfigs_microcode_intel+=( 'CONFIG_CPU_SUP_INTEL' )
+ [ ${KV_NUMERIC} -lt 6006 ] && kconfigs_microcode_intel+=( 'CONFIG_MICROCODE_INTEL' )
[ ${KV_NUMERIC} -le 4003 ] && kconfigs_microcode_intel+=( 'CONFIG_MICROCODE_INTEL_EARLY' )
# AMD
- kconfigs_microcode_amd=( 'CONFIG_MICROCODE_AMD' )
+ [ ${KV_NUMERIC} -ge 6006 ] && kconfigs_microcode_amd+=( 'CONFIG_CPU_SUP_AMD' )
+ [ ${KV_NUMERIC} -lt 6006 ] && kconfigs_microcode_amd+=( 'CONFIG_MICROCODE_AMD' )
[ ${KV_NUMERIC} -le 4003 ] && kconfigs_microcode_amd+=( 'CONFIG_MICROCODE_AMD_EARLY' )
[[ "${MICROCODE}" == all ]] && kconfigs_microcode+=( ${kconfigs_microcode_amd[@]} ${kconfigs_microcode_intel[@]} )
@@ -1016,14 +1018,16 @@ config_kernel() {
required_kernel_options+=( 'CONFIG_MICROCODE' ) required_kernel_options+=( 'CONFIG_MICROCODE' )
case "${MICROCODE}" in - case "${MICROCODE}" in
amd) - amd)
- required_kernel_options+=( 'CONFIG_MICROCODE_AMD' ) - required_kernel_options+=( 'CONFIG_MICROCODE_AMD' )
+ [ ${KV_NUMERIC} -ge 6006 ] && required_kernel_options+=( 'CONFIG_CPU_SUP_AMD' ) - ;;
+ [ ${KV_NUMERIC} -lt 6006 ] && required_kernel_options+=( 'CONFIG_MICROCODE_AMD' ) - intel)
;;
intel)
- required_kernel_options+=( 'CONFIG_MICROCODE_INTEL' ) - required_kernel_options+=( 'CONFIG_MICROCODE_INTEL' )
+ [ ${KV_NUMERIC} -ge 6006 ] && required_kernel_options+=( 'CONFIG_CPU_SUP_INTEL' ) - ;;
+ [ ${KV_NUMERIC} -lt 6006 ] && required_kernel_options+=( 'CONFIG_MICROCODE_INTEL' ) - all)
;;
all)
- required_kernel_options+=( 'CONFIG_MICROCODE_AMD' ) - required_kernel_options+=( 'CONFIG_MICROCODE_AMD' )
- required_kernel_options+=( 'CONFIG_MICROCODE_INTEL' ) - required_kernel_options+=( 'CONFIG_MICROCODE_INTEL' )
+ [ ${KV_NUMERIC} -ge 6006 ] && required_kernel_options+=( 'CONFIG_CPU_SUP_AMD' 'CONFIG_CPU_SUP_INTEL' ) - ;;
+ [ ${KV_NUMERIC} -lt 6006 ] && required_kernel_options+=( 'CONFIG_MICROCODE_AMD' 'CONFIG_MICROCODE_INTEL' ) - esac
;; + if [ ${KV_NUMERIC} -lt 6006 ]
esac + then
+ case "${MICROCODE}" in
+ amd)
+ required_kernel_options+=( 'CONFIG_MICROCODE_AMD' )
+ ;;
+ intel)
+ required_kernel_options+=( 'CONFIG_MICROCODE_INTEL' )
+ ;;
+ all)
+ required_kernel_options+=( 'CONFIG_MICROCODE_AMD' )
+ required_kernel_options+=( 'CONFIG_MICROCODE_INTEL' )
+ ;;
+ esac
+ fi
else else
-- print_info 1 "$(get_indent 1)>> Ignoring --microcode parameter; Architecture does not support microcode loading ..."
2.41.0 fi