linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Baoquan He <bhe@redhat.com>, Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Russ Anderson <rja@hpe.com>,
	Dimitri Sivanich <sivanich@hpe.com>,
	"travis@sgi.com" <travis@sgi.com>,
	Mike Travis <mike.travis@hpe.com>,
	Frank Ramsay <frank.ramsay@hpe.com>
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	[thread overview]
Message-ID: <1495281758-11320-2-git-send-email-bhe@redhat.com> (raw)
In-Reply-To: <1495281758-11320-1-git-send-email-bhe@redhat.com>

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 <bhe@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Cc: Russ Anderson <rja@hpe.com>
Cc: Dimitri Sivanich <sivanich@hpe.com>
Cc: "travis@sgi.com" <travis@sgi.com>
Cc: Mike Travis <mike.travis@hpe.com>
Cc: Frank Ramsay <frank.ramsay@hpe.com>
---
 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 <linux/efi.h>
+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

  reply	other threads:[~2017-05-20 12:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-20 12:02 [PATCH v2 0/2] x86/mm/KASLR: Do not adapt size of the direct mapping section for SGI UV system Baoquan He
2017-05-20 12:02 ` Baoquan He [this message]
2017-05-23 15:17   ` [PATCH v2 1/2] x86/UV: Introduce a helper function to check UV system at earlier stage Mike Travis
2017-05-20 12:02 ` [PATCH v2 2/2] x86/mm/KASLR: Do not adapt size of the direct mapping section for SGI UV system Baoquan He
2017-05-21 20:38   ` Thomas Garnier
2017-05-21 23:14     ` Baoquan He
2017-05-21 23:17       ` Baoquan He
     [not found]         ` <19a8e832-49db-cb68-bbfd-a5ba1cb8be1e@hpe.com>
2017-05-22 17:00           ` Thomas Garnier
2017-08-31  6:21   ` Baoquan He
2017-06-07  4:35 ` [PATCH v2 0/2] " Baoquan He

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=1495281758-11320-2-git-send-email-bhe@redhat.com \
    --to=bhe@redhat.com \
    --cc=frank.ramsay@hpe.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.travis@hpe.com \
    --cc=mingo@redhat.com \
    --cc=rja@hpe.com \
    --cc=sivanich@hpe.com \
    --cc=tglx@linutronix.de \
    --cc=travis@sgi.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;
as well as URLs for NNTP newsgroup(s).