[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ED52C51D9B87F54892CE544909A13C6C1FF9BCDC@IRSMSX101.ger.corp.intel.com>
Date: Fri, 23 Dec 2016 18:19:06 +0000
From: "Andrejczuk, Grzegorz" <grzegorz.andrejczuk@...el.com>
To: Thomas Gleixner <tglx@...utronix.de>
CC: "mingo@...hat.com" <mingo@...hat.com>,
"hpa@...or.com" <hpa@...or.com>, "x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Luc, Piotr" <Piotr.Luc@...el.com>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>
Subject: RE: [Patch v11 4/5] x86/cpufeature: enable RING3MWAIT for Knights
Landing
On Thursday, December 22, 2016 3:21 PM Thomas Gleixner wrote:
> Changing types to match is the proper solution to all problems? You cannot
> just change types to make the compiler happy. You have to check what type
> is expected for it in the places which consume it, including compat mode.
HWCAP is u32 on x86 architecture, HWCAP2 on other architectures is uint.
I think I will be consistent with architecture and use u32 and bit OR operator.
It should be handled same way as ELF_HWCAP in user space and in 32 bits.
Please let me know if you agree to this solution.
> What has the MSR to do with ELF_HWCAP2? ELF_HWCAP2 is a system global
> variable. The MSR is of course per hardware thread.
You are right - nothing. I can set HWCAP2 once for boot cpu.
To achieve that I need to distinguish boot cpu in probe_xeon_phi_r3mwait.
>From looking around the kernel code I suspect it can be done like below:
if (c == &boot_cpu_data)
ELF_HWCAP2 |= HWCAP2_RING3MWAIT;
If there's a better way, please let me know.
> CPU bringup is serialized, i.e. init_intel() cannot run concurrently on
> different CPUs.
Thank you for your explanation, time and effort.
Merry Christmas,
Grzegorz
Powered by blists - more mailing lists