From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759411AbcIMWkV (ORCPT ); Tue, 13 Sep 2016 18:40:21 -0400 Received: from mga14.intel.com ([192.55.52.115]:53334 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758095AbcIMWkU (ORCPT ); Tue, 13 Sep 2016 18:40:20 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,330,1470726000"; d="scan'208";a="1049863393" Subject: Re: [PATCH v2 07/33] x86/intel_rdt: Add support for Cache Allocation detection To: Fenghua Yu , Thomas Gleixner , "H. Peter Anvin" , Ingo Molnar , Tony Luck , Peter Zijlstra , Tejun Heo , Borislav Petkov , Stephane Eranian , Marcelo Tosatti , David Carrillo-Cisneros , Shaohua Li , Ravi V Shankar , Vikas Shivappa , Sai Prakhya References: <1473328647-33116-1-git-send-email-fenghua.yu@intel.com> <1473328647-33116-8-git-send-email-fenghua.yu@intel.com> Cc: linux-kernel , x86 From: Dave Hansen Message-ID: <57D88052.60404@intel.com> Date: Tue, 13 Sep 2016 15:40:18 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <1473328647-33116-8-git-send-email-fenghua.yu@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/08/2016 02:57 AM, Fenghua Yu wrote: > --- a/arch/x86/include/asm/disabled-features.h > +++ b/arch/x86/include/asm/disabled-features.h > @@ -57,6 +57,7 @@ > #define DISABLED_MASK15 0 > #define DISABLED_MASK16 (DISABLE_PKU|DISABLE_OSPKE) > #define DISABLED_MASK17 0 > -#define DISABLED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 18) > +#define DISABLED_MASK18 0 > +#define DISABLED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 19) Are you sure you don't want to add RDT to disabled-features.h? You have a config option for it, so it seems like you should also be able to optimize some of these checks away when the config option is off.