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]
Date:	Mon, 17 Nov 2008 18:49:08 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	Ingo Molnar <mingo@...e.hu>
CC:	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: fix wakeup_cpu with numaq/es7000 v2

---

[PATCH] x86: use update_genapic to update inquire_remote_apic

Impact: clean up

So don't can comparing in that func when debug is disabled.

Signed-off-by: Yinghai Lu <yinghai@...nel.org>

---
 arch/x86/include/asm/es7000/wakecpu.h            |    3 +--
 arch/x86/include/asm/mach-default/mach_wakecpu.h |    3 +--
 arch/x86/kernel/es7000_32.c                      |   11 ++++++++++-
 arch/x86/kernel/setup.c                          |    9 +++++++++
 4 files changed, 21 insertions(+), 5 deletions(-)

Index: linux-2.6/arch/x86/include/asm/mach-default/mach_wakecpu.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/mach-default/mach_wakecpu.h
+++ linux-2.6/arch/x86/include/asm/mach-default/mach_wakecpu.h
@@ -28,8 +28,7 @@ extern void __inquire_remote_apic(int ap
 
 static inline void inquire_remote_apic(int apicid)
 {
-	if (apic_verbosity >= APIC_DEBUG)
-		__inquire_remote_apic(apicid);
+	__inquire_remote_apic(apicid);
 }
 
 #endif /* _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H */
Index: linux-2.6/arch/x86/kernel/es7000_32.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/es7000_32.c
+++ linux-2.6/arch/x86/kernel/es7000_32.c
@@ -181,14 +181,23 @@ static int wakeup_secondary_cpu_via_mip(
 
 	return 0;
 }
+#endif
+
+static void noop_inquire(void)
+{
+}
 
 static int __init es7000_update_genapic(void)
 {
+#ifdef CONFIG_ES7000_CLUSTERED_APIC
 	genapic->wakeup_cpu = wakeup_secondary_cpu_via_mip;
+#endif
+
+	if (apic_verbosity < APIC_DEBUG)
+		genapic->inquire_remote_apic = noop_inquire;
 
 	return 0;
 }
-#endif
 
 void __init
 setup_unisys(void)
Index: linux-2.6/arch/x86/kernel/setup.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/setup.c
+++ linux-2.6/arch/x86/kernel/setup.c
@@ -584,10 +584,19 @@ static int __init setup_elfcorehdr(char
 early_param("elfcorehdr", setup_elfcorehdr);
 #endif
 
+
+#if defined(CONFIG_X86_GENERICARCH) || defined(CONFIG_X86_64)
+static void noop_inquire(int apicid)
+{
+}
+#endif
 static int __init default_update_genapic(void)
 {
 #if defined(CONFIG_X86_GENERICARCH) || defined(CONFIG_X86_64)
 	genapic->wakeup_cpu = wakeup_secondary_cpu_via_nmi;
+
+	if (apic_verbosity < APIC_DEBUG)
+		genapic->inquire_remote_apic = noop_inquire;
 #endif
 
 	return 0;
Index: linux-2.6/arch/x86/include/asm/es7000/wakecpu.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/es7000/wakecpu.h
+++ linux-2.6/arch/x86/include/asm/es7000/wakecpu.h
@@ -30,8 +30,7 @@ extern void __inquire_remote_apic(int ap
 
 static inline void inquire_remote_apic(int apicid)
 {
-	if (apic_verbosity >= APIC_DEBUG)
-		__inquire_remote_apic(apicid);
+	__inquire_remote_apic(apicid);
 }
 
 #endif /* __ASM_MACH_WAKECPU_H */

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