X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=drivers%2Fchar%2Fhangcheck-timer.c;h=712d9f271aa6b8ed7026bca1594cc3b38052287f;hb=97eb89bb0e5d9ab20dbc677cb18fad1421473287;hp=81d811edf3c58ec478dd73cb239fd2714bb84f32;hpb=970d32443e3d0be57a5cdc3de3752f528424b73d;p=safe%2Fjmp%2Flinux-2.6 diff --git a/drivers/char/hangcheck-timer.c b/drivers/char/hangcheck-timer.c index 81d811e..712d9f2 100644 --- a/drivers/char/hangcheck-timer.c +++ b/drivers/char/hangcheck-timer.c @@ -26,7 +26,7 @@ * The hangcheck-timer driver uses the TSC to catch delays that * jiffies does not notice. A timer is set. When the timer fires, it * checks whether it was delayed and if that delay exceeds a given - * margin of error. The hangcheck_tick module paramter takes the timer + * margin of error. The hangcheck_tick module parameter takes the timer * duration in seconds. The hangcheck_margin parameter defines the * margin of error, in seconds. The defaults are 60 seconds for the * timer and 180 seconds for the margin of error. IOW, a timer is set @@ -44,12 +44,11 @@ #include #include #include -#include #include #include #include #include - +#include #define VERSION_STR "0.9.0" @@ -117,15 +116,12 @@ __setup("hcheck_reboot", hangcheck_parse_reboot); __setup("hcheck_dump_tasks", hangcheck_parse_dump_tasks); #endif /* not MODULE */ -#if defined(CONFIG_X86) || defined(CONFIG_X86_64) +#if defined(CONFIG_S390) # define HAVE_MONOTONIC # define TIMER_FREQ 1000000000ULL -#elif defined(CONFIG_ARCH_S390) -/* FA240000 is 1 Second in the IBM time universe (Page 4-38 Principles of Op for zSeries */ -# define TIMER_FREQ 0xFA240000ULL #elif defined(CONFIG_IA64) # define TIMER_FREQ ((unsigned long long)local_cpu_data->itc_freq) -#elif defined(CONFIG_PPC64) +#else # define TIMER_FREQ (HZ*loops_per_jiffy) #endif @@ -134,12 +130,7 @@ extern unsigned long long monotonic_clock(void); #else static inline unsigned long long monotonic_clock(void) { -# ifdef __s390__ - /* returns the TOD. see 4-38 Principles of Op of zSeries */ - return get_clock(); -# else return get_cycles(); -# endif /* __s390__ */ } #endif /* HAVE_MONOTONIC */ @@ -149,8 +140,7 @@ static unsigned long long hangcheck_tsc, hangcheck_tsc_margin; static void hangcheck_fire(unsigned long); -static struct timer_list hangcheck_ticktock = - TIMER_INITIALIZER(hangcheck_fire, 0, 0); +static DEFINE_TIMER(hangcheck_ticktock, hangcheck_fire, 0, 0); static void hangcheck_fire(unsigned long data) @@ -168,7 +158,7 @@ static void hangcheck_fire(unsigned long data) if (hangcheck_dump_tasks) { printk(KERN_CRIT "Hangcheck: Task state:\n"); #ifdef CONFIG_MAGIC_SYSRQ - handle_sysrq('t', NULL, NULL); + handle_sysrq('t', NULL); #endif /* CONFIG_MAGIC_SYSRQ */ } if (hangcheck_reboot) { @@ -189,8 +179,6 @@ static int __init hangcheck_init(void) VERSION_STR, hangcheck_tick, hangcheck_margin); #if defined (HAVE_MONOTONIC) printk("Hangcheck: Using monotonic_clock().\n"); -#elif defined(__s390__) - printk("Hangcheck: Using TOD.\n"); #else printk("Hangcheck: Using get_cycles().\n"); #endif /* HAVE_MONOTONIC */