based on patch from Dmitry Adamushko.
- add missing vfree()
- update debug printks
Signed-off-by: Ingo Molnar <mingo@elte.hu>
* Fix sigmatch() macro to handle old CPUs with pf == 0.
* Thanks to Stuart Swales for pointing out this bug.
*/
-
-/* #define DEBUG pr_debug */
#include <linux/capability.h>
#include <linux/kernel.h>
#include <linux/init.h>
if (!cpu_online(cpu))
return 0;
- pr_debug("microcode: CPU%d resumed\n", cpu);
+
/* only CPU 0 will apply ucode here */
microcode_update_cpu(0);
return 0;
unsigned int i = 0;
/*
- * dimm: do we need this? Why an update via /dev/... is different
+ * FIXME! dimm: do we need this? Why an update via /dev/... is different
* from the one via firmware?
*
* This is a tricky part. We might be called from a write operation
return NULL;
}
- /* Why not by means of get_totalsize(hdr)? */
+ /* FIXME! dimm: Why not by means of get_totalsize(hdr)? */
total_size = (unsigned long) (hdr[4] + (hdr[5] << 8));
printk(KERN_INFO "microcode: size %u, total_size %u\n",
mc_header = (struct microcode_header_amd *)mc;
if (get_matching_microcode(cpu, mc, new_rev)) {
+ if (new_mc)
+ vfree(new_mc);
new_rev = mc_header->patch_id;
new_mc = mc;
} else
* Fix sigmatch() macro to handle old CPUs with pf == 0.
* Thanks to Stuart Swales for pointing out this bug.
*/
-
-/* #define DEBUG */ /* pr_debug */
#include <linux/capability.h>
#include <linux/kernel.h>
#include <linux/init.h>
}
if (get_matching_microcode(&uci->cpu_sig, mc, new_rev)) {
+ if (new_mc)
+ vfree(new_mc);
new_rev = mc_header.rev;
new_mc = mc;
} else