linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* microcode should perform update after suspend to disk
@ 2012-01-01 16:37 Sven Köhler
  2012-01-04  6:07 ` Srivatsa S. Bhat
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Köhler @ 2012-01-01 16:37 UTC (permalink / raw)
  To: linux-kernel

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: microcode should perform update after suspend to disk
  2012-01-01 16:37 microcode should perform update after suspend to disk Sven Köhler
@ 2012-01-04  6:07 ` Srivatsa S. Bhat
  2012-01-04  8:53   ` Sven Köhler
  0 siblings, 1 reply; 4+ messages in thread
From: Srivatsa S. Bhat @ 2012-01-04  6:07 UTC (permalink / raw)
  To: Sven Köhler
  Cc: linux-kernel, Borislav Petkov, Linux PM mailing list, Rafael J. Wysocki

On 01/01/2012 10:07 PM, Sven Köhler wrote:

> 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.
> 
> 


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: microcode should perform update after suspend to disk
  2012-01-04  6:07 ` Srivatsa S. Bhat
@ 2012-01-04  8:53   ` Sven Köhler
  2012-01-04  8:57     ` Srivatsa S. Bhat
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Köhler @ 2012-01-04  8:53 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: linux-kernel, Borislav Petkov, Linux PM mailing list, Rafael J. Wysocki

Am 04.01.2012 07:07, schrieb Srivatsa S. Bhat:
> 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.

> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: microcode should perform update after suspend to disk
  2012-01-04  8:53   ` Sven Köhler
@ 2012-01-04  8:57     ` Srivatsa S. Bhat
  0 siblings, 0 replies; 4+ messages in thread
From: Srivatsa S. Bhat @ 2012-01-04  8:57 UTC (permalink / raw)
  To: Sven Köhler
  Cc: linux-kernel, Borislav Petkov, Linux PM mailing list, Rafael J. Wysocki

On 01/04/2012 02:23 PM, Sven Köhler wrote:

> Am 04.01.2012 07:07, schrieb Srivatsa S. Bhat:
>> 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.
> 
>> 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-04  8:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-01 16:37 microcode should perform update after suspend to disk Sven Köhler
2012-01-04  6:07 ` Srivatsa S. Bhat
2012-01-04  8:53   ` Sven Köhler
2012-01-04  8:57     ` Srivatsa S. Bhat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).