Re: [PATCH] x86 microcode: work_on_cpu and cleanup of the synchronization logic

From: Dmitry Adamushko
Date: Thu May 07 2009 - 04:09:02 EST


2009/5/7 Dmitry Adamushko <dmitry.adamushko@xxxxxxxxx>:
> Signed-off-by: Dmitry Adamushko <dmitry.adamushko@xxxxxxxxx>
> CC: Hugh Dickins <hugh@xxxxxxxxxxx>
> CC: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
> CC: Ingo Molnar <mingo@xxxxxxx>
> CC: Andreas Herrmann <andreas.herrmann3@xxxxxxx>
> CC: Peter Oruba <peter.oruba@xxxxxxx>
> CC: Arjan van de Ven <arjan@xxxxxxxxxxxxx>
>
> arch/x86/include/asm/microcode.h | 19 ++-
> arch/x86/kernel/microcode_amd.c | 58 +++-----
> arch/x86/kernel/microcode_core.c | 275 ++++++++++++++++++++++---------------
> arch/x86/kernel/microcode_intel.c | 92 +++++--------
> 4 files changed, 234 insertions(+), 210 deletions(-)
>
> (there are ~20 new comment lines)

My fault, I forgot to remove a minor debuging trick.
The previous patch should be accompanied by the following.

Andreas, any chance you could give it a try with AMD setups? TIA.


(non-white-space-damaged version is enclosed)

--- arch/x86/kernel/microcode_intel-orig.c 2009-05-07
09:57:00.000000000 +0200
+++ arch/x86/kernel/microcode_intel.c 2009-05-07 09:57:47.000000000 +0200
@@ -179,7 +179,7 @@ static inline int update_match_cpu(struc
static inline int
update_match_revision(struct microcode_header_intel *mc_header, int rev)
{
- return (mc_header->rev < rev) ? 0 : 1;
+ return (mc_header->rev <= rev) ? 0 : 1;
}

static int microcode_sanity_check(void *mc)



--
Best regards,
Dmitry Adamushko
--- arch/x86/kernel/microcode_intel-orig.c 2009-05-07 09:57:00.000000000 +0200
+++ arch/x86/kernel/microcode_intel.c 2009-05-07 09:57:47.000000000 +0200
@@ -179,7 +179,7 @@ static inline int update_match_cpu(struc
static inline int
update_match_revision(struct microcode_header_intel *mc_header, int rev)
{
- return (mc_header->rev < rev) ? 0 : 1;
+ return (mc_header->rev <= rev) ? 0 : 1;
}

static int microcode_sanity_check(void *mc)