Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755165AbcLVLh6 convert rfc822-to-8bit (ORCPT ); Thu, 22 Dec 2016 06:37:58 -0500 Received: from mga06.intel.com ([134.134.136.31]:13485 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751783AbcLVLh5 (ORCPT ); Thu, 22 Dec 2016 06:37:57 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,388,1477983600"; d="scan'208";a="21613727" From: "Andrejczuk, Grzegorz" To: Thomas Gleixner CC: "mingo@redhat.com" , "hpa@zytor.com" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "Luc, Piotr" , "dave.hansen@linux.intel.com" Subject: RE: [Patch v11 4/5] x86/cpufeature: enable RING3MWAIT for Knights Landing Thread-Topic: [Patch v11 4/5] x86/cpufeature: enable RING3MWAIT for Knights Landing Thread-Index: AQHSWsfWby0ag3ZTSUq6LLYbMivcDaERKPyAgAGx5YCAANYpEIAAIBqAgAAELNA= Date: Thu, 22 Dec 2016 11:37:41 +0000 Message-ID: References: <1482241726-27310-5-git-send-email-grzegorz.andrejczuk@intel.com> <1482258687-4582-1-git-send-email-grzegorz.andrejczuk@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 787 Lines: 16 >It also warns on the 64bit build. It is, I missed it. I changed the type of elf_hwcap2 to long unsigned int. >> I used set_bit because I wanted to be sure that this operation to be >> done atomically. There might be data race when multiple values of >> ELF_HWCAP2 will be set by multiple threads. > > Touching ELF_HWCAP2 from anything else than the boot cpu is pointless anyway. This should be done once. MSR (0x140) is thread specific it has to be set for all physical threads. Also the kernel parameters are handled after boot cpu is initialized and this make disabling harder. > Aside of that CPU bringup and therefor the call to init_intel() is serialized by the cpu hotplug code and if we lift that, then ELF_HWCAP2 will be the least of our worries. I do not understand.