Re: [PATCH] x86: fix wakeup_cpu with numaq/es7000 v2

From: Yinghai Lu
Date: Mon Nov 17 2008 - 21:50:32 EST


---

[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@xxxxxxxxxx>

---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/