linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Chen, Yu C" <yu.c.chen@intel.com>
To: "mingo@kernel.org" <mingo@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Zhang, Rui" <rui.zhang@intel.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"pavel@ucw.cz" <pavel@ucw.cz>, "x86@kernel.org" <x86@kernel.org>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"rjw@rjwysocki.net" <rjw@rjwysocki.net>,
	"mingo@redhat.com" <mingo@redhat.com>
Subject: Re: [PATCH] x86, suspend: Save/restore THERM_CONTROL register for suspend
Date: Mon, 17 Aug 2015 11:43:02 +0000	[thread overview]
Message-ID: <1439811991.15722.26.camel@localhost> (raw)
In-Reply-To: <20150817101115.GA27204@gmail.com>

Hi, Ingo, thanks for your review,
On Mon, 2015-08-17 at 12:11 +0200, Ingo Molnar wrote:
> So what your changelog fails to mention:
> 
>  - You only add this code to the 64-bit kernel. Are 32-bit kernels not affected?
Yes, 32-bit kernel should also do the save/restore operation. 
I'll adjust them to 64/32-bit common path. 
> 
>  - the MSR read is done unconditionally. Is MSR_IA32_THERM_CONTROL available
>    architecturally and readable (and has sensible values) on all 64-bit capable
>    x86 CPUs that run this code path?
MSR_IA32_THERM_CONTROL is available on Intel Pentium 4, Xeon, Pentium M and later
processors, so I think not all the 64/32-bit capable x86 CPUs have this
register. Maybe codes like the following would be more reasonable?

save:
ctxt->clock_modulation_saved = !rdmsrl_safe(MSR_IA32_THERM_CONTROL,
	&ctxt->clock_modulation);

restore:
if (ctxt->clock_modulation_saved)
	wrmsrl(MSR_IA32_THERM_CONTROL, ctxt->clock_modulation);

Thanks a lot.

Best Regards,
Yu

  reply	other threads:[~2015-08-17 11:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-17  8:29 [PATCH] x86, suspend: Save/restore THERM_CONTROL register for suspend Chen Yu
2015-08-17 10:11 ` Ingo Molnar
2015-08-17 11:43   ` Chen, Yu C [this message]
2015-08-17 13:27   ` Pavel Machek
2015-08-18  2:23     ` Yu Chen
2015-08-18  8:02       ` Pavel Machek
2015-08-18  8:54         ` Yu Chen
2015-08-18  2:02   ` Yu Chen

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=1439811991.15722.26.camel@localhost \
    --to=yu.c.chen@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).