Blame 2481-remove-microcode-check-based-on-CONFIG_MICROCODE_.patch

1f5e24
From 61b9cd16e049434597e398be61a47e0112382c5b Mon Sep 17 00:00:00 2001
1f5e24
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
1f5e24
Date: Mon, 14 Aug 2023 12:28:11 +0200
1f5e24
Subject: [PATCH] fix(dracut.sh): remove microcode check based on
1f5e24
 CONFIG_MICROCODE_[AMD|INTEL]
1f5e24
1f5e24
`CONFIG_MICROCODE_AMD` and `CONFIG_MICROCODE_INTEL` are hidden since
1f5e24
https://lore.kernel.org/all/20230810160805.081212701@linutronix.de/, therefore
1f5e24
this check is wrong and early microcode is always disabled.
1f5e24
---
1f5e24
 dracut.sh | 11 ++++-------
1f5e24
 1 file changed, 4 insertions(+), 7 deletions(-)
1f5e24
1f5e24
diff --git a/dracut.sh b/dracut.sh
1f5e24
index d7bf4b071..b8174fe78 100755
1f5e24
--- a/dracut.sh
1f5e24
+++ b/dracut.sh
1f5e24
@@ -1564,23 +1564,20 @@ fi
1f5e24
 
1f5e24
 if [[ $early_microcode == yes ]]; then
1f5e24
     if [[ $hostonly ]]; then
1f5e24
-        if [[ $(get_cpu_vendor) == "AMD" ]]; then
1f5e24
-            check_kernel_config CONFIG_MICROCODE_AMD || unset early_microcode
1f5e24
-        elif [[ $(get_cpu_vendor) == "Intel" ]]; then
1f5e24
-            check_kernel_config CONFIG_MICROCODE_INTEL || unset early_microcode
1f5e24
+        if [[ $(get_cpu_vendor) == "AMD" || $(get_cpu_vendor) == "Intel" ]]; then
1f5e24
+            check_kernel_config CONFIG_MICROCODE || unset early_microcode
1f5e24
         else
1f5e24
             unset early_microcode
1f5e24
         fi
1f5e24
     else
1f5e24
-        ! check_kernel_config CONFIG_MICROCODE_AMD \
1f5e24
-            && ! check_kernel_config CONFIG_MICROCODE_INTEL \
1f5e24
+        ! check_kernel_config CONFIG_MICROCODE \
1f5e24
             && unset early_microcode
1f5e24
     fi
1f5e24
     # Do not complain on non-x86 architectures as it makes no sense
1f5e24
     case "${DRACUT_ARCH:-$(uname -m)}" in
1f5e24
         x86_64 | i?86)
1f5e24
             [[ $early_microcode != yes ]] \
1f5e24
-                && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE_[AMD|INTEL]!=y"
1f5e24
+                && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE!=y"
1f5e24
             ;;
1f5e24
         *) ;;
1f5e24
     esac