lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1KGJNb-0003qF-5E@eag09.americas.sgi.com>
Date:	Tue, 08 Jul 2008 15:01:39 -0500
From:	Cliff Wickman <cpw@....com>
To:	mingo@...e.hu
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH] SGI UV: TLB shootdown extended apic mode



From: Cliff Wickman <cpw@....com>

Set or clear the UV hub's extended apic mode based on the kernel's setting.
This cannot be done safely in the prom, as the kernel may set the mode.

The kernel's setting of extended apic mode is indicated by global "x2apic".

Diffed against 2.6.26-rc9 (Ingo's tip-latest)

Signed-off-by: Cliff Wickman <cpw@....com>
---
 arch/x86/kernel/tlb_uv.c     |   12 ++++++++++++
 include/asm-x86/uv/uv_bau.h  |    1 +
 include/asm-x86/uv/uv_mmrs.h |    5 +++++
 3 files changed, 18 insertions(+)

Index: linux/arch/x86/kernel/tlb_uv.c
===================================================================
--- linux.orig/arch/x86/kernel/tlb_uv.c
+++ linux/arch/x86/kernel/tlb_uv.c
@@ -741,6 +741,18 @@ static int __init uv_init_blade(int blad
 		uv_write_global_mmr64(pnode, UVH_BAU_DATA_CONFIG,
 				      ((apicid << 32) | UV_BAU_MESSAGE));
 	}
+
+	/*
+	 * The hub's extended apic mode must agree with the kernel's setting,
+	 * which is indicated by global "x2apic".
+	 */
+	pa = uv_read_global_mmr64(pnode, UVH_LB_BAU_MISC_CONTROL);
+	if (!x2apic && (pa & UVH_LB_BAU_MISC_CONTROL_APIC_MODE_MASK))
+		pa &= ~UVH_LB_BAU_MISC_CONTROL_APIC_MODE_MASK;
+	else if (x2apic && (!(pa & UVH_LB_BAU_MISC_CONTROL_APIC_MODE_MASK)))
+		pa |= UVH_LB_BAU_MISC_CONTROL_APIC_MODE_MASK;
+	uv_write_global_mmr64(pnode, UVH_LB_BAU_MISC_CONTROL, pa);
+
 	return 0;
 }
 
Index: linux/include/asm-x86/uv/uv_bau.h
===================================================================
--- linux.orig/include/asm-x86/uv/uv_bau.h
+++ linux/include/asm-x86/uv/uv_bau.h
@@ -333,5 +333,6 @@ static inline void bau_cpubits_clear(str
 extern int uv_flush_tlb_others(cpumask_t *, struct mm_struct *, unsigned long);
 extern void uv_bau_message_intr1(void);
 extern void uv_bau_timeout_intr1(void);
+extern int x2apic;
 
 #endif /* __ASM_X86_UV_BAU__ */
Index: linux/include/asm-x86/uv/uv_mmrs.h
===================================================================
--- linux.orig/include/asm-x86/uv/uv_mmrs.h
+++ linux/include/asm-x86/uv/uv_mmrs.h
@@ -1291,5 +1291,10 @@ union uvh_si_alias2_overlay_config_u {
     } s;
 };
 
+/* ========================================================================= */
+/*                         UVH_LB_BAU_MISC_CONTROL                           */
+/* ========================================================================= */
+#define UVH_LB_BAU_MISC_CONTROL 0x320170UL
+#define UVH_LB_BAU_MISC_CONTROL_APIC_MODE_MASK 0x0000000000000100UL
 
 #endif /* __ASM_X86_UV_MMRS__ */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ