From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757430AbcEDHQ6 (ORCPT ); Wed, 4 May 2016 03:16:58 -0400 Received: from terminus.zytor.com ([198.137.202.10]:37438 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756702AbcEDHQ4 (ORCPT ); Wed, 4 May 2016 03:16:56 -0400 Date: Wed, 4 May 2016 00:15:36 -0700 From: tip-bot for Mike Travis Message-ID: Cc: brgerst@gmail.com, estabrook@sgi.com, tglx@linutronix.de, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, rja@sgi.com, travis@sgi.com, mingo@kernel.org, abanman@sgi.com, gfk@sgi.com, len.brown@intel.com, sivanich@sgi.com, luto@amacapital.net, peterz@infradead.org, dvlasenk@redhat.com, torvalds@linux-foundation.org, hpa@zytor.com, bp@alien8.de, nzimmer@sgi.com Reply-To: brgerst@gmail.com, estabrook@sgi.com, tglx@linutronix.de, travis@sgi.com, mingo@kernel.org, abanman@sgi.com, gfk@sgi.com, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, rja@sgi.com, hpa@zytor.com, len.brown@intel.com, sivanich@sgi.com, peterz@infradead.org, luto@amacapital.net, dvlasenk@redhat.com, torvalds@linux-foundation.org, bp@alien8.de, nzimmer@sgi.com In-Reply-To: <20160429215402.897143440@asylum.americas.sgi.com> References: <20160429215402.897143440@asylum.americas.sgi.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/platform] x86/platform/UV: Add UV Architecture Defines Git-Commit-ID: e0ee1c97c3b1cabc3651d7bcf39c1f54d736fd20 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: e0ee1c97c3b1cabc3651d7bcf39c1f54d736fd20 Gitweb: http://git.kernel.org/tip/e0ee1c97c3b1cabc3651d7bcf39c1f54d736fd20 Author: Mike Travis AuthorDate: Fri, 29 Apr 2016 16:54:04 -0500 Committer: Ingo Molnar CommitDate: Wed, 4 May 2016 08:48:47 +0200 x86/platform/UV: Add UV Architecture Defines Add defines to control which UV architectures are supported, and modify the 'if (is_uvX_*)' functions to return constant 0 for those not supported. This will help optimize code paths when support for specific UV arches is removed. Tested-by: John Estabrook Tested-by: Gary Kroening Tested-by: Nathan Zimmer Signed-off-by: Mike Travis Reviewed-by: Dimitri Sivanich Cc: Andrew Banman Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Len Brown Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Russ Anderson Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160429215402.897143440@asylum.americas.sgi.com Signed-off-by: Ingo Molnar --- arch/x86/include/asm/uv/uv_hub.h | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h index 38166ad..6660c09a 100644 --- a/arch/x86/include/asm/uv/uv_hub.h +++ b/arch/x86/include/asm/uv/uv_hub.h @@ -178,22 +178,43 @@ DECLARE_PER_CPU(struct uv_hub_info_s, __uv_hub_info); #define UV3_HUB_REVISION_BASE 5 #define UV4_HUB_REVISION_BASE 7 +#ifdef UV1_HUB_IS_SUPPORTED static inline int is_uv1_hub(void) { return uv_hub_info->hub_revision < UV2_HUB_REVISION_BASE; } +#else +static inline int is_uv1_hub(void) +{ + return 0; +} +#endif +#ifdef UV2_HUB_IS_SUPPORTED static inline int is_uv2_hub(void) { return ((uv_hub_info->hub_revision >= UV2_HUB_REVISION_BASE) && (uv_hub_info->hub_revision < UV3_HUB_REVISION_BASE)); } +#else +static inline int is_uv2_hub(void) +{ + return 0; +} +#endif +#ifdef UV3_HUB_IS_SUPPORTED static inline int is_uv3_hub(void) { return ((uv_hub_info->hub_revision >= UV3_HUB_REVISION_BASE) && (uv_hub_info->hub_revision < UV4_HUB_REVISION_BASE)); } +#else +static inline int is_uv3_hub(void) +{ + return 0; +} +#endif #ifdef UV4_HUB_IS_SUPPORTED static inline int is_uv4_hub(void) @@ -207,15 +228,20 @@ static inline int is_uv4_hub(void) } #endif -static inline int is_uv_hub(void) +static inline int is_uvx_hub(void) { - return uv_hub_info->hub_revision; + if (uv_hub_info->hub_revision >= UV2_HUB_REVISION_BASE) + return uv_hub_info->hub_revision; + + return 0; } -/* code common to uv2/3/4 only */ -static inline int is_uvx_hub(void) +static inline int is_uv_hub(void) { - return uv_hub_info->hub_revision >= UV2_HUB_REVISION_BASE; +#ifdef UV1_HUB_IS_SUPPORTED + return uv_hub_info->hub_revision; +#endif + return is_uvx_hub(); } union uvh_apicid {