From: ebiederm@xmission.com (Eric W. Biederman)
To: Andrew Morton <akpm@osdl.org>
Cc: <linux-kernel@vger.kernel.org>, <fastboot@osdl.org>,
Andi Kleen <ak@suse.de>
Subject: [PATCH 1/2] x86_64 nmi_watchdog: Make check_nmi_watchdog static
Date: Tue, 04 Oct 2005 09:11:42 -0600 [thread overview]
Message-ID: <m17jct8ggh.fsf@ebiederm.dsl.xmission.com> (raw)
By using a late_initcall as i386 does we don't need to call
check_nmi_watchdog manually after SMP startup, and we don't
need different code paths for SMP and non SMP.
This paves the way for moving apic initialization into init_IRQ,
where it belongs.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
arch/x86_64/kernel/apic.c | 1 -
arch/x86_64/kernel/nmi.c | 7 ++++++-
arch/x86_64/kernel/smpboot.c | 2 --
include/asm-x86_64/nmi.h | 2 --
4 files changed, 6 insertions(+), 6 deletions(-)
b80634473f58ddea568a41e9a779676bed64dc9c
diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c
--- a/arch/x86_64/kernel/apic.c
+++ b/arch/x86_64/kernel/apic.c
@@ -1061,7 +1061,6 @@ int __init APIC_init_uniprocessor (void)
nr_ioapics = 0;
#endif
setup_boot_APIC_clock();
- check_nmi_watchdog();
return 0;
}
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c
--- a/arch/x86_64/kernel/nmi.c
+++ b/arch/x86_64/kernel/nmi.c
@@ -139,12 +139,15 @@ static __init void nmi_cpu_busy(void *da
}
#endif
-int __init check_nmi_watchdog (void)
+static int __init check_nmi_watchdog (void)
{
volatile int endflag = 0;
int *counts;
int cpu;
+ if (nmi_watchdog == NMI_NONE)
+ return 0;
+
counts = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL);
if (!counts)
return -1;
@@ -186,6 +189,8 @@ int __init check_nmi_watchdog (void)
kfree(counts);
return 0;
}
+/* This needs to happen later in boot so counters are working */
+late_initcall(check_nmi_watchdog);
int __init setup_nmi_watchdog(char *str)
{
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c
--- a/arch/x86_64/kernel/smpboot.c
+++ b/arch/x86_64/kernel/smpboot.c
@@ -1077,8 +1077,6 @@ void __init smp_cpus_done(unsigned int m
#endif
time_init_gtod();
-
- check_nmi_watchdog();
}
#ifdef CONFIG_HOTPLUG_CPU
diff --git a/include/asm-x86_64/nmi.h b/include/asm-x86_64/nmi.h
--- a/include/asm-x86_64/nmi.h
+++ b/include/asm-x86_64/nmi.h
@@ -54,6 +54,4 @@ extern void die_nmi(char *str, struct pt
extern int panic_on_timeout;
extern int unknown_nmi_panic;
-extern int check_nmi_watchdog(void);
-
#endif /* ASM_NMI_H */
next reply other threads:[~2005-10-04 15:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-04 15:11 Eric W. Biederman [this message]
2005-10-04 15:21 ` Andi Kleen
2005-10-04 15:26 ` Eric W. Biederman
2005-10-04 15:32 ` Andi Kleen
2005-10-04 16:01 ` Eric W. Biederman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m17jct8ggh.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=fastboot@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®