From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: "Sven Köhler" <sven.koehler@gmail.com>
Cc: linux-kernel@vger.kernel.org, Borislav Petkov <bp@amd64.org>,
Linux PM mailing list <linux-pm@vger.kernel.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: microcode should perform update after suspend to disk
Date: Wed, 04 Jan 2012 11:37:43 +0530 [thread overview]
Message-ID: <4F03ECAF.4080207@linux.vnet.ibm.com> (raw)
In-Reply-To: <jdq23r$vni$1@dough.gmane.org>
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
next prev parent reply other threads:[~2012-01-04 6:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-01 16:37 microcode should perform update after suspend to disk Sven Köhler
2012-01-04 6:07 ` Srivatsa S. Bhat [this message]
2012-01-04 8:53 ` Sven Köhler
2012-01-04 8:57 ` Srivatsa S. Bhat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F03ECAF.4080207@linux.vnet.ibm.com \
--to=srivatsa.bhat@linux.vnet.ibm.com \
--cc=bp@amd64.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=sven.koehler@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox