lkml.org 
[lkml]   [2010]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip:perf/nmi] x86: Cleanup hw_nmi.c cruft
Commit-ID:  10f9014912a2b1cb59c39cdea777e6d9afa8f17e
Gitweb: http://git.kernel.org/tip/10f9014912a2b1cb59c39cdea777e6d9afa8f17e
Author: Don Zickus <dzickus@redhat.com>
AuthorDate: Fri, 7 May 2010 17:11:49 -0400
Committer: Frederic Weisbecker <fweisbec@gmail.com>
CommitDate: Wed, 12 May 2010 23:55:48 +0200

x86: Cleanup hw_nmi.c cruft

The design of the hardlockup watchdog has changed and cruft was left
behind in the hw_nmi.c file. Just remove the code that isn't used
anymore.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Eric Paris <eparis@redhat.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
LKML-Reference: <1273266711-18706-7-git-send-email-dzickus@redhat.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
arch/x86/kernel/apic/hw_nmi.c | 58 -----------------------------------------
1 files changed, 0 insertions(+), 58 deletions(-)

diff --git a/arch/x86/kernel/apic/hw_nmi.c b/arch/x86/kernel/apic/hw_nmi.c
index 8c3edfb..3b40082 100644
--- a/arch/x86/kernel/apic/hw_nmi.c
+++ b/arch/x86/kernel/apic/hw_nmi.c
@@ -9,74 +9,16 @@
*
*/

-#include <asm/apic.h>
-#include <linux/smp.h>
#include <linux/cpumask.h>
-#include <linux/sched.h>
-#include <linux/percpu.h>
-#include <linux/cpumask.h>
-#include <linux/kernel_stat.h>
-#include <asm/mce.h>
#include <linux/kdebug.h>
#include <linux/notifier.h>
#include <linux/kprobes.h>
-
-
#include <linux/nmi.h>
#include <linux/module.h>

/* For reliability, we're prepared to waste bits here. */
static DECLARE_BITMAP(backtrace_mask, NR_CPUS) __read_mostly;

-static DEFINE_PER_CPU(unsigned, last_irq_sum);
-
-/*
- * Take the local apic timer and PIT/HPET into account. We don't
- * know which one is active, when we have highres/dyntick on
- */
-static inline unsigned int get_timer_irqs(int cpu)
-{
- unsigned int irqs = per_cpu(irq_stat, cpu).irq0_irqs;
-
-#if defined(CONFIG_X86_LOCAL_APIC)
- irqs += per_cpu(irq_stat, cpu).apic_timer_irqs;
-#endif
-
- return irqs;
-}
-
-static inline int mce_in_progress(void)
-{
-#if defined(CONFIG_X86_MCE)
- return atomic_read(&mce_entry) > 0;
-#endif
- return 0;
-}
-
-int hw_nmi_is_cpu_stuck(struct pt_regs *regs)
-{
- unsigned int sum;
- int cpu = smp_processor_id();
-
- /* if we are doing an mce, just assume the cpu is not stuck */
- /* Could check oops_in_progress here too, but it's safer not to */
- if (mce_in_progress())
- return 0;
-
- /* We determine if the cpu is stuck by checking whether any
- * interrupts have happened since we last checked. Of course
- * an nmi storm could create false positives, but the higher
- * level logic should account for that
- */
- sum = get_timer_irqs(cpu);
- if (__get_cpu_var(last_irq_sum) == sum) {
- return 1;
- } else {
- __get_cpu_var(last_irq_sum) = sum;
- return 0;
- }
-}
-
u64 hw_nmi_get_sample_period(void)
{
return (u64)(cpu_khz) * 1000 * 60;

\
 
 \ /
  Last update: 2010-05-13 08:57    [W:1.002 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site