[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1439811991.15722.26.camel@localhost>
Date: Mon, 17 Aug 2015 11:43:02 +0000
From: "Chen, Yu C" <yu.c.chen@...el.com>
To: "mingo@...nel.org" <mingo@...nel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Zhang, Rui" <rui.zhang@...el.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
"pavel@....cz" <pavel@....cz>, "x86@...nel.org" <x86@...nel.org>,
"hpa@...or.com" <hpa@...or.com>,
"rjw@...ysocki.net" <rjw@...ysocki.net>,
"mingo@...hat.com" <mingo@...hat.com>
Subject: Re: [PATCH] x86, suspend: Save/restore THERM_CONTROL register for
suspend
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
Powered by blists - more mailing lists