diff options
author | Andreas Herrmann <[email protected]> | 2009-11-11 20:03:29 +0100 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2009-11-11 20:06:54 +0100 |
commit | 9f15226e75583547aaf542c6be4bdac1060dd425 (patch) | |
tree | aab312a545d423724195ee662362e72caab28241 /tools/perf/scripts/python/check-perf-trace.py | |
parent | 1a74357066369be91e6f4f431621a00b052df964 (diff) |
x86, ucode-amd: Ensure ucode update on suspend/resume after CPU off/online cycle
When switching a CPU offline/online and then doing
suspend/resume, ucode is not updated on this CPU.
This is due to the microcode_fini_cpu() call which frees uci->mc
when setting the CPU offline:
static void microcode_fini_cpu_amd(int cpu)
{
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
vfree(uci->mc);
uci->mc = NULL;
}
When the CPU is set online uci->mc is still NULL because no
ucode update is required.
Finally this prevents ucode update when resuming after suspend:
static enum ucode_state microcode_resume_cpu(int cpu)
{
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
if (!uci->mc)
return UCODE_NFOUND;
...
}
Fix is to check whether uci->mc is valid before
microcode_resume_cpu() is called.
Signed-off-by: Andreas Herrmann <[email protected]>
Cc: dimm <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions