Skip to contentSkip to conversation

x86/platform/uv: Updates for UV5

PATCH Superseded Mike Travis 3 participants 24 messages Sep 7, 2020 – Sep 8, 2020

Subsystems (5)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

cover x86/platform/uv: Updates for UV5

Subject: [PATCH 00/12] x86/platform/uv: Updates for UV5

Add changes needed for new UV5 UV architecture. Chief among the changes are 52 bits of physical memory address and 57 bits of virtual address space.

0001 Remove UV BAU TLB Shootdown Handler
- removes BAU TLB code being replaced by BAU APIC driver

0002 Remove SCIR built in driver
- removes System Controller (monitoring) code

0003 Update UV kernel modules
- update loadable UV kernel modules prior to a clash of symbols (is_uv) produced by auto-generated UV5 uv_mmrs.h file

0004 Update UV MMRs for UV5
- update uv_mmrs.h file and fix resultant compiler errors

0005 Add UV5 direct references
- add references to UV5 specific values

0006 Decode and Use Arch Type in UVsystab
- add UV ArchType field to UVsystab to remove dependency on OEM_ID

0007 Update MMIOH references
- display MMIOH mapping for each MMIOH region

0008 Adjust GAM MMR references
- update GAM mapping for MMR accesses

0009 Update UV GRU references
- update GRU mapping to include UV5

0010 Update Node Present Counting
- UV5 changes method of counting nodes present

0011 Update UV5 TSC Checking
- update TSC sync check of BIOS sync status

0012 Update for UV5 NMI MMR changes
- update NMI handler

#1 lore raw

PATCH 1/12 x86/platform/uv: Remove UV BAU TLB Shootdown Handler

The Broadcast Assist Unit (BAU) TLB shootdown handler is being rewritten to become the UV BAU APIC driver. It is designed to speed up sending IPI's to selective CPUs within the system. Remove the current TLB shutdown handler (tlb_uv.c) file and a couple of kernel hooks in the interim.

---
 arch/x86/include/asm/idtentry.h  |    4 
 arch/x86/include/asm/uv/uv.h     |    4 
 arch/x86/include/asm/uv/uv_bau.h |  755 --------------
 arch/x86/kernel/idt.c            |    3 
 arch/x86/mm/tlb.c                |   24 
 arch/x86/platform/uv/Makefile    |    2 
 arch/x86/platform/uv/tlb_uv.c    | 2097 ---------------------------------------
 7 files changed, 2 insertions(+), 2887 deletions(-)
arch/x86/include/asm/idtentry.h +0 -4
@@ -595,10 +595,6 @@ DECLARE_IDTENTRY_SYSVEC(CALL_FUNCTION_VE
 #endif
 
 #ifdef CONFIG_X86_LOCAL_APIC
-# ifdef CONFIG_X86_UV
-DECLARE_IDTENTRY_SYSVEC(UV_BAU_MESSAGE,			sysvec_uv_bau_message);
-# endif
-
 # ifdef CONFIG_X86_MCE_THRESHOLD
 DECLARE_IDTENTRY_SYSVEC(THRESHOLD_APIC_VECTOR,		sysvec_threshold);
 # endif
arch/x86/include/asm/uv/uv.h +1 -3
@@ -35,10 +35,8 @@ extern int is_uv_hubbed(int uvtype);
 extern void uv_cpu_init(void);
 extern void uv_nmi_init(void);
 extern void uv_system_init(void);
-extern const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
-						 const struct flush_tlb_info *info);
 
-#else	/* X86_UV */
+#else	/* !X86_UV */
 
 static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; }
 static inline bool is_early_uv_system(void)	{ return 0; }
arch/x86/include/asm/uv/uv_bau.h deleted +0 -755

755 lines not on this page · raw message

arch/x86/kernel/idt.c +0 -3
@@ -149,9 +149,6 @@ static const __initconst struct idt_data
 # ifdef CONFIG_IRQ_WORK
 	INTG(IRQ_WORK_VECTOR,			asm_sysvec_irq_work),
 # endif
-# ifdef CONFIG_X86_UV
-	INTG(UV_BAU_MESSAGE,			asm_sysvec_uv_bau_message),
-# endif
 	INTG(SPURIOUS_APIC_VECTOR,		asm_sysvec_spurious_apic_interrupt),
 	INTG(ERROR_APIC_VECTOR,			asm_sysvec_error_interrupt),
 #endif
arch/x86/mm/tlb.c +0 -24
@@ -14,7 +14,6 @@
 #include <asm/nospec-branch.h>
 #include <asm/cache.h>
 #include <asm/apic.h>
-#include <asm/uv/uv.h>
 
 #include "mm_internal.h"
 
@@ -809,29 +808,6 @@ STATIC_NOPV void native_flush_tlb_others
 		trace_tlb_flush(TLB_REMOTE_SEND_IPI,
 				(info->end - info->start) >> PAGE_SHIFT);
 
-	if (is_uv_system()) {
-		/*
-		 * This whole special case is confused.  UV has a "Broadcast
-		 * Assist Unit", which seems to be a fancy way to send IPIs.
-		 * Back when x86 used an explicit TLB flush IPI, UV was
-		 * optimized to use its own mechanism.  These days, x86 uses
-		 * smp_call_function_many(), but UV still uses a manual IPI,
-		 * and that IPI's action is out of date -- it does a manual
-		 * flush instead of calling flush_tlb_func_remote().  This
-		 * means that the percpu tlb_gen variables won't be updated
-		 * and we'll do pointless flushes on future context switches.
-		 *
-		 * Rather than hooking native_flush_tlb_others() here, I think
-		 * that UV should be updated so that smp_call_function_many(),
-		 * etc, are optimal on UV.
-		 */
-		cpumask = uv_flush_tlb_others(cpumask, info);
-		if (cpumask)
-			smp_call_function_many(cpumask, flush_tlb_func_remote,
-					       (void *)info, 1);
-		return;
-	}
-
 	/*
 	 * If no page tables were freed, we can skip sending IPIs to
 	 * CPUs in lazy TLB mode. They will flush the CPU themselves
arch/x86/platform/uv/Makefile +1 -1
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-obj-$(CONFIG_X86_UV)		+= tlb_uv.o bios_uv.o uv_irq.o uv_sysfs.o uv_time.o uv_nmi.o
+obj-$(CONFIG_X86_UV)		+= bios_uv.o uv_irq.o uv_sysfs.o uv_time.o uv_nmi.o
arch/x86/platform/uv/tlb_uv.c deleted +0 -2097

2,097 lines not on this page · raw message

#2 lore raw

PATCH 2/12 x86/platform/uv: Remove SCIR MMR references for UVY systems.

In reply to Mike Travis

UV class systems no longer use System Controller for monitoring of CPU activity provided by this driver. Other methods have been developed for BIOS and the management controller (BMC). This patch removes that supporting code.

---
 arch/x86/include/asm/uv/uv_hub.h   |   46 ++------------------
 arch/x86/kernel/apic/x2apic_uv_x.c |   85 -------------------------------------
 2 files changed, 7 insertions(+), 124 deletions(-)
arch/x86/include/asm/uv/uv_hub.h +5 -41
@@ -5,7 +5,8 @@
  *
  * SGI UV architectural definitions
  *
- * Copyright (C) 2007-2014 Silicon Graphics, Inc. All rights reserved.
+ * Copyright (C) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (C) 2007-2017 Silicon Graphics, Inc. All rights reserved.
  */
 
 #ifndef _ASM_X86_UV_UV_HUB_H
@@ -129,17 +130,6 @@
  */
 #define UV_MAX_NASID_VALUE	(UV_MAX_NUMALINK_BLADES * 2)
 
-/* System Controller Interface Reg info */
-struct uv_scir_s {
-	struct timer_list timer;
-	unsigned long	offset;
-	unsigned long	last;
-	unsigned long	idle_on;
-	unsigned long	idle_off;
-	unsigned char	state;
-	unsigned char	enabled;
-};
-
 /* GAM (globally addressed memory) range table */
 struct uv_gam_range_s {
 	u32	limit;		/* PA bits 56:26 (GAM_RANGE_SHFT) */
@@ -191,16 +181,13 @@ struct uv_hub_info_s {
 struct uv_cpu_info_s {
 	void			*p_uv_hub_info;
 	unsigned char		blade_cpu_id;
-	struct uv_scir_s	scir;
+	void			*reserved;
 };
 DECLARE_PER_CPU(struct uv_cpu_info_s, __uv_cpu_info);
 
 #define uv_cpu_info		this_cpu_ptr(&__uv_cpu_info)
 #define uv_cpu_info_per(cpu)	(&per_cpu(__uv_cpu_info, cpu))
 
-#define	uv_scir_info		(&uv_cpu_info->scir)
-#define	uv_cpu_scir_info(cpu)	(&uv_cpu_info_per(cpu)->scir)
-
 /* Node specific hub common info struct */
 extern void **__uv_hub_info_list;
 static inline struct uv_hub_info_s *uv_hub_info_list(int node)
@@ -297,9 +284,9 @@ union uvh_apicid {
 #define UV3_GLOBAL_MMR32_SIZE		(32UL * 1024 * 1024)
 
 #define UV4_LOCAL_MMR_BASE		0xfa000000UL
-#define UV4_GLOBAL_MMR32_BASE		0xfc000000UL
+#define UV4_GLOBAL_MMR32_BASE		0
 #define UV4_LOCAL_MMR_SIZE		(32UL * 1024 * 1024)
-#define UV4_GLOBAL_MMR32_SIZE		(16UL * 1024 * 1024)
+#define UV4_GLOBAL_MMR32_SIZE		0
 
 #define UV_LOCAL_MMR_BASE		(				\
 					is_uv2_hub() ? UV2_LOCAL_MMR_BASE : \
@@ -772,29 +759,6 @@ DECLARE_PER_CPU(struct uv_cpu_nmi_s, uv_
 #define	UV_NMI_STATE_DUMP		2
 #define	UV_NMI_STATE_DUMP_DONE		3
 
-/* Update SCIR state */
-static inline void uv_set_scir_bits(unsigned char value)
-{
-	if (uv_scir_info->state != value) {
-		uv_scir_info->state = value;
-		uv_write_local_mmr8(uv_scir_info->offset, value);
-	}
-}
-
-static inline unsigned long uv_scir_offset(int apicid)
-{
-	return SCIR_LOCAL_MMR_BASE | (apicid & 0x3f);
-}
-
-static inline void uv_set_cpu_scir_bits(int cpu, unsigned char value)
-{
-	if (uv_cpu_scir_info(cpu)->state != value) {
-		uv_write_global_mmr8(uv_cpu_to_pnode(cpu),
-				uv_cpu_scir_info(cpu)->offset, value);
-		uv_cpu_scir_info(cpu)->state = value;
-	}
-}
-
 /*
  * Get the minimum revision number of the hub chips within the partition.
  * (See UVx_HUB_REVISION_BASE above for specific values.)
arch/x86/kernel/apic/x2apic_uv_x.c +2 -83

109 lines not on this page · raw message

#3 lore raw

PATCH 3/12 x86/platform/uv: Adjust references in UV kernel modules

In reply to Mike Travis

There is a symbol clash from the auto-generated uv_mmrs.h file that clashes with code in the UV kernel modules (is_uv() is the symbol). Change those prior to the symbol clash so as to not cause a compile error.

---
 drivers/misc/sgi-xp/xp.h            |   11 ++++++-----
 drivers/misc/sgi-xp/xp_main.c       |    7 ++++---
 drivers/misc/sgi-xp/xp_uv.c         |    9 ++++++---
 drivers/misc/sgi-xp/xpc_main.c      |    9 +++++----
 drivers/misc/sgi-xp/xpc_partition.c |    5 +++--
 drivers/misc/sgi-xp/xpnet.c         |    5 +++--
 6 files changed, 27 insertions(+), 19 deletions(-)
drivers/misc/sgi-xp/xp.h +6 -5
@@ -3,7 +3,8 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 2004-2008 Silicon Graphics, Inc. All rights reserved.
+ * Copyright (c) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (c) 2008-2017 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
 /*
@@ -17,11 +18,11 @@
 
 #if defined CONFIG_X86_UV || defined CONFIG_IA64_SGI_UV
 #include <asm/uv/uv.h>
-#define is_uv()		is_uv_system()
+#define is_uv_sys()		is_uv_system()
 #endif
 
-#ifndef is_uv
-#define is_uv()		0
+#ifndef is_uv_sys
+#define is_uv_sys()		0
 #endif
 
 #ifdef USE_DBUG_ON
@@ -79,7 +80,7 @@
 
 #define XPC_MSG_SIZE(_payload_size) \
 				ALIGN(XPC_MSG_HDR_MAX_SIZE + (_payload_size), \
-				      is_uv() ? 64 : 128)
+				      is_uv_sys() ? 64 : 128)
 
 
 /*
drivers/misc/sgi-xp/xp_main.c +4 -3
@@ -3,7 +3,8 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (c) 2004-2008 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (c) 2008-2017 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
 /*
@@ -233,7 +234,7 @@ xp_init(void)
 	for (ch_number = 0; ch_number < XPC_MAX_NCHANNELS; ch_number++)
 		mutex_init(&xpc_registrations[ch_number].mutex);
 
-	if (is_uv())
+	if (is_uv_sys())
 		ret = xp_init_uv();
 	else
 		ret = 0;
@@ -249,7 +250,7 @@ module_init(xp_init);
 void __exit
 xp_exit(void)
 {
-	if (is_uv())
+	if (is_uv_sys())
 		xp_exit_uv();
 }
 
drivers/misc/sgi-xp/xp_uv.c +6 -3
@@ -3,7 +3,8 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (c) 2008 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (c) 2008-2017 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
 /*
@@ -148,7 +149,9 @@ xp_restrict_memprotect_uv(unsigned long
 enum xp_retval
 xp_init_uv(void)
 {
-	BUG_ON(!is_uv());
+	WARN_ON(!is_uv_sys());
+	if (!is_uv_sys())
+		return xpUnsupported;
 
 	xp_max_npartitions = XP_MAX_NPARTITIONS_UV;
 #ifdef CONFIG_X86
@@ -168,5 +171,5 @@ xp_init_uv(void)
 void
 xp_exit_uv(void)
 {
-	BUG_ON(!is_uv());
+	WARN_ON(!is_uv_sys());
 }
drivers/misc/sgi-xp/xpc_main.c +5 -4
@@ -3,7 +3,8 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (c) 2004-2009 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (c) 2008-2017 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
 /*
@@ -1043,7 +1044,7 @@ xpc_do_exit(enum xp_retval reason)
 
 	xpc_teardown_partitions();
 
-	if (is_uv())
+	if (is_uv_sys())
 		xpc_exit_uv();
 }
 
@@ -1226,7 +1227,7 @@ xpc_init(void)
 	dev_set_name(xpc_part, "part");
 	dev_set_name(xpc_chan, "chan");
 
-	if (is_uv()) {
+	if (is_uv_sys()) {
 		ret = xpc_init_uv();
 
 	} else {
@@ -1312,7 +1313,7 @@ out_2:
 
 	xpc_teardown_partitions();
 out_1:
-	if (is_uv())
+	if (is_uv_sys())
 		xpc_exit_uv();
 	return ret;
 }
drivers/misc/sgi-xp/xpc_partition.c +3 -2
@@ -3,7 +3,8 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (c) 2004-2008 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (c) 2008-2017 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
 /*
@@ -433,7 +434,7 @@ xpc_discovery(void)
 	 */
 	region_size = xp_region_size;
 
-	if (is_uv())
+	if (is_uv_sys())
 		max_regions = 256;
 	else {
 		max_regions = 64;
drivers/misc/sgi-xp/xpnet.c +3 -2
@@ -3,7 +3,8 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 1999-2009 Silicon Graphics, Inc. All rights reserved.
+ * Copyright (c) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (c) 2008-2017 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
 /*
@@ -515,7 +516,7 @@ xpnet_init(void)
 {
 	int result;
 
-	if (!is_uv())
+	if (!is_uv_sys())
 		return -ENODEV;
 
 	dev_info(xpnet, "registering network device %s\n", XPNET_DEVICE_NAME);
#5 lore raw

PATCH 4/12 x86/platform/uv: Update UV MMRs for UV5

In reply to Mike Travis

Update UV MMRs for UV5 based on Verilog output from the UV Hub H/W design. This is the next generation of UV architecture with a new class (UVY) being defined for 52 bit physical address masks. Use a bitmask for UV arch identification so a single test can cover multiple versions that have the same resulting value. This patch also repairs any damage caused by the updates so it will still compile cleanly. New UV5 functionality is added in the patches that follow.

---
 arch/x86/include/asm/uv/uv_mmrs.h |10049 +++++++++++++++++++++++---------------
 arch/x86/include/asm/uv/uv_mmrs.h |10047 +++++++++++++++++++++++---------------
 arch/x86/include/asm/uv/uv_mmrs.h |10065 +++++++++++++++++++++++---------------
 arch/x86/include/asm/uv/uv_mmrs.h |10087 +++++++++++++++++++++++---------------
 arch/x86/include/asm/uv/uv_mmrs.h |10114 +++++++++++++++++++++++---------------
 arch/x86/include/asm/uv/uv_mmrs.h |10114 +++++++++++++++++++++++---------------
 arch/x86/include/asm/uv/uv_mmrs.h |10143 ++++++++++++++++++++++++--------------
 arch/x86/include/asm/uv/uv_mmrs.h |10174 ++++++++++++++++++++++++--------------
 arch/x86/include/asm/uv/uv_mmrs.h |10004 ++++++++++++++++++++++++--------------
 arch/x86/include/asm/uv/uv_mmrs.h |10169 ++++++++++++++++++++++++--------------
 arch/x86/include/asm/uv/uv_mmrs.h |10169 ++++++++++++++++++++++++--------------
 arch/x86/include/asm/uv/uv_mmrs.h |10276 ++++++++++++++++++++++++--------------
 arch/x86/include/asm/uv/uv_mmrs.h |10272 ++++++++++++++++++++++++--------------
 arch/x86/include/asm/uv/uv_mmrs.h |10320 +++++++++++++++++++++++++-------------
 arch/x86/include/asm/uv/uv_mmrs.h |10320 +++++++++++++++++++++++++-------------
 arch/x86/include/asm/uv/uv_mmrs.h |10691 ++++++++++++++++++++++++++------------
 arch/x86/include/asm/uv/uv_mmrs.h |10691 ++++++++++++++++++++++++++------------
 arch/x86/include/asm/uv/uv_mmrs.h |10409 +++++++++++++++++++++++++-------------
 arch/x86/include/asm/uv/uv_hub.h   |   58 
 arch/x86/include/asm/uv/uv_mmrs.h  |11302 +++++++++++++++++++++++++------------
 arch/x86/include/asm/uv/uv_hub.h   |   61 
 arch/x86/include/asm/uv/uv_mmrs.h  | 7616 +++++++++++++++++++------------------
 arch/x86/kernel/apic/x2apic_uv_x.c |  260 -
 arch/x86/platform/uv/uv_time.c     |   11 
 drivers/misc/sgi-gru/grufile.c     |    5 
 5 files changed, 4266 insertions(+), 3687 deletions(-)
arch/x86/include/asm/uv/uv_hub.h +32 -29
@@ -145,6 +145,8 @@ struct uv_gam_range_s {
  * available in the L3 cache on the cpu socket for the node.
  */
 struct uv_hub_info_s {
+	unsigned int		hub_type;
+	unsigned char		hub_revision;
 	unsigned long		global_mmr_base;
 	unsigned long		global_mmr_shift;
 	unsigned long		gpa_mask;
@@ -157,7 +159,6 @@ struct uv_hub_info_s {
 	unsigned char		m_val;
 	unsigned char		n_val;
 	unsigned char		gr_table_len;
-	unsigned char		hub_revision;
 	unsigned char		apic_pnode_shift;
 	unsigned char		gpa_shift;
 	unsigned char		m_shift;
@@ -206,6 +207,17 @@ static inline struct uv_hub_info_s *uv_c
 	return (struct uv_hub_info_s *)uv_cpu_info_per(cpu)->p_uv_hub_info;
 }
 
+static inline int uv_hub_type(void)
+{
+	return uv_hub_info->hub_type;
+}
+
+static inline __init void uv_hub_type_set(int uvmask)
+{
+	uv_hub_info->hub_type = uvmask;
+}
+
+
 /*
  * HUB revision ranges for each UV HUB architecture.
  * This is a software convention - NOT the hardware revision numbers in
@@ -216,38 +228,29 @@ static inline struct uv_hub_info_s *uv_c
 #define UV4_HUB_REVISION_BASE		7
 #define UV4A_HUB_REVISION_BASE		8	/* UV4 (fixed) rev 2 */
 
-static inline int is_uv2_hub(void)
-{
-	return is_uv_hubbed(uv(2));
-}
-
-static inline int is_uv3_hub(void)
-{
-	return is_uv_hubbed(uv(3));
-}
+static inline int is_uv(int uvmask) { return uv_hub_type() & uvmask; }
+static inline int is_uv1_hub(void) { return 0; }
+static inline int is_uv2_hub(void) { return is_uv(UV2); }
+static inline int is_uv3_hub(void) { return is_uv(UV3); }
+static inline int is_uv4a_hub(void) { return is_uv(UV4A); }
+static inline int is_uv4_hub(void) { return is_uv(UV4); }
+static inline int is_uv5_hub(void) { return 0; }
 
-/* First test "is UV4A", then "is UV4" */
-static inline int is_uv4a_hub(void)
-{
-	if (is_uv_hubbed(uv(4)))
-		return (uv_hub_info->hub_revision == UV4A_HUB_REVISION_BASE);
-	return 0;
-}
+/*
+ * UV4A is a revision of UV4.  So on UV4A, both is_uv4_hub() and
+ * is_uv4a_hub() return true, While on UV4, only is_uv4_hub()
+ * returns true.  So to get true results, first test if is UV4A,
+ * then test if is UV4.
+ */
 
-static inline int is_uv4_hub(void)
-{
-	return is_uv_hubbed(uv(4));
-}
+/* UVX class: UV2,3,4 */
+static inline int is_uvx_hub(void) { return is_uv(UVX); }
 
-static inline int is_uvx_hub(void)
-{
-	return (is_uv_hubbed(-2) >= uv(2));
-}
+/* UVY class: UV5,..? */
+static inline int is_uvy_hub(void) { return 0; }
 
-static inline int is_uv_hub(void)
-{
-	return is_uvx_hub();
-}
+/* Any UV Hubbed System */
+static inline int is_uv_hub(void) { return is_uv(UV_ANY); }
 
 union uvh_apicid {
     unsigned long       v;
arch/x86/include/asm/uv/uv_mmrs.h +4072 -3544

2,911 lines not on this page · raw message

arch/x86/kernel/apic/x2apic_uv_x.c +154 -106

260 lines not on this page · raw message

arch/x86/platform/uv/uv_time.c +5 -6

Lines of this file are not shown. View the raw message.

drivers/misc/sgi-gru/grufile.c +3 -2

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

#11 lore raw

PATCH 5/12 x86/platform/uv: Add UV5 direct references

In reply to Mike Travis

Add new references to UV5 (and UVY class) system MMR addresses and fields primarily caused by the expansion from 46 to 52 bits of physical memory address.

---
 arch/x86/include/asm/uv/uv_hub.h   |   49 ++++++++++++------
 arch/x86/kernel/apic/x2apic_uv_x.c |  100 ++++++++++++++++++++++++++-----------
 2 files changed, 105 insertions(+), 44 deletions(-)
arch/x86/include/asm/uv/uv_hub.h +33 -16
@@ -161,6 +161,7 @@ struct uv_hub_info_s {
 	unsigned char		gr_table_len;
 	unsigned char		apic_pnode_shift;
 	unsigned char		gpa_shift;
+	unsigned char		nasid_shift;
 	unsigned char		m_shift;
 	unsigned char		n_lshift;
 	unsigned int		gnode_extra;
@@ -227,6 +228,7 @@ static inline __init void uv_hub_type_se
 #define UV3_HUB_REVISION_BASE		5
 #define UV4_HUB_REVISION_BASE		7
 #define UV4A_HUB_REVISION_BASE		8	/* UV4 (fixed) rev 2 */
+#define UV5_HUB_REVISION_BASE		9
 
 static inline int is_uv(int uvmask) { return uv_hub_type() & uvmask; }
 static inline int is_uv1_hub(void) { return 0; }
@@ -234,7 +236,7 @@ static inline int is_uv2_hub(void) { ret
 static inline int is_uv3_hub(void) { return is_uv(UV3); }
 static inline int is_uv4a_hub(void) { return is_uv(UV4A); }
 static inline int is_uv4_hub(void) { return is_uv(UV4); }
-static inline int is_uv5_hub(void) { return 0; }
+static inline int is_uv5_hub(void) { return is_uv(UV5); }
 
 /*
  * UV4A is a revision of UV4.  So on UV4A, both is_uv4_hub() and
@@ -247,7 +249,7 @@ static inline int is_uv5_hub(void) { ret
 static inline int is_uvx_hub(void) { return is_uv(UVX); }
 
 /* UVY class: UV5,..? */
-static inline int is_uvy_hub(void) { return 0; }
+static inline int is_uvy_hub(void) { return is_uv(UVY); }
 
 /* Any UV Hubbed System */
 static inline int is_uv_hub(void) { return is_uv(UV_ANY); }
@@ -272,9 +274,11 @@ union uvh_apicid {
  *		g -  GNODE (full 15-bit global nasid, right shifted 1)
  *		p -  PNODE (local part of nsids, right shifted 1)
  */
-#define UV_NASID_TO_PNODE(n)		(((n) >> 1) & uv_hub_info->pnode_mask)
+#define UV_NASID_TO_PNODE(n)		\
+		(((n) >> uv_hub_info->nasid_shift) & uv_hub_info->pnode_mask)
 #define UV_PNODE_TO_GNODE(p)		((p) |uv_hub_info->gnode_extra)
-#define UV_PNODE_TO_NASID(p)		(UV_PNODE_TO_GNODE(p) << 1)
+#define UV_PNODE_TO_NASID(p)		\
+		(UV_PNODE_TO_GNODE(p) << uv_hub_info->nasid_shift)
 
 #define UV2_LOCAL_MMR_BASE		0xfa000000UL
 #define UV2_GLOBAL_MMR32_BASE		0xfc000000UL
@@ -291,25 +295,38 @@ union uvh_apicid {
 #define UV4_LOCAL_MMR_SIZE		(32UL * 1024 * 1024)
 #define UV4_GLOBAL_MMR32_SIZE		0
 
+#define UV5_LOCAL_MMR_BASE		0xfa000000UL
+#define UV5_GLOBAL_MMR32_BASE		0
+#define UV5_LOCAL_MMR_SIZE		(32UL * 1024 * 1024)
+#define UV5_GLOBAL_MMR32_SIZE		0
+
 #define UV_LOCAL_MMR_BASE		(				\
-					is_uv2_hub() ? UV2_LOCAL_MMR_BASE : \
-					is_uv3_hub() ? UV3_LOCAL_MMR_BASE : \
-					/*is_uv4_hub*/ UV4_LOCAL_MMR_BASE)
+					is_uv(UV2) ? UV2_LOCAL_MMR_BASE : \
+					is_uv(UV3) ? UV3_LOCAL_MMR_BASE : \
+					is_uv(UV4) ? UV4_LOCAL_MMR_BASE : \
+					is_uv(UV5) ? UV5_LOCAL_MMR_BASE : \
+					0)
 
 #define UV_GLOBAL_MMR32_BASE		(				\
-					is_uv2_hub() ? UV2_GLOBAL_MMR32_BASE : \
-					is_uv3_hub() ? UV3_GLOBAL_MMR32_BASE : \
-					/*is_uv4_hub*/ UV4_GLOBAL_MMR32_BASE)
+					is_uv(UV2) ? UV2_GLOBAL_MMR32_BASE : \
+					is_uv(UV3) ? UV3_GLOBAL_MMR32_BASE : \
+					is_uv(UV4) ? UV4_GLOBAL_MMR32_BASE : \
+					is_uv(UV5) ? UV5_GLOBAL_MMR32_BASE : \
+					0)
 
 #define UV_LOCAL_MMR_SIZE		(				\
-					is_uv2_hub() ? UV2_LOCAL_MMR_SIZE : \
-					is_uv3_hub() ? UV3_LOCAL_MMR_SIZE : \
-					/*is_uv4_hub*/ UV4_LOCAL_MMR_SIZE)
+					is_uv(UV2) ? UV2_LOCAL_MMR_SIZE : \
+					is_uv(UV3) ? UV3_LOCAL_MMR_SIZE : \
+					is_uv(UV4) ? UV4_LOCAL_MMR_SIZE : \
+					is_uv(UV5) ? UV5_LOCAL_MMR_SIZE : \
+					0)
 
 #define UV_GLOBAL_MMR32_SIZE		(				\
-					is_uv2_hub() ? UV2_GLOBAL_MMR32_SIZE : \
-					is_uv3_hub() ? UV3_GLOBAL_MMR32_SIZE : \
-					/*is_uv4_hub*/ UV4_GLOBAL_MMR32_SIZE)
+					is_uv(UV2) ? UV2_GLOBAL_MMR32_SIZE : \
+					is_uv(UV3) ? UV3_GLOBAL_MMR32_SIZE : \
+					is_uv(UV4) ? UV4_GLOBAL_MMR32_SIZE : \
+					is_uv(UV5) ? UV5_GLOBAL_MMR32_SIZE : \
+					0)
 
 #define UV_GLOBAL_MMR64_BASE		(uv_hub_info->global_mmr_base)
 
arch/x86/kernel/apic/x2apic_uv_x.c +72 -28

193 lines not on this page · raw message

#12 lore raw

PATCH 6/12 x86/platform/uv: Add and Decode Arch Type in UVsystab

In reply to Mike Travis

A patch to add and process the UV Arch Type field in the UVsystab passed from UV BIOS to the kernel. This allows the system to be recognized without relying on the OEM_ID which OEMs want to change.

---
 arch/x86/include/asm/uv/bios.h     |   17 +++-
 arch/x86/kernel/apic/x2apic_uv_x.c |  135 +++++++++++++++++++++++++++++++------
 arch/x86/platform/uv/bios_uv.c     |   28 +++++--
 3 files changed, 150 insertions(+), 30 deletions(-)
arch/x86/include/asm/uv/bios.h +14 -3
@@ -5,8 +5,9 @@
 /*
  * UV BIOS layer definitions.
  *
- *  Copyright (c) 2008-2009 Silicon Graphics, Inc.  All Rights Reserved.
- *  Copyright (c) Russ Anderson <[email protected]>
+ * Copyright (C) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (C) 2007-2017 Silicon Graphics, Inc. All rights reserved.
+ * Copyright (c) Russ Anderson <[email protected]>
  */
 
 #include <linux/rtc.h>
@@ -71,6 +72,11 @@ struct uv_gam_range_entry {
 	u32	limit;		/* PA bits 56:26 (UV_GAM_RANGE_SHFT) */
 };
 
+#define	UV_AT_SIZE	8	/* 7 character arch type + NULL char */
+struct uv_arch_type_entry {
+	char	archtype[UV_AT_SIZE];
+};
+
 #define	UV_SYSTAB_SIG			"UVST"
 #define	UV_SYSTAB_VERSION_1		1	/* UV2/3 BIOS version */
 #define	UV_SYSTAB_VERSION_UV4		0x400	/* UV4 BIOS base version */
@@ -79,10 +85,14 @@ struct uv_gam_range_entry {
 #define	UV_SYSTAB_VERSION_UV4_3		0x403	/* - GAM Range PXM Value */
 #define	UV_SYSTAB_VERSION_UV4_LATEST	UV_SYSTAB_VERSION_UV4_3
 
+#define	UV_SYSTAB_VERSION_UV5		0x500	/* UV5 GAM base version */
+#define	UV_SYSTAB_VERSION_UV5_LATEST	UV_SYSTAB_VERSION_UV5
+
 #define	UV_SYSTAB_TYPE_UNUSED		0	/* End of table (offset == 0) */
 #define	UV_SYSTAB_TYPE_GAM_PARAMS	1	/* GAM PARAM conversions */
 #define	UV_SYSTAB_TYPE_GAM_RNG_TBL	2	/* GAM entry table */
-#define	UV_SYSTAB_TYPE_MAX		3
+#define	UV_SYSTAB_TYPE_ARCH_TYPE	3	/* UV arch type */
+#define	UV_SYSTAB_TYPE_MAX		4
 
 /*
  * The UV system table describes specific firmware
@@ -133,6 +143,7 @@ extern s64 uv_bios_reserved_page_pa(u64,
 extern int uv_bios_set_legacy_vga_target(bool decode, int domain, int bus);
 
 extern int uv_bios_init(void);
+extern unsigned long get_uv_systab_phys(bool msg);
 
 extern unsigned long sn_rtc_cycles_per_second;
 extern int uv_type;
arch/x86/kernel/apic/x2apic_uv_x.c +116 -19

215 lines not on this page · raw message

arch/x86/platform/uv/bios_uv.c +20 -8
@@ -2,8 +2,9 @@
 /*
  * BIOS run time interface routines.
  *
- *  Copyright (c) 2008-2009 Silicon Graphics, Inc.  All Rights Reserved.
- *  Copyright (c) Russ Anderson <[email protected]>
+ * Copyright (C) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (C) 2007-2017 Silicon Graphics, Inc. All rights reserved.
+ * Copyright (c) Russ Anderson <[email protected]>
  */
 
 #include <linux/efi.h>
@@ -169,16 +170,27 @@ int uv_bios_set_legacy_vga_target(bool d
 				(u64)decode, (u64)domain, (u64)bus, 0, 0);
 }
 
-int uv_bios_init(void)
+unsigned long get_uv_systab_phys(bool msg)
 {
-	uv_systab = NULL;
 	if ((uv_systab_phys == EFI_INVALID_TABLE_ADDR) ||
 	    !uv_systab_phys || efi_runtime_disabled()) {
-		pr_crit("UV: UVsystab: missing\n");
-		return -EEXIST;
+		if (msg)
+			pr_crit("UV: UVsystab: missing\n");
+		return 0;
 	}
+	return uv_systab_phys;
+}
+
+int uv_bios_init(void)
+{
+	unsigned long uv_systab_phys_addr;
+
+	uv_systab = NULL;
+	uv_systab_phys_addr = get_uv_systab_phys(1);
+	if (!uv_systab_phys_addr)
+		return -EEXIST;
 
-	uv_systab = ioremap(uv_systab_phys, sizeof(struct uv_systab));
+	uv_systab = ioremap(uv_systab_phys_addr, sizeof(struct uv_systab));
 	if (!uv_systab || strncmp(uv_systab->signature, UV_SYSTAB_SIG, 4)) {
 		pr_err("UV: UVsystab: bad signature!\n");
 		iounmap(uv_systab);
@@ -190,7 +202,7 @@ int uv_bios_init(void)
 		int size = uv_systab->size;
 
 		iounmap(uv_systab);
-		uv_systab = ioremap(uv_systab_phys, size);
+		uv_systab = ioremap(uv_systab_phys_addr, size);
 		if (!uv_systab) {
 			pr_err("UV: UVsystab: ioremap(%d) failed!\n", size);
 			return -EFAULT;
#13 lore raw

PATCH 7/12 x86/platform/uv: Update MMIOH references based on new UV5 MMRs.

In reply to Mike Travis

Make modifications to the MMIOH mappings to accommodate changes for UV5.

---
 arch/x86/kernel/apic/x2apic_uv_x.c |  213 +++++++++++++++++++++++++------------
 1 file changed, 144 insertions(+), 69 deletions(-)
arch/x86/kernel/apic/x2apic_uv_x.c +144 -69
@@ -229,6 +229,13 @@ static void __init uv_tsc_check_sync(voi
 		mark_tsc_unstable("UV BIOS");
 }
 
+/* Selector for (4|4A|5) structs */
+#define uvxy_field(sname, field, undef) (	\
+	is_uv(UV4A) ? sname.s4a.field :		\
+	is_uv(UV4) ? sname.s4.field :		\
+	is_uv(UV3) ? sname.s3.field :		\
+	undef)
+
 /* [Copied from arch/x86/kernel/cpu/topology.c:detect_extended_topology()] */
 
 #define SMT_LEVEL			0	/* Leaf 0xb SMT level */
@@ -883,6 +890,7 @@ static __init void get_lowmem_redirect(u
 }
 
 enum map_type {map_wb, map_uc};
+static const char * const mt[] = { "WB", "UC" };
 
 static __init void map_high(char *id, unsigned long base, int pshift, int bshift, int max_pnode, enum map_type map_type)
 {
@@ -894,11 +902,13 @@ static __init void map_high(char *id, un
 		pr_info("UV: Map %s_HI base address NULL\n", id);
 		return;
 	}
-	pr_debug("UV: Map %s_HI 0x%lx - 0x%lx\n", id, paddr, paddr + bytes);
 	if (map_type == map_uc)
 		init_extra_mapping_uc(paddr, bytes);
 	else
 		init_extra_mapping_wb(paddr, bytes);
+
+	pr_info("UV: Map %s_HI 0x%lx - 0x%lx %s (%d segments)\n",
+		id, paddr, paddr + bytes, mt[map_type], max_pnode + 1);
 }
 
 static __init void map_gru_high(int max_pnode)
@@ -932,52 +942,73 @@ static __init void map_mmr_high(int max_
 		pr_info("UV: MMR disabled\n");
 }
 
-/* UV3/4 have identical MMIOH overlay configs, UV4A is slightly different */
-static __init void map_mmioh_high_uv34(int index, int min_pnode, int max_pnode)
-{
-	unsigned long overlay;
-	unsigned long mmr;
-	unsigned long base;
-	unsigned long nasid_mask;
-	unsigned long m_overlay;
-	int i, n, shift, m_io, max_io;
-	int nasid, lnasid, fi, li;
-	char *id;
-
-	if (index == 0) {
-		id = "MMIOH0";
-		m_overlay = UVH_RH_GAM_MMIOH_OVERLAY_CONFIG0;
-		overlay = uv_read_local_mmr(m_overlay);
-		base = overlay & UV3H_RH_GAM_MMIOH_OVERLAY_CONFIG0_BASE_MASK;
+/* Arch specific ENUM cases */
+enum mmioh_arch {
+	UV2_MMIOH = -1,
+	UVY_MMIOH0, UVY_MMIOH1,
+	UVX_MMIOH0, UVX_MMIOH1,
+};
+
+/* Calculate and Map MMIOH Regions */
+void __init calc_mmioh_map(enum mmioh_arch index, int min_pnode, int max_pnode,
+	int shift, unsigned long base, int m_io, int n_io)
+{
+	unsigned long mmr, nasid_mask;
+	int nasid, min_nasid, max_nasid, lnasid, mapped;
+	int i, fi, li, n, max_io;
+	char id[8];
+
+	/* One (UV2) mapping */
+	if (index == UV2_MMIOH) {
+		strncpy(id, "MMIOH", sizeof(id));
+		max_io = max_pnode;
+		mapped = 0;
+		goto map_exit;
+	}
+
+	/* small and large MMIOH mappings */
+	switch (index) {
+	case UVY_MMIOH0:
+		mmr = UVH_RH10_GAM_MMIOH_REDIRECT_CONFIG0;
+		nasid_mask = UVH_RH10_GAM_MMIOH_OVERLAY_CONFIG0_BASE_MASK;
+		n = UVH_RH10_GAM_MMIOH_REDIRECT_CONFIG0_DEPTH;
+		min_nasid = min_pnode;
+		max_nasid = max_pnode;
+		mapped = 1;
+		break;
+	case UVY_MMIOH1:
+		mmr = UVH_RH10_GAM_MMIOH_REDIRECT_CONFIG1;
+		nasid_mask = UVH_RH10_GAM_MMIOH_OVERLAY_CONFIG1_BASE_MASK;
+		n = UVH_RH10_GAM_MMIOH_REDIRECT_CONFIG1_DEPTH;
+		min_nasid = min_pnode;
+		max_nasid = max_pnode;
+		mapped = 1;
+		break;
+	case UVX_MMIOH0:
 		mmr = UVH_RH_GAM_MMIOH_REDIRECT_CONFIG0;
-		m_io = (overlay & UV3H_RH_GAM_MMIOH_OVERLAY_CONFIG0_M_IO_MASK)
-			>> UV3H_RH_GAM_MMIOH_OVERLAY_CONFIG0_M_IO_SHFT;
-		shift = UV3H_RH_GAM_MMIOH_OVERLAY_CONFIG0_M_IO_SHFT;
+		nasid_mask = UVH_RH_GAM_MMIOH_OVERLAY_CONFIG0_BASE_MASK;
 		n = UVH_RH_GAM_MMIOH_REDIRECT_CONFIG0_DEPTH;
-		nasid_mask = UV3H_RH_GAM_MMIOH_REDIRECT_CONFIG0_NASID_MASK;
-	} else {
-		id = "MMIOH1";
-		m_overlay = UVH_RH_GAM_MMIOH_OVERLAY_CONFIG1;
-		overlay = uv_read_local_mmr(m_overlay);
-		base = overlay & UV3H_RH_GAM_MMIOH_OVERLAY_CONFIG1_BASE_MASK;
+		min_nasid = min_pnode * 2;
+		max_nasid = max_pnode * 2;
+		mapped = 1;
+		break;
+	case UVX_MMIOH1:
 		mmr = UVH_RH_GAM_MMIOH_REDIRECT_CONFIG1;
-		m_io = (overlay & UV3H_RH_GAM_MMIOH_OVERLAY_CONFIG1_M_IO_MASK)
-			>> UV3H_RH_GAM_MMIOH_OVERLAY_CONFIG1_M_IO_SHFT;
-		shift = UV3H_RH_GAM_MMIOH_OVERLAY_CONFIG1_M_IO_SHFT;
+		nasid_mask = UVH_RH_GAM_MMIOH_OVERLAY_CONFIG1_BASE_MASK;
 		n = UVH_RH_GAM_MMIOH_REDIRECT_CONFIG1_DEPTH;
-		nasid_mask = UV3H_RH_GAM_MMIOH_REDIRECT_CONFIG1_NASID_MASK;
-	}
-	pr_info("UV: %s overlay 0x%lx base:0x%lx m_io:%d\n", id, overlay, base, m_io);
-	if (!(overlay & UV3H_RH_GAM_MMIOH_OVERLAY_CONFIG0_ENABLE_MASK)) {
-		pr_info("UV: %s disabled\n", id);
+		min_nasid = min_pnode * 2;
+		max_nasid = max_pnode * 2;
+		mapped = 1;
+		break;
+	default:
+		pr_err("UV:%s:Invalid mapping type:%d\n", __func__, index);
 		return;
 	}
 
-	/* Convert to NASID: */
-	min_pnode *= 2;
-	max_pnode *= 2;
-	max_io = lnasid = fi = li = -1;
+	/* enum values chosen so (index mod 2) is MMIOH 0/1 (low/high) */
+	snprintf(id, sizeof(id), "MMIOH%d", index%2);
 
+	max_io = lnasid = fi = li = -1;
 	for (i = 0; i < n; i++) {
 		unsigned long m_redirect = mmr + i * 8;
 		unsigned long redirect = uv_read_local_mmr(m_redirect);
@@ -987,9 +1018,12 @@ static __init void map_mmioh_high_uv34(i
 			pr_info("UV: %s redirect base 0x%lx(@0x%lx) 0x%04x\n",
 				id, redirect, m_redirect, nasid);
 
-		/* Invalid NASID: */
-		if (nasid < min_pnode || max_pnode < nasid)
+		/* Invalid NASID check */
+		if (nasid < min_nasid || max_nasid < nasid) {
+			pr_err("UV:%s:Invalid NASID:%x (range:%x..%x)\n",
+				__func__, index, min_nasid, max_nasid );
 			nasid = -1;
+		}
 
 		if (nasid == lnasid) {
 			li = i;
@@ -1012,7 +1046,8 @@ static __init void map_mmioh_high_uv34(i
 			}
 			addr1 = (base << shift) + f * (1ULL << m_io);
 			addr2 = (base << shift) + (l + 1) * (1ULL << m_io);
-			pr_info("UV: %s[%03d..%03d] NASID 0x%04x ADDR 0x%016lx - 0x%016lx\n", id, fi, li, lnasid, addr1, addr2);
+			pr_info("UV: %s[%03d..%03d] NASID 0x%04x ADDR 0x%016lx - 0x%016lx\n",
+				id, fi, li, lnasid, addr1, addr2);
 			if (max_io < l)
 				max_io = l;
 		}
@@ -1020,43 +1055,83 @@ static __init void map_mmioh_high_uv34(i
 		lnasid = nasid;
 	}
 
-	pr_info("UV: %s base:0x%lx shift:%d M_IO:%d MAX_IO:%d\n", id, base, shift, m_io, max_io);
+map_exit:
+	pr_info("UV: %s base:0x%lx shift:%d m_io:%d max_io:%d max_pnode:0x%x\n",
+		id, base, shift, m_io, max_io, max_pnode);
 
-	if (max_io >= 0)
+	if (max_io >= 0 && !mapped)
 		map_high(id, base, shift, m_io, max_io, map_uc);
 }
 
 static __init void map_mmioh_high(int min_pnode, int max_pnode)
 {
-	union uvh_rh_gam_mmioh_overlay_config_u mmioh;
-	unsigned long mmr, base;
-	int shift, enable, m_io, n_io;
-
-	if (is_uv3_hub() || is_uv4_hub()) {
-		/* Map both MMIOH regions: */
-		map_mmioh_high_uv34(0, min_pnode, max_pnode);
-		map_mmioh_high_uv34(1, min_pnode, max_pnode);
+	/* UVY flavor */
+	if (UVH_RH10_GAM_MMIOH_OVERLAY_CONFIG0) {
+		union uvh_rh10_gam_mmioh_overlay_config0_u mmioh0;
+		union uvh_rh10_gam_mmioh_overlay_config1_u mmioh1;
+
+		mmioh0.v = uv_read_local_mmr(UVH_RH10_GAM_MMIOH_OVERLAY_CONFIG0);
+		if (unlikely(mmioh0.s.enable == 0))
+			pr_info("UV: MMIOH0 disabled\n");
+		else
+			calc_mmioh_map(UVY_MMIOH0, min_pnode, max_pnode,
+				UVH_RH10_GAM_MMIOH_OVERLAY_CONFIG0_BASE_SHFT,
+				mmioh0.s.base, mmioh0.s.m_io, mmioh0.s.n_io);
+
+		mmioh1.v = uv_read_local_mmr(UVH_RH10_GAM_MMIOH_OVERLAY_CONFIG1);
+		if (unlikely(mmioh1.s.enable == 0))
+			pr_info("UV: MMIOH1 disabled\n");
+		else
+			calc_mmioh_map(UVY_MMIOH1, min_pnode, max_pnode,
+				UVH_RH10_GAM_MMIOH_OVERLAY_CONFIG1_BASE_SHFT,
+				mmioh1.s.base, mmioh1.s.m_io, mmioh1.s.n_io);
 		return;
 	}
+	/* UVX flavor */
+	if (UVH_RH_GAM_MMIOH_OVERLAY_CONFIG0) {
+		union uvh_rh_gam_mmioh_overlay_config0_u mmioh0;
+		union uvh_rh_gam_mmioh_overlay_config1_u mmioh1;
+
+		mmioh0.v = uv_read_local_mmr(UVH_RH_GAM_MMIOH_OVERLAY_CONFIG0);
+		if (unlikely(mmioh0.s.enable == 0))
+			pr_info("UV: MMIOH0 disabled\n");
+		else {
+			unsigned long base = uvxy_field(mmioh0, base, 0);
+			int m_io = uvxy_field(mmioh0, m_io, 0);
+			int n_io = uvxy_field(mmioh0, n_io, 0);
+
+			calc_mmioh_map(UVX_MMIOH0, min_pnode, max_pnode,
+				UVH_RH_GAM_MMIOH_OVERLAY_CONFIG0_BASE_SHFT,
+				base, m_io, n_io);
+		}
+
+		mmioh1.v = uv_read_local_mmr(UVH_RH_GAM_MMIOH_OVERLAY_CONFIG1);
+		if (unlikely(mmioh1.s.enable == 0))
+			pr_info("UV: MMIOH1 disabled\n");
+		else {
+			unsigned long base = uvxy_field(mmioh1, base, 0);
+			int m_io = uvxy_field(mmioh1, m_io, 0);
+			int n_io = uvxy_field(mmioh1, n_io, 0);
+
+			calc_mmioh_map(UVX_MMIOH1, min_pnode, max_pnode,
+				UVH_RH_GAM_MMIOH_OVERLAY_CONFIG1_BASE_SHFT,
+				base, m_io, n_io);
+		}
+		return;
+	}
+
+	/* UV2 flavor */
+	if (UVH_RH_GAM_MMIOH_OVERLAY_CONFIG) {
+		union uvh_rh_gam_mmioh_overlay_config_u mmioh;
 
-	if (is_uv2_hub()) {
-		mmr	= UVH_RH_GAM_MMIOH_OVERLAY_CONFIG;
-		shift	= UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_BASE_SHFT;
-		mmioh.v	= uv_read_local_mmr(mmr);
-		enable	= !!mmioh.s2.enable;
-		base	= mmioh.s2.base;
-		m_io	= mmioh.s2.m_io;
-		n_io	= mmioh.s2.n_io;
-
-		if (enable) {
-			max_pnode &= (1 << n_io) - 1;
-			pr_info(
-			"UV: base:0x%lx shift:%d N_IO:%d M_IO:%d max_pnode:0x%x\n",
-				base, shift, m_io, n_io, max_pnode);
-			map_high("MMIOH", base, shift, m_io, max_pnode, map_uc);
-		} else {
+		mmioh.v	= uv_read_local_mmr(UVH_RH_GAM_MMIOH_OVERLAY_CONFIG);
+		if (unlikely(mmioh.s2.enable == 0))
 			pr_info("UV: MMIOH disabled\n");
-		}
+		else
+			calc_mmioh_map(UV2_MMIOH, min_pnode, max_pnode,
+				UV2H_RH_GAM_MMIOH_OVERLAY_CONFIG_BASE_SHFT,
+				mmioh.s2.base, mmioh.s2.m_io, mmioh.s2.n_io);
+		return;
 	}
 }
 
#14 lore raw

PATCH 8/12 x86/platform/uv: Adjust GAM MMR references affected by UV5 updates

In reply to Mike Travis

Make modifications to the GAM MMR mappings to accommodate changes for UV5.

---
 arch/x86/kernel/apic/x2apic_uv_x.c |   30 +++++++++++++++++++++++++-----
 1 file changed, 25 insertions(+), 5 deletions(-)
arch/x86/kernel/apic/x2apic_uv_x.c +25 -5
@@ -932,12 +932,32 @@ static __init void map_gru_high(int max_
 
 static __init void map_mmr_high(int max_pnode)
 {
-	union uvh_rh_gam_mmr_overlay_config_u mmr;
-	int shift = UVH_RH_GAM_MMR_OVERLAY_CONFIG_BASE_SHFT;
+	unsigned long base;
+	int shift;
+	bool enable;
 
-	mmr.v = uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG);
-	if (mmr.s.enable)
-		map_high("MMR", mmr.s.base, shift, shift, max_pnode, map_uc);
+	if (UVH_RH10_GAM_MMR_OVERLAY_CONFIG) {
+		union uvh_rh10_gam_mmr_overlay_config_u mmr;
+
+		mmr.v = uv_read_local_mmr(UVH_RH10_GAM_MMR_OVERLAY_CONFIG);
+		enable = mmr.s.enable;
+		base = mmr.s.base;
+		shift = UVH_RH10_GAM_MMR_OVERLAY_CONFIG_BASE_SHFT;
+	} else if (UVH_RH_GAM_MMR_OVERLAY_CONFIG) {
+		union uvh_rh_gam_mmr_overlay_config_u mmr;
+
+		mmr.v = uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG);
+		enable = mmr.s.enable;
+		base = mmr.s.base;
+		shift = UVH_RH_GAM_MMR_OVERLAY_CONFIG_BASE_SHFT;
+	} else {
+		pr_err("UV:%s:RH_GAM_MMR_OVERLAY_CONFIG MMR undefined?\n",
+			__func__);
+		return;
+	}
+
+	if (enable)
+		map_high("MMR", base, shift, shift, max_pnode, map_uc);
 	else
 		pr_info("UV: MMR disabled\n");
 }
#15 lore raw

PATCH 9/12 x86/platform/uv: Update UV5 MMR references in UV GRU

In reply to Mike Travis

Make modifications to the GRU mappings to accommodate changes for UV5.

---
 arch/x86/kernel/apic/x2apic_uv_x.c |   30 ++++++++++++++++++++++++------
 1 file changed, 24 insertions(+), 6 deletions(-)
arch/x86/kernel/apic/x2apic_uv_x.c +24 -6
@@ -83,6 +83,9 @@ static unsigned long __init uv_early_rea
 
 static inline bool is_GRU_range(u64 start, u64 end)
 {
+	if (!gru_start_paddr)
+		return false;
+
 	return start >= gru_start_paddr && end <= gru_end_paddr;
 }
 
@@ -914,13 +917,24 @@ static __init void map_high(char *id, un
 static __init void map_gru_high(int max_pnode)
 {
 	union uvh_rh_gam_gru_overlay_config_u gru;
-	int shift = UVH_RH_GAM_GRU_OVERLAY_CONFIG_BASE_SHFT;
-	unsigned long mask = UVH_RH_GAM_GRU_OVERLAY_CONFIG_BASE_MASK;
-	unsigned long base;
+	unsigned long mask, base;
+	int shift;
+
+	if (UVH_RH_GAM_GRU_OVERLAY_CONFIG) {
+		gru.v = uv_read_local_mmr(UVH_RH_GAM_GRU_OVERLAY_CONFIG);
+		shift = UVH_RH_GAM_GRU_OVERLAY_CONFIG_BASE_SHFT;
+		mask = UVH_RH_GAM_GRU_OVERLAY_CONFIG_BASE_MASK;
+	} else if (UVH_RH10_GAM_GRU_OVERLAY_CONFIG) {
+		gru.v = uv_read_local_mmr(UVH_RH10_GAM_GRU_OVERLAY_CONFIG);
+		shift = UVH_RH10_GAM_GRU_OVERLAY_CONFIG_BASE_SHFT;
+		mask = UVH_RH10_GAM_GRU_OVERLAY_CONFIG_BASE_MASK;
+	} else {
+		pr_err("UV: GRU unavailable (no MMR)\n");
+		return;
+	}
 
-	gru.v = uv_read_local_mmr(UVH_RH_GAM_GRU_OVERLAY_CONFIG);
 	if (!gru.s.enable) {
-		pr_info("UV: GRU disabled\n");
+		pr_info("UV: GRU disabled (by BIOS)\n");
 		return;
 	}
 
@@ -1289,7 +1303,11 @@ static void __init uv_init_hub_info(stru
 	/* Show system specific info: */
 	pr_info("UV: N:%d M:%d m_shift:%d n_lshift:%d\n", hi->n_val, hi->m_val, hi->m_shift, hi->n_lshift);
 	pr_info("UV: gpa_mask/shift:0x%lx/%d pnode_mask:0x%x apic_pns:%d\n", hi->gpa_mask, hi->gpa_shift, hi->pnode_mask, hi->apic_pnode_shift);
-	pr_info("UV: mmr_base/shift:0x%lx/%ld gru_base/shift:0x%lx/%ld\n", hi->global_mmr_base, hi->global_mmr_shift, hi->global_gru_base, hi->global_gru_shift);
+	pr_info("UV: mmr_base/shift:0x%lx/%ld\n", hi->global_mmr_base, hi->global_mmr_shift);
+	if (hi->global_gru_base)
+		pr_info("UV: gru_base/shift:0x%lx/%ld\n",
+			hi->global_gru_base, hi->global_gru_shift);
+
 	pr_info("UV: gnode_upper:0x%lx gnode_extra:0x%x\n", hi->gnode_upper, hi->gnode_extra);
 }
 
#16 lore raw

PATCH 10/12 x86/platform/uv: Update Node Present Counting

In reply to Mike Travis

The changes in the UV5 arch shrunk the NODE PRESENT table to just 2x64 entries (128 total) so are in to 64 bit MMRs instead of a depth of 64 bits in an array. Adjust references when counting up the nodes present.

---
 arch/x86/kernel/apic/x2apic_uv_x.c |   26 +++++++++++++++++++-------
 1 file changed, 19 insertions(+), 7 deletions(-)
arch/x86/kernel/apic/x2apic_uv_x.c +19 -7
@@ -1437,20 +1437,32 @@ static int __init decode_uv_systab(void)
 /* Set up physical blade translations from UVH_NODE_PRESENT_TABLE */
 static __init void boot_init_possible_blades(struct uv_hub_info_s *hub_info)
 {
+	unsigned long np;
 	int i, uv_pb = 0;
 
-	pr_info("UV: NODE_PRESENT_DEPTH = %d\n", UVH_NODE_PRESENT_TABLE_DEPTH);
-	for (i = 0; i < UVH_NODE_PRESENT_TABLE_DEPTH; i++) {
-		unsigned long np;
-
-		np = uv_read_local_mmr(UVH_NODE_PRESENT_TABLE + i * 8);
-		if (np)
+	if (UVH_NODE_PRESENT_TABLE) {
+		pr_info("UV: NODE_PRESENT_DEPTH = %d\n",
+			UVH_NODE_PRESENT_TABLE_DEPTH);
+		for (i = 0; i < UVH_NODE_PRESENT_TABLE_DEPTH; i++) {
+			np = uv_read_local_mmr(UVH_NODE_PRESENT_TABLE + i * 8);
 			pr_info("UV: NODE_PRESENT(%d) = 0x%016lx\n", i, np);
-
+			uv_pb += hweight64(np);
+		}
+	}
+	if (UVH_NODE_PRESENT_0) {
+		np = uv_read_local_mmr(UVH_NODE_PRESENT_0);
+		pr_info("UV: NODE_PRESENT_0 = 0x%016lx\n", np);
+		uv_pb += hweight64(np);
+	}
+	if (UVH_NODE_PRESENT_1) {
+		np = uv_read_local_mmr(UVH_NODE_PRESENT_1);
+		pr_info("UV: NODE_PRESENT_1 = 0x%016lx\n", np);
 		uv_pb += hweight64(np);
 	}
 	if (uv_possible_blades != uv_pb)
 		uv_possible_blades = uv_pb;
+
+	pr_info("UV: number nodes/possible blades %d\n", uv_pb);
 }
 
 static void __init build_socket_tables(void)
#17 lore raw

PATCH 11/12 x86/platform/uv: Update UV5 TSC Checking

In reply to Mike Travis

Update check of BIOS TSC sync status to include both possible "invalid" states provided by newer UV5 BIOS.

---
 arch/x86/include/asm/uv/uv_hub.h   |    2 +-
 arch/x86/kernel/apic/x2apic_uv_x.c |   24 ++++++++++--------------
 2 files changed, 11 insertions(+), 15 deletions(-)
arch/x86/include/asm/uv/uv_hub.h +1 -1
@@ -727,7 +727,7 @@ extern void uv_nmi_setup_hubless(void);
 #define UVH_TSC_SYNC_SHIFT_UV2K	16	/* UV2/3k have different bits */
 #define UVH_TSC_SYNC_MASK	3	/* 0011 */
 #define UVH_TSC_SYNC_VALID	3	/* 0011 */
-#define UVH_TSC_SYNC_INVALID	2	/* 0010 */
+#define UVH_TSC_SYNC_UNKNOWN	0	/* 0000 */
 
 /* BMC sets a bit this MMR non-zero before sending an NMI */
 #define UVH_NMI_MMR		UVH_BIOS_KERNEL_MMR
arch/x86/kernel/apic/x2apic_uv_x.c +10 -14
@@ -200,36 +200,32 @@ static void __init uv_tsc_check_sync(voi
 	int sync_state;
 	int mmr_shift;
 	char *state;
-	bool valid;
 
-	/* Accommodate different UV arch BIOSes */
+	/* Different returns from different UV BIOS versions */
 	mmr = uv_early_read_mmr(UVH_TSC_SYNC_MMR);
 	mmr_shift =
 		is_uv2_hub() ? UVH_TSC_SYNC_SHIFT_UV2K : UVH_TSC_SYNC_SHIFT;
 	sync_state = (mmr >> mmr_shift) & UVH_TSC_SYNC_MASK;
 
+	/* Check if TSC is valid for all sockets */
 	switch (sync_state) {
 	case UVH_TSC_SYNC_VALID:
 		state = "in sync";
-		valid = true;
+		mark_tsc_async_resets("UV BIOS");
 		break;
 
-	case UVH_TSC_SYNC_INVALID:
-		state = "unstable";
-		valid = false;
+	/* If BIOS state unknown, don't do anything */
+	case UVH_TSC_SYNC_UNKNOWN:
+		state = "unknown";
 		break;
+
+	/* Otherwise, BIOS indicates problem with TSC */
 	default:
-		state = "unknown: assuming valid";
-		valid = true;
+		state = "unstable";
+		mark_tsc_unstable("UV BIOS");
 		break;
 	}
 	pr_info("UV: TSC sync state from BIOS:0%d(%s)\n", sync_state, state);
-
-	/* Mark flag that says TSC != 0 is valid for socket 0 */
-	if (valid)
-		mark_tsc_async_resets("UV BIOS");
-	else
-		mark_tsc_unstable("UV BIOS");
 }
 
 /* Selector for (4|4A|5) structs */
#18 lore raw

PATCH 12/12 x86/platform/uv: Update for UV5 NMI MMR changes

In reply to Mike Travis

The UV NMI MMR addresses and fields moved between UV4 and UV5 necessitating a rewrite of the UV NMI handler. Adjust references to accommodate those changes.

---
 arch/x86/include/asm/uv/uv_hub.h |   13 -------
 arch/x86/platform/uv/uv_nmi.c    |   65 +++++++++++++++++++++++++++++++++------
 2 files changed, 55 insertions(+), 23 deletions(-)
arch/x86/include/asm/uv/uv_hub.h +0 -13
@@ -735,19 +735,6 @@ extern void uv_nmi_setup_hubless(void);
 #define UVH_NMI_MMR_SHIFT	63
 #define UVH_NMI_MMR_TYPE	"SCRATCH5"
 
-/* Newer SMM NMI handler, not present in all systems */
-#define UVH_NMI_MMRX		UVH_EVENT_OCCURRED0
-#define UVH_NMI_MMRX_CLEAR	UVH_EVENT_OCCURRED0_ALIAS
-#define UVH_NMI_MMRX_SHIFT	UVH_EVENT_OCCURRED0_EXTIO_INT0_SHFT
-#define UVH_NMI_MMRX_TYPE	"EXTIO_INT0"
-
-/* Non-zero indicates newer SMM NMI handler present */
-#define UVH_NMI_MMRX_SUPPORTED	UVH_EXTIO_INT0_BROADCAST
-
-/* Indicates to BIOS that we want to use the newer SMM NMI handler */
-#define UVH_NMI_MMRX_REQ	UVH_BIOS_KERNEL_MMR_ALIAS_2
-#define UVH_NMI_MMRX_REQ_SHIFT	62
-
 struct uv_hub_nmi_s {
 	raw_spinlock_t	nmi_lock;
 	atomic_t	in_nmi;		/* flag this node in UV NMI IRQ */
arch/x86/platform/uv/uv_nmi.c +55 -10

87 lines not on this page · raw message

maintainer
#19 lore raw
In reply to Mike Travis
Quoted 33 lines · Mike Travis

Subject: [PATCH 00/12] x86/platform/uv: Updates for UV5

Add changes needed for new UV5 UV architecture. Chief among the changes are 52 bits of physical memory address and 57 bits of virtual address space.

0001 Remove UV BAU TLB Shootdown Handler
- removes BAU TLB code being replaced by BAU APIC driver

0002 Remove SCIR built in driver
- removes System Controller (monitoring) code

0003 Update UV kernel modules
- update loadable UV kernel modules prior to a clash of symbols (is_uv) produced by auto-generated UV5 uv_mmrs.h file

0004 Update UV MMRs for UV5
- update uv_mmrs.h file and fix resultant compiler errors

0005 Add UV5 direct references
- add references to UV5 specific values

0006 Decode and Use Arch Type in UVsystab
- add UV ArchType field to UVsystab to remove dependency on OEM_ID

0007 Update MMIOH references
- display MMIOH mapping for each MMIOH region

0008 Adjust GAM MMR references
- update GAM mapping for MMR accesses

0009 Update UV GRU references
- update GRU mapping to include UV5

Quoted 9 lines

0010 Update Node Present Counting
- UV5 changes method of counting nodes present

0011 Update UV5 TSC Checking
- update TSC sync check of BIOS sync status

0012 Update for UV5 NMI MMR changes
- update NMI handler

No diffstat? Did you use 'git format-patch' cover letter for this?

thanks,

greg k-h

maintainer
#4 lore raw

Re: [PATCH 03/12] x86/platform/uv: Adjust references in UV kernel modules

In reply to Mike Travis
Quoted 19 lines · Mike Travis

There is a symbol clash from the auto-generated uv_mmrs.h file that clashes with code in the UV kernel modules (is_uv() is the symbol). Change those prior to the symbol clash so as to not cause a compile error.

---
 drivers/misc/sgi-xp/xp.h            |   11 ++++++-----
 drivers/misc/sgi-xp/xp_main.c       |    7 ++++---
 drivers/misc/sgi-xp/xp_uv.c         |    9 ++++++---
 drivers/misc/sgi-xp/xpc_main.c      |    9 +++++----
 drivers/misc/sgi-xp/xpc_partition.c |    5 +++--
 drivers/misc/sgi-xp/xpnet.c         |    5 +++--
 6 files changed, 27 insertions(+), 19 deletions(-)

drivers/misc/sgi-xp/xp.h line 7

Quoted 6 lines
drivers/misc/sgi-xp/xp.h +2 -1
@@ -3,7 +3,8 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 2004-2008 Silicon Graphics, Inc. All rights reserved.
+ * Copyright (c) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (c) 2008-2017 Silicon Graphics, Inc.  All Rights Reserved.

This change does not make sense. If you want to make it, please make it in a separate patch that justifies the dates being added here please.

thanks,

greg k-h

maintainer
#6 lore raw

Re: [PATCH 04/12] x86/platform/uv: Update UV MMRs for UV5

In reply to Mike Travis

drivers/misc/sgi-gru/grufile.c line 11

Quoted 9 lines · Mike Travis
drivers/misc/sgi-gru/grufile.c +2 -1
@@ -7,7 +7,8 @@
  * This file supports the user system call for file open, close, mmap, etc.
  * This also incudes the driver initialization code.
  *
- *  Copyright (c) 2008-2014 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (c) 2008-2017 Silicon Graphics, Inc.  All Rights Reserved.

Please drop all copyright changes from this series, as these do not look correct at all, sorry.

You can send an add-on patch for all of that if it's really necessary, and you get legal approval for it :)

thanks,

greg k-h

#20 lore raw
In reply to Greg KH
Quoted 37 lines · Greg KH
Quoted 36 lines · Mike Travis

Subject: [PATCH 00/12] x86/platform/uv: Updates for UV5

Add changes needed for new UV5 UV architecture. Chief among the changes are 52 bits of physical memory address and 57 bits of virtual address space.

0001 Remove UV BAU TLB Shootdown Handler
- removes BAU TLB code being replaced by BAU APIC driver

0002 Remove SCIR built in driver
- removes System Controller (monitoring) code

0003 Update UV kernel modules
- update loadable UV kernel modules prior to a clash of symbols (is_uv) produced by auto-generated UV5 uv_mmrs.h file

0004 Update UV MMRs for UV5
- update uv_mmrs.h file and fix resultant compiler errors

0005 Add UV5 direct references
- add references to UV5 specific values

0006 Decode and Use Arch Type in UVsystab
- add UV ArchType field to UVsystab to remove dependency on OEM_ID

0007 Update MMIOH references
- display MMIOH mapping for each MMIOH region

0008 Adjust GAM MMR references
- update GAM mapping for MMR accesses

0009 Update UV GRU references
- update GRU mapping to include UV5

0010 Update Node Present Counting
- UV5 changes method of counting nodes present

Quoted 8 lines
Quoted 6 lines

0011 Update UV5 TSC Checking
- update TSC sync check of BIOS sync status

0012 Update for UV5 NMI MMR changes
- update NMI handler

No diffstat? Did you use 'git format-patch' cover letter for this?

I didn't. If I could figure out how to convert quilt patches into git commits I might be able to do that? (And I didn't know that diffstats were needed on the into?)

Thanks,
Mike

Quoted 5 lines

thanks,

greg k-h

#7 lore raw

Re: [PATCH 04/12] x86/platform/uv: Update UV MMRs for UV5

In reply to Greg KH
Quoted 14 lines · Greg KH

drivers/misc/sgi-gru/grufile.c line 11

Quoted 9 lines · Mike Travis
drivers/misc/sgi-gru/grufile.c +2 -1
@@ -7,7 +7,8 @@
   * This file supports the user system call for file open, close, mmap, etc.
   * This also incudes the driver initialization code.
   *
- *  Copyright (c) 2008-2014 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (c) 2008-2017 Silicon Graphics, Inc.  All Rights Reserved.

Please drop all copyright changes from this series, as these do not look correct at all, sorry.

Quoted 2 lines

You can send an add-on patch for all of that if it's really necessary, and you get legal approval for it :)

I can move them all to a single patch. The HPE one is straight from their guidance on Copyrights. The older SGI one is also from SGI's guidance though I'm not sure if I can find it anymore. I also wasn't sure if it should be retained since the HPE one didn't take effect until SGI was legally part of HPE (circa 2018). 2017/18 was also the last time we did this big a change (for the UV4A).

Quoted 5 lines

thanks,

greg k-h

maintainer
#21 lore raw
In reply to Mike Travis
Quoted 47 lines · Mike Travis
Quoted 44 lines · Greg KH
Quoted 42 lines · Mike Travis

Subject: [PATCH 00/12] x86/platform/uv: Updates for UV5

Add changes needed for new UV5 UV architecture. Chief among the changes are 52 bits of physical memory address and 57 bits of virtual address space.

0001 Remove UV BAU TLB Shootdown Handler
- removes BAU TLB code being replaced by BAU APIC driver

0002 Remove SCIR built in driver
- removes System Controller (monitoring) code

0003 Update UV kernel modules
- update loadable UV kernel modules prior to a clash of symbols (is_uv) produced by auto-generated UV5 uv_mmrs.h file

0004 Update UV MMRs for UV5
- update uv_mmrs.h file and fix resultant compiler errors

0005 Add UV5 direct references
- add references to UV5 specific values

0006 Decode and Use Arch Type in UVsystab
- add UV ArchType field to UVsystab to remove dependency on OEM_ID

0007 Update MMIOH references
- display MMIOH mapping for each MMIOH region

0008 Adjust GAM MMR references
- update GAM mapping for MMR accesses

0009 Update UV GRU references
- update GRU mapping to include UV5

0010 Update Node Present Counting
- UV5 changes method of counting nodes present

0011 Update UV5 TSC Checking
- update TSC sync check of BIOS sync status

0012 Update for UV5 NMI MMR changes
- update NMI handler

Quoted 5 lines
Quoted 1 line

No diffstat? Did you use 'git format-patch' cover letter for this?

I didn't. If I could figure out how to convert quilt patches into git commits I might be able to do that? (And I didn't know that diffstats were needed on the into?)

Ah, didn't realize you were using quilt, nevermind.

It's just a built-in feature of git, it makes your life easier than this :)

thanks,

greg k-h

maintainer
#8 lore raw

Re: [PATCH 04/12] x86/platform/uv: Update UV MMRs for UV5

In reply to Mike Travis
Quoted 20 lines · Mike Travis
Quoted 14 lines · Greg KH

drivers/misc/sgi-gru/grufile.c line 11

Quoted 9 lines · Mike Travis
drivers/misc/sgi-gru/grufile.c +2 -1
@@ -7,7 +7,8 @@
   * This file supports the user system call for file open, close, mmap, etc.
   * This also incudes the driver initialization code.
   *
- *  Copyright (c) 2008-2014 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (c) 2008-2017 Silicon Graphics, Inc.  All Rights Reserved.

Please drop all copyright changes from this series, as these do not look correct at all, sorry.

Quoted 2 lines

You can send an add-on patch for all of that if it's really necessary, and you get legal approval for it :)

Quoted 6 lines

I can move them all to a single patch. The HPE one is straight from their guidance on Copyrights. The older SGI one is also from SGI's guidance though I'm not sure if I can find it anymore. I also wasn't sure if it should be retained since the HPE one didn't take effect until SGI was legally part of HPE (circa 2018). 2017/18 was also the last time we did this big a change (for the UV4A).

If you haven't touched a file in a year, you don't get to claim copyright on that year. If you wish to disagree on this, great, I'll gladly take a patch that modifies the lines that has a signed-off-by from one of your lawyers for it :)

thanks,

greg k-h

#22 lore raw
In reply to Mike Travis
Quoted 3 lines · Mike Travis

I didn't. If I could figure out how to convert quilt patches into git commits I might be able to do that? (And I didn't know that diffstats were needed on the into?)

$ git quiltimport

Or, for the more enterprising person:

$ quilt series | while read file; do git am $file; done

Generating a diffstat from a quilt series (when applied):

$ quilt diff --combine - | diffstat
#9 lore raw

Re: [PATCH 04/12] x86/platform/uv: Update UV MMRs for UV5

In reply to Greg KH
Quoted 28 lines · Greg KH
Quoted 20 lines · Mike Travis
Quoted 14 lines · Greg KH

drivers/misc/sgi-gru/grufile.c line 11

Quoted 9 lines · Mike Travis
drivers/misc/sgi-gru/grufile.c +2 -1
@@ -7,7 +7,8 @@
    * This file supports the user system call for file open, close, mmap, etc.
    * This also incudes the driver initialization code.
    *
- *  Copyright (c) 2008-2014 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (c) 2008-2017 Silicon Graphics, Inc.  All Rights Reserved.

Please drop all copyright changes from this series, as these do not look correct at all, sorry.

Quoted 2 lines

You can send an add-on patch for all of that if it's really necessary, and you get legal approval for it :)

Quoted 6 lines

I can move them all to a single patch. The HPE one is straight from their guidance on Copyrights. The older SGI one is also from SGI's guidance though I'm not sure if I can find it anymore. I also wasn't sure if it should be retained since the HPE one didn't take effect until SGI was legally part of HPE (circa 2018). 2017/18 was also the last time we did this big a change (for the UV4A).

Quoted 4 lines

If you haven't touched a file in a year, you don't get to claim copyright on that year. If you wish to disagree on this, great, I'll gladly take a patch that modifies the lines that has a signed-off-by from one of your lawyers for it :)

I skipped over that part. But I'm moving all changes to a single patch and I will look more closely at HPE's documents. Heaven knows they have plenty of lawyers, so many it's hard to ask a simple question... like when does a copyright take effect. When you change it internally, or when it gets published? Sounds like you lean towards the second?

Thanks,
Mike

Quoted 5 lines

thanks,

greg k-h

#23 lore raw
In reply to [email protected]
Quoted 7 lines · On 9/8/2020 8:47 AM, [email protected] wrote:
Quoted 3 lines · Mike Travis

I didn't. If I could figure out how to convert quilt patches into git commits I might be able to do that? (And I didn't know that diffstats were needed on the into?)

$ git quiltimport
Quoted 8 lines

Or, for the more enterprising person:

$ quilt series | while read file; do git am $file; done

Generating a diffstat from a quilt series (when applied):

$ quilt diff --combine - | diffstat

Cool, thanks. I am doing this for the V2 version of the patches. Most will get touched anyways because of the Copyright thing.

maintainer
#10 lore raw

Re: [PATCH 04/12] x86/platform/uv: Update UV MMRs for UV5

In reply to Mike Travis
Quoted 36 lines · Mike Travis
Quoted 28 lines · Greg KH
Quoted 20 lines · Mike Travis
Quoted 14 lines · Greg KH

drivers/misc/sgi-gru/grufile.c line 11

Quoted 9 lines · Mike Travis
drivers/misc/sgi-gru/grufile.c +2 -1
@@ -7,7 +7,8 @@
    * This file supports the user system call for file open, close, mmap, etc.
    * This also incudes the driver initialization code.
    *
- *  Copyright (c) 2008-2014 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (c) 2008-2017 Silicon Graphics, Inc.  All Rights Reserved.

Please drop all copyright changes from this series, as these do not look correct at all, sorry.

Quoted 2 lines

You can send an add-on patch for all of that if it's really necessary, and you get legal approval for it :)

Quoted 6 lines

I can move them all to a single patch. The HPE one is straight from their guidance on Copyrights. The older SGI one is also from SGI's guidance though I'm not sure if I can find it anymore. I also wasn't sure if it should be retained since the HPE one didn't take effect until SGI was legally part of HPE (circa 2018). 2017/18 was also the last time we did this big a change (for the UV4A).

Quoted 4 lines

If you haven't touched a file in a year, you don't get to claim copyright on that year. If you wish to disagree on this, great, I'll gladly take a patch that modifies the lines that has a signed-off-by from one of your lawyers for it :)

Quoted 5 lines

I skipped over that part. But I'm moving all changes to a single patch and I will look more closely at HPE's documents. Heaven knows they have plenty of lawyers, so many it's hard to ask a simple question... like when does a copyright take effect. When you change it internally, or when it gets published? Sounds like you lean towards the second?

There are established rules for this type of thing, I'm not going to tell you what HP's rules are, but this patch really looks wrong from what I understand about what the rules are...

thanks,

greg k-h