It's possible the data file has multiple matching ucode, we needn't to
update multiple times, just keep searching the latest version, and
update once.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
long offset = 0;
int error = 0;
void *mc;
+ unsigned int matching_count = 0;
/* We should bind the task to the CPU */
BUG_ON(cpu != raw_smp_processor_id());
*/
if ( error == 1 )
{
- apply_microcode(cpu);
+ matching_count++;
error = 0;
}
xfree(mc);
if ( offset < 0 )
error = offset;
+ if ( !error && matching_count )
+ apply_microcode(cpu);
+
return error;
}