mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Travis <mike.travis@hpe.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>
Cc: Hedi Berriche <hedi@sgi.com>,
	Russ Anderson <russ.anderson@hpe.com>,
	Dimitri Sivanich <dimitri.sivanich@hpe.com>,
	Borislav Petkov <bp@alien8.de>,
	Kate Stewart <kstewart@linuxfoundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Philippe Ombredanne <pombredanne@nexb.com>,
	Pavel Tatashin <pasha.tatashin@oracle.com>,
	Dave Hansen <dave.hansen@intel.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	Ram Pai <linuxram@us.ibm.com>, Juergen Gross <jgross@suse.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Andi Kleen <ak@linux.intel.com>, Petr Tesarik <ptesarik@suse.cz>,
	Sinan Kaya <okaya@codeaurora.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	Hedi Berriche <hedi.berriche@hpe.com>
Subject: [PATCH 1/2] x86/platform/uv: Add is_early_uv_system check
Date: Mon, 01 Oct 2018 20:22:05 -0500	[thread overview]
Message-ID: <20181002012204.453928259@stormcage.americas.sgi.com> (raw)
In-Reply-To: <20181002012204.297193336@stormcage.americas.sgi.com>

[-- Attachment #1: add_is_early_uv_system --]
[-- Type: text/plain, Size: 1386 bytes --]

Introduce is_early_uv_system() which uses efi.uv_systab to decide early
in the boot process whether we're on a UV system.

This is needed to skip other early setup/init code that might break UV
platform if done too early such as before necessary ACPI tables parsing
takes place.

Signed-off-by: Mike Travis <mike.travis@hpe.com>
Signed-off-by: Hedi Berriche <hedi.berriche@hpe.com>
Reviewed-by: Russ Anderson <rja@hpe.com>
Reviewed-by: Dimitri Sivanich <sivanich@hpe.com>
---
 arch/x86/include/asm/uv/uv.h |    6 ++++++
 1 file changed, 6 insertions(+)

--- linux.orig/arch/x86/include/asm/uv/uv.h
+++ linux/arch/x86/include/asm/uv/uv.h
@@ -10,8 +10,13 @@ struct cpumask;
 struct mm_struct;
 
 #ifdef CONFIG_X86_UV
+#include <linux/efi.h>
 
 extern enum uv_system_type get_uv_system_type(void);
+static inline int is_early_uv_system(void)
+{
+	return !((efi.uv_systab == EFI_INVALID_TABLE_ADDR) || !efi.uv_systab);
+}
 extern int is_uv_system(void);
 extern int is_uv_hubless(void);
 extern void uv_cpu_init(void);
@@ -23,6 +28,7 @@ extern const struct cpumask *uv_flush_tl
 #else	/* X86_UV */
 
 static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; }
+static inline int is_early_uv_system(void)	{ return 0; }
 static inline int is_uv_system(void)	{ return 0; }
 static inline int is_uv_hubless(void)	{ return 0; }
 static inline void uv_cpu_init(void)	{ }

-- 

  reply	other threads:[~2018-10-02  1:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-02  1:22 [PATCH 0/2] Fix community TSC ADJUST breakage causing TSC failure Mike Travis
2018-10-02  1:22 ` Mike Travis [this message]
2018-10-02  6:20   ` [PATCH 1/2] x86/platform/uv: Add is_early_uv_system check Thomas Gleixner
2018-10-02 14:20     ` Mike Travis
2018-10-02 14:23       ` Thomas Gleixner
2018-10-02  1:22 ` [PATCH 2/2] x86/tsc: Fix UV TSC initialization Mike Travis
2018-10-02  6:22   ` Thomas Gleixner
2018-10-02 14:21     ` Mike Travis
2018-10-02  6:24 ` [PATCH 0/2] Fix community TSC ADJUST breakage causing TSC failure Thomas Gleixner
2018-10-02 14:26   ` Travis, Mike
2018-10-02 14:28     ` Thomas Gleixner
2018-10-02 18:01 [PATCH 0/2] Fix " Mike Travis
2018-10-02 18:01 ` [PATCH 1/2] x86/platform/uv: Add is_early_uv_system check Mike Travis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181002012204.453928259@stormcage.americas.sgi.com \
    --to=mike.travis@hpe.com \
    --cc=ak@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=dimitri.sivanich@hpe.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hedi.berriche@hpe.com \
    --cc=hedi@sgi.com \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxram@us.ibm.com \
    --cc=mingo@redhat.com \
    --cc=okaya@codeaurora.org \
    --cc=pasha.tatashin@oracle.com \
    --cc=pombredanne@nexb.com \
    --cc=ptesarik@suse.cz \
    --cc=russ.anderson@hpe.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®