From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754435AbdETMCt (ORCPT ); Sat, 20 May 2017 08:02:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60408 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751718AbdETMCr (ORCPT ); Sat, 20 May 2017 08:02:47 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9D61283F47 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=bhe@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 9D61283F47 From: Baoquan He To: linux-kernel@vger.kernel.org Cc: Baoquan He , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Russ Anderson , Dimitri Sivanich , "travis@sgi.com" , Mike Travis , Frank Ramsay Subject: [PATCH v2 1/2] x86/UV: Introduce a helper function to check UV system at earlier stage Date: Sat, 20 May 2017 20:02:37 +0800 Message-Id: <1495281758-11320-2-git-send-email-bhe@redhat.com> In-Reply-To: <1495281758-11320-1-git-send-email-bhe@redhat.com> References: <1495281758-11320-1-git-send-email-bhe@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Sat, 20 May 2017 12:02:46 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The SGI BIOS adds UVsystab, and only systems running SGI BIOS (and now HPE Hawks2) will have UVsystab. And UVsystab is detected in efi_init() which is at very early stage. So introduce a new helper function is_early_uv_system() for later usage. Signed-off-by: Baoquan He Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: Russ Anderson Cc: Dimitri Sivanich Cc: "travis@sgi.com" Cc: Mike Travis Cc: Frank Ramsay --- arch/x86/include/asm/uv/uv.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/include/asm/uv/uv.h b/arch/x86/include/asm/uv/uv.h index 6686820..159f698 100644 --- a/arch/x86/include/asm/uv/uv.h +++ b/arch/x86/include/asm/uv/uv.h @@ -19,6 +19,11 @@ extern const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask, unsigned long start, unsigned long end, unsigned int cpu); +#include +static inline int is_early_uv_system(void) +{ + return !((efi.uv_systab == EFI_INVALID_TABLE_ADDR) || !efi.uv_systab); +} #else /* X86_UV */ @@ -31,6 +36,7 @@ static inline const struct cpumask * uv_flush_tlb_others(const struct cpumask *cpumask, struct mm_struct *mm, unsigned long start, unsigned long end, unsigned int cpu) { return cpumask; } +static inline int is_early_uv_system(void) { return 0; } #endif /* X86_UV */ -- 2.5.5