[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250430053424.77438-1-jiayanli@google.com>
Date: Wed, 30 Apr 2025 05:34:24 +0000
From: Annie Li <jiayanli@...gle.com>
To: Borislav Petkov <bp@...en8.de>, Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>
Cc: Dave Hansen <dave.hansen@...ux.intel.com>, "H. Peter Anvin" <hpa@...or.com>,
Nikolay Borisov <nik.borisov@...e.com>, x86@...nel.org, linux-kernel@...r.kernel.org,
Annie Li <jiayanli@...gle.com>
Subject: [PATCH v2] x86/microcode/amd: fix the return value when microcode has
no update
In commit 6f059e634dcd("x86/microcode: Clarify the late load logic"), the
return value is UCODE_OK if the load is up-to-date in amd platform, which
leads to load_late_locked() returning -EBADFD.
Add UCODE_OK in switch case to avoid this error.
Fixes: 6f059e634dcd ("x86/microcode: Clarify the late load logic")
Signed-off-by: Annie Li <jiayanli@...gle.com>
---
Changelog since v1:
- Change the return value back to UCODE_OK and adding a switch case
about UCODE_OK.
arch/x86/kernel/cpu/microcode/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
index b3658d11e7b69..2309321cf6a19 100644
--- a/arch/x86/kernel/cpu/microcode/core.c
+++ b/arch/x86/kernel/cpu/microcode/core.c
@@ -686,6 +686,8 @@ static int load_late_locked(void)
return load_late_stop_cpus(true);
case UCODE_NFOUND:
return -ENOENT;
+ case UCODE_OK:
+ return 0;
default:
return -EBADFD;
}
--
2.49.0.901.g37484f566f-goog
Powered by blists - more mailing lists