From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933459AbbDJXH4 (ORCPT ); Fri, 10 Apr 2015 19:07:56 -0400 Received: from one.firstfloor.org ([193.170.194.197]:45800 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932870AbbDJXHw (ORCPT ); Fri, 10 Apr 2015 19:07:52 -0400 Date: Sat, 11 Apr 2015 01:07:51 +0200 From: Andi Kleen To: Borislav Petkov Cc: Andi Kleen , x86@kernel.org, luto@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH 6/8] x86: Enumerate kernel FSGS capability in AT_HWCAP2 Message-ID: <20150410230751.GB2366@two.firstfloor.org> References: <1428681033-1549-1-git-send-email-andi@firstfloor.org> <1428681033-1549-7-git-send-email-andi@firstfloor.org> <20150410221418.GD28317@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150410221418.GD28317@pd.tnic> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > +++ b/arch/x86/include/uapi/asm/hwcap.h > > @@ -0,0 +1,7 @@ > > +#ifndef _ASM_HWCAP_H > > +#define _ASM_HWCAP_H 1 > > + > > +#define HWCAP2_FSGSBASE (1 << 0) /* Kernel enabled RD/WR FS/GS BASE */ > > BIT() We cannot use BIT in uapi headers for obvious reasons. > > cpumask_var_t cpu_initialized_mask; > > cpumask_var_t cpu_callout_mask; > > @@ -958,8 +961,10 @@ static void identify_cpu(struct cpuinfo_x86 *c) > > numa_add_cpu(smp_processor_id()); > > #endif > > > > - if (cpu_has(c, X86_FEATURE_FSGSBASE)) > > + if (cpu_has(c, X86_FEATURE_FSGSBASE)) { > > static_cpu_has_safe() That checks the boot cpu? We want to check the current CPU. -Andi -- ak@linux.intel.com -- Speaking for myself only.