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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1233186180-29883-62-git-send-email-mingo@elte.hu>
Date:	Wed, 28 Jan 2009 23:42:07 +0000
From:	Ingo Molnar <mingo@...e.hu>
To:	linux-kernel@...r.kernel.org
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...e.hu>
Subject: [PATCH 061/114] x86: set ->trampoline_phys_low/high on 64-bit too

64-bit x86 has zero for ->trampoline_phys_low/high, but the smpboot
code can use these values - so it's better to set them up to their
correct values.

Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 arch/x86/include/asm/genapic.h                   |    6 ++++++
 arch/x86/include/asm/mach-default/mach_wakecpu.h |    3 ---
 arch/x86/kernel/genapic_flat_64.c                |    8 ++++----
 arch/x86/kernel/genx2apic_cluster.c              |    4 ++--
 arch/x86/kernel/genx2apic_phys.c                 |    4 ++--
 arch/x86/kernel/genx2apic_uv_x.c                 |    4 ++--
 6 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h
index 8bb1c73..90e83a7 100644
--- a/arch/x86/include/asm/genapic.h
+++ b/arch/x86/include/asm/genapic.h
@@ -88,6 +88,12 @@ struct genapic {
 
 extern struct genapic *apic;
 
+/*
+ * Warm reset vector default position:
+ */
+#define DEFAULT_TRAMPOLINE_PHYS_LOW		0x467
+#define DEFAULT_TRAMPOLINE_PHYS_HIGH		0x469
+
 #ifdef CONFIG_X86_32
 extern void es7000_update_genapic_to_cluster(void);
 #else
diff --git a/arch/x86/include/asm/mach-default/mach_wakecpu.h b/arch/x86/include/asm/mach-default/mach_wakecpu.h
index 0a8d786..a327a67 100644
--- a/arch/x86/include/asm/mach-default/mach_wakecpu.h
+++ b/arch/x86/include/asm/mach-default/mach_wakecpu.h
@@ -1,9 +1,6 @@
 #ifndef _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H
 #define _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H
 
-#define DEFAULT_TRAMPOLINE_PHYS_LOW (0x467)
-#define DEFAULT_TRAMPOLINE_PHYS_HIGH (0x469)
-
 static inline void wait_for_init_deassert(atomic_t *deassert)
 {
 	while (!atomic_read(deassert))
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c
index 7c648cc..3a28d6a 100644
--- a/arch/x86/kernel/genapic_flat_64.c
+++ b/arch/x86/kernel/genapic_flat_64.c
@@ -224,8 +224,8 @@ struct genapic apic_flat =  {
 	.send_IPI_self			= apic_send_IPI_self,
 
 	.wakeup_cpu			= NULL,
-	.trampoline_phys_low		= 0,
-	.trampoline_phys_high		= 0,
+	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
+	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
 	.smp_callin_clear_local_apic	= NULL,
 	.store_NMI_vector		= NULL,
@@ -370,8 +370,8 @@ struct genapic apic_physflat =  {
 	.send_IPI_self			= apic_send_IPI_self,
 
 	.wakeup_cpu			= NULL,
-	.trampoline_phys_low		= 0,
-	.trampoline_phys_high		= 0,
+	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
+	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
 	.smp_callin_clear_local_apic	= NULL,
 	.store_NMI_vector		= NULL,
diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c
index 2d97726..abc5ee3 100644
--- a/arch/x86/kernel/genx2apic_cluster.c
+++ b/arch/x86/kernel/genx2apic_cluster.c
@@ -228,8 +228,8 @@ struct genapic apic_x2apic_cluster = {
 	.send_IPI_self			= x2apic_send_IPI_self,
 
 	.wakeup_cpu			= NULL,
-	.trampoline_phys_low		= 0,
-	.trampoline_phys_high		= 0,
+	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
+	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
 	.smp_callin_clear_local_apic	= NULL,
 	.store_NMI_vector		= NULL,
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c
index 74777c2..dc815ef 100644
--- a/arch/x86/kernel/genx2apic_phys.c
+++ b/arch/x86/kernel/genx2apic_phys.c
@@ -214,8 +214,8 @@ struct genapic apic_x2apic_phys = {
 	.send_IPI_self			= x2apic_send_IPI_self,
 
 	.wakeup_cpu			= NULL,
-	.trampoline_phys_low		= 0,
-	.trampoline_phys_high		= 0,
+	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
+	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
 	.smp_callin_clear_local_apic	= NULL,
 	.store_NMI_vector		= NULL,
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
index 24b9f42..b590873 100644
--- a/arch/x86/kernel/genx2apic_uv_x.c
+++ b/arch/x86/kernel/genx2apic_uv_x.c
@@ -287,8 +287,8 @@ struct genapic apic_x2apic_uv_x = {
 	.send_IPI_self			= uv_send_IPI_self,
 
 	.wakeup_cpu			= NULL,
-	.trampoline_phys_low		= 0,
-	.trampoline_phys_high		= 0,
+	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
+	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
 	.smp_callin_clear_local_apic	= NULL,
 	.store_NMI_vector		= NULL,
-- 
1.6.0.2

--
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