All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Travis <travis@sgi.com>
To: Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	Dimitri Sivanich <sivanich@hpe.com>
Subject: [PATCH 3/8] x86/platform/UV: Add Support for UV4 Hubless systems
Date: Fri, 13 Jan 2017 09:21:13 -0600	[thread overview]
Message-ID: <20170113152111.507186916@asylum.americas.sgi.com> (raw)
In-Reply-To: 20170113152110.831599361@asylum.americas.sgi.com

[-- Attachment #1: uv4_add-hubless-support --]
[-- Type: text/plain, Size: 2955 bytes --]

Add recognition and support for UV4 hubless systems.

Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Dimitri Sivanich <sivanich@hpe.com>
Reviewed-by: Russ Anderson <rja@hpe.com>
---
 arch/x86/include/asm/uv/uv.h       |    2 ++
 arch/x86/kernel/apic/x2apic_uv_x.c |   33 +++++++++++++++++++++++++++++++--
 2 files changed, 33 insertions(+), 2 deletions(-)

--- linux.orig/arch/x86/include/asm/uv/uv.h
+++ linux/arch/x86/include/asm/uv/uv.h
@@ -10,6 +10,7 @@ struct mm_struct;
 
 extern enum uv_system_type get_uv_system_type(void);
 extern int is_uv_system(void);
+extern int is_uv_hubless(void);
 extern void uv_cpu_init(void);
 extern void uv_nmi_init(void);
 extern void uv_system_init(void);
@@ -23,6 +24,7 @@ extern const struct cpumask *uv_flush_tl
 
 static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; }
 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)	{ }
 static inline void uv_system_init(void)	{ }
 static inline const struct cpumask *
--- linux.orig/arch/x86/kernel/apic/x2apic_uv_x.c
+++ linux/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -44,6 +44,7 @@ DEFINE_PER_CPU(int, x2apic_extra_bits);
 #define PR_DEVEL(fmt, args...)	pr_devel("%s: " fmt, __func__, args)
 
 static enum uv_system_type uv_system_type;
+static bool uv_hubless_system;
 static u64 gru_start_paddr, gru_end_paddr;
 static u64 gru_dist_base, gru_first_node_paddr = -1LL, gru_last_node_paddr;
 static u64 gru_dist_lmask, gru_dist_umask;
@@ -222,8 +223,14 @@ static int __init uv_acpi_madt_oem_check
 	int pnodeid;
 	int uv_apic;
 
-	if (strncmp(oem_id, "SGI", 3) != 0)
+	if (strncmp(oem_id, "SGI", 3) != 0) {
+		if (strncmp(oem_id, "NSGI", 4) == 0) {
+			uv_hubless_system = true;
+			pr_info("UV: OEM IDs %s/%s, HUBLESS\n",
+				oem_id, oem_table_id);
+		}
 		return 0;
+	}
 
 	if (numa_off) {
 		pr_err("UV: NUMA is off, disabling UV support\n");
@@ -296,6 +303,12 @@ int is_uv_system(void)
 }
 EXPORT_SYMBOL_GPL(is_uv_system);
 
+int is_uv_hubless(void)
+{
+	return uv_hubless_system;
+}
+EXPORT_SYMBOL_GPL(is_uv_hubless);
+
 void **__uv_hub_info_list;
 EXPORT_SYMBOL_GPL(__uv_hub_info_list);
 
@@ -1365,7 +1378,7 @@ static void __init build_socket_tables(v
 	}
 }
 
-void __init uv_system_init(void)
+static void __init uv_system_init_hub(void)
 {
 	struct uv_hub_info_s hub_info = {0};
 	int bytes, cpu, nodeid;
@@ -1502,4 +1515,20 @@ void __init uv_system_init(void)
 		reboot_type = BOOT_ACPI;
 }
 
+/*
+ * There is a small amount of UV specific code needed to initialize a
+ * UV system that does not have a "UV HUB" (referred to as "hubless").
+ */
+void __init uv_system_init(void)
+{
+	if (likely(!is_uv_system() && !is_uv_hubless()))
+		return;
+
+	/* Far more common is a standard UV system (with a HUB) */
+	if (is_uv_system())
+		uv_system_init_hub();
+
+	/* Initialize UV hubless system here */
+}
+
 apic_driver(apic_x2apic_uv_x);

-- 

  parent reply	other threads:[~2017-01-13 15:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-13 15:21 [PATCH 0/8] x86/platform/UV: UV Update PatchSet 2 Mike Travis
2017-01-13 15:21 ` [PATCH 1/8] x86/platform/UV: Fix panic with missing UVsystab support Mike Travis
2017-01-14  9:57   ` [tip:x86/platform] " tip-bot for Mike Travis
2017-01-13 15:21 ` [PATCH 2/8] x86/platform/UV: Fix 2 socket config problem Mike Travis
2017-01-14  9:58   ` [tip:x86/platform] " tip-bot for Mike Travis
2017-01-13 15:21 ` Mike Travis [this message]
2017-01-13 15:21 ` [PATCH 4/8] x86/platform/UV: Add Support for UV4 Hubless NMIs Mike Travis
2017-01-14  7:52   ` Ingo Molnar
2017-01-14  8:26     ` [PATCH] x86/platform/UV: Clean up the UV APIC code Ingo Molnar
2017-01-14 13:11       ` Joe Perches
2017-02-01 10:09       ` [tip:x86/platform] " tip-bot for Ingo Molnar
2017-01-13 15:21 ` [PATCH 5/8] x86/platform/UV: Add basic CPU NMI health check Mike Travis
2017-01-13 15:21 ` [PATCH 6/8] x86/platform/UV: Verify NMI action is valid, default is standard Mike Travis
2017-01-13 15:21 ` [PATCH 7/8] x86/platform/UV: Initialize PCH GPP_D_0 NMI Pin to be NMI source Mike Travis
2017-01-13 15:21 ` [PATCH 8/8] x86/platform/UV: Insure uv_system_init is called when necessary 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=20170113152111.507186916@asylum.americas.sgi.com \
    --to=travis@sgi.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=sivanich@hpe.com \
    --cc=tglx@linutronix.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.