Skip to contentSkip to conversation

microcode should perform update after suspend to disk

DISCUSSION Sven Köhler 2 participants 4 messages Jan 1, 2012 – Jan 4, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

at startup I load the microcode module and it correctly loads the microcode from /lib/firmware/intel-ucode/. In dmesg, I can see that the microcode has been updated from 0xc to 0xd.
After suspend to ram, dmesg shows new messages from the microcode module, telling me that the microcode is still at revision 0xd. Hence, no update is performed.
However, after suspend to disk, dmesg shows no new messages from the microcode module. After rmmod microcode; modprobe microcode dmesg tells me that the microcode had to be updated from 0xc to 0xd.

Somethings wrong here. My interpretation of the messages in dmesg is, that microcode is trying to update the microcode after suspend to ram but not after suspend to disk. It should try in both cases. Note that I don't unload the microcode module.

Regards,
Sven

#1 lore raw
Quoted 12 lines · Sven Köhler

Hi,

at startup I load the microcode module and it correctly loads the microcode from /lib/firmware/intel-ucode/. In dmesg, I can see that the microcode has been updated from 0xc to 0xd.
After suspend to ram, dmesg shows new messages from the microcode module, telling me that the microcode is still at revision 0xd. Hence, no update is performed.
However, after suspend to disk, dmesg shows no new messages from the microcode module. After rmmod microcode; modprobe microcode dmesg tells me that the microcode had to be updated from 0xc to 0xd.

Quoted 6 lines

Somethings wrong here. My interpretation of the messages in dmesg is, that microcode is trying to update the microcode after suspend to ram but not after suspend to disk. It should try in both cases. Note that I don't unload the microcode module.

Which kernel version are you using?

As far as this part of the code is concerned, the path taken for both suspend-to-ram and suspend-to-disk are more or less the same.
On the resume path, both call enable_nonboot_cpus() which brings the nonboot cpus online, and due to the cpuhotplug notifications for these, we have a flow something like:

[The following functions are all in arch/x86/kernel/microcode_core.c]

mc_cpu_callback() //with action=CPU_ONLINE_FROZEN -> microcode_update_cpu()

     -> microcode_resume_cpu() //since uci->valid is true
        -> apply_microcode_on_target()

I tried doing suspend-to-ram and suspend-to-disk on latest kernel (3.2-rc7+) and I saw exactly the same messages getting emitted from the microcode module in both cases. Not sure what is going wrong in your case... Are you really sure that your hibernation script (pm-hibernate) does not unload the microcode module? You could look up the hooks installed in /usr/lib/pm-utils/sleep.d/ and also /var/log/pm-suspend.log

If you want to try out by-passing all those hooks and attempting a suspend-to-disk directly, do:

echo platform > /sys/power/disk //or shutdown, if platform doesn't exist echo none > /sys/power/pm_test
echo disk > /sys/power/state

Regards,
Srivatsa S. Bhat

#2 lore raw

Am 04.01.2012 07:07, schrieb Srivatsa S. Bhat:

Quoted 1 line

Which kernel version are you using?

I was using 3.1.4 or something. However, I updated to 3.1.7 lately. Sorry, I should have mentioned that.

Quoted 3 lines

I tried doing suspend-to-ram and suspend-to-disk on latest kernel (3.2-rc7+) and I saw exactly the same messages getting emitted from the microcode module in both cases. Not sure what is going wrong in your case...

I'm absolutely puzzled, cause I just tried to reproduce it again, and microcode was updated successfully during resume from suspend to disk. I apologize for the noise.

Regards,
Sven

#3 lore raw
Quoted 6 lines · Sven Köhler

Am 04.01.2012 07:07, schrieb Srivatsa S. Bhat:

Quoted 1 line

Which kernel version are you using?

I was using 3.1.4 or something. However, I updated to 3.1.7 lately. Sorry, I should have mentioned that.

Quoted 8 lines
Quoted 3 lines

I tried doing suspend-to-ram and suspend-to-disk on latest kernel (3.2-rc7+) and I saw exactly the same messages getting emitted from the microcode module in both cases. Not sure what is going wrong in your case...

I'm absolutely puzzled, cause I just tried to reproduce it again, and microcode was updated successfully during resume from suspend to disk. I apologize for the noise.

Good to hear that everything is fine :-)

Regards,
Srivatsa S. Bhat