Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205401
b: refs/heads/master
c: 23637d4
h: refs/heads/master
i:
  205399: 9e5f797
v: v3
  • Loading branch information
Frederic Weisbecker committed May 15, 2010
1 parent 97d4e38 commit 69d193c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c01d4323309a90a298fd81cf3a059ee1b12be2e9
refs/heads/master: 23637d477c1f53acbb176a02c241d60a25888fae
4 changes: 4 additions & 0 deletions trunk/arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,9 @@ config HAVE_USER_RETURN_NOTIFIER

config HAVE_PERF_EVENTS_NMI
bool
help
System hardware can generate an NMI using the perf event
subsystem. Also has support for calculating CPU cycle events
to determine how many clock cycles in a given period.

source "kernel/gcov/Kconfig"
7 changes: 0 additions & 7 deletions trunk/init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -942,13 +942,6 @@ config PERF_USE_VMALLOC
help
See tools/perf/design.txt for details

config PERF_EVENTS_NMI
def_bool PERF_EVENTS && HAVE_PERF_EVENTS_NMI
help
System hardware can generate an NMI using the perf event
subsystem. Also has support for calculating CPU cycle events
to determine how many clock cycles in a given period.

menu "Kernel Performance Events And Counters"

config PERF_EVENTS
Expand Down
14 changes: 7 additions & 7 deletions trunk/kernel/watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static DEFINE_PER_CPU(struct hrtimer, watchdog_hrtimer);
static DEFINE_PER_CPU(bool, softlockup_touch_sync);
static DEFINE_PER_CPU(bool, hard_watchdog_warn);
static DEFINE_PER_CPU(bool, soft_watchdog_warn);
#ifdef CONFIG_PERF_EVENTS_NMI
#ifdef CONFIG_HARDLOCKUP_DETECTOR
static DEFINE_PER_CPU(unsigned long, hrtimer_interrupts);
static DEFINE_PER_CPU(unsigned long, hrtimer_interrupts_saved);
static DEFINE_PER_CPU(struct perf_event *, watchdog_ev);
Expand All @@ -51,7 +51,7 @@ static int __initdata no_watchdog;
/*
* Should we panic when a soft-lockup or hard-lockup occurs:
*/
#ifdef CONFIG_PERF_EVENTS_NMI
#ifdef CONFIG_HARDLOCKUP_DETECTOR
static int hardlockup_panic;

static int __init hardlockup_panic_setup(char *str)
Expand Down Expand Up @@ -152,7 +152,7 @@ void touch_softlockup_watchdog_sync(void)
__raw_get_cpu_var(watchdog_touch_ts) = 0;
}

#ifdef CONFIG_PERF_EVENTS_NMI
#ifdef CONFIG_HARDLOCKUP_DETECTOR
/* watchdog detector functions */
static int is_hardlockup(int cpu)
{
Expand Down Expand Up @@ -189,7 +189,7 @@ static struct notifier_block panic_block = {
.notifier_call = watchdog_panic,
};

#ifdef CONFIG_PERF_EVENTS_NMI
#ifdef CONFIG_HARDLOCKUP_DETECTOR
static struct perf_event_attr wd_hw_attr = {
.type = PERF_TYPE_HARDWARE,
.config = PERF_COUNT_HW_CPU_CYCLES,
Expand Down Expand Up @@ -239,7 +239,7 @@ static void watchdog_interrupt_count(void)
}
#else
static inline void watchdog_interrupt_count(void) { return; }
#endif /* CONFIG_PERF_EVENTS_NMI */
#endif /* CONFIG_HARDLOCKUP_DETECTOR */

/* watchdog kicker functions */
static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer)
Expand Down Expand Up @@ -342,7 +342,7 @@ static int watchdog(void *__bind_cpu)
}


#ifdef CONFIG_PERF_EVENTS_NMI
#ifdef CONFIG_HARDLOCKUP_DETECTOR
static int watchdog_nmi_enable(int cpu)
{
struct perf_event_attr *wd_attr;
Expand Down Expand Up @@ -393,7 +393,7 @@ static void watchdog_nmi_disable(int cpu)
#else
static int watchdog_nmi_enable(int cpu) { return 0; }
static void watchdog_nmi_disable(int cpu) { return; }
#endif /* CONFIG_PERF_EVENTS_NMI */
#endif /* CONFIG_HARDLOCKUP_DETECTOR */

/* prepare/enable/disable routines */
static int watchdog_prepare_cpu(int cpu)
Expand Down
3 changes: 3 additions & 0 deletions trunk/lib/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ config LOCKUP_DETECTOR
generate interrupts and kick the watchdog task every 10-12 seconds.
An NMI is generated every 60 seconds or so to check for hardlockups.

config HARDLOCKUP_DETECTOR
def_bool LOCKUP_DETECTOR && PERF_EVENTS && HAVE_PERF_EVENTS_NMI

config BOOTPARAM_SOFTLOCKUP_PANIC
bool "Panic (Reboot) On Soft Lockups"
depends on LOCKUP_DETECTOR
Expand Down

0 comments on commit 69d193c

Please sign in to comment.