]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] s390: hangcheck timer support
authorJan Glauber <jan.glauber@de.ibm.com>
Wed, 1 Feb 2006 11:06:34 +0000 (03:06 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 1 Feb 2006 16:53:24 +0000 (08:53 -0800)
Remove useless s390 define from hangcheck-timer, remove wrong definition of a
TOD second and other s390 ifdefs.  Use monotonic_clock instead.

Add hangcheck-timer option, copied from drivers/char/Kconfig.  This is ugly
but unless we have a big Kconfig cleanup we cannot include
drivers/char/Kconfig...

Signed-off-by: Jan Glauber <jan.glauber@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/Kconfig
drivers/char/hangcheck-timer.c
drivers/s390/Kconfig

index 4135d8c5bcae1e2d6f4278764bb42a6bbea13a33..4c67727d75b146f50fb8e0b368334af711cca314 100644 (file)
@@ -992,7 +992,7 @@ config HPET_MMAP
 
 config HANGCHECK_TIMER
        tristate "Hangcheck timer"
-       depends on X86 || IA64 || PPC64 || S390
+       depends on X86 || IA64 || PPC64
        help
          The hangcheck-timer module detects when the system has gone
          out to lunch past a certain margin.  It can reboot the system
index 40a67c86420ccc4540c54b5c18b050e2e3338b3c..ac626418b3290e060c5feed990bbe8236ba626d6 100644 (file)
@@ -117,12 +117,9 @@ __setup("hcheck_reboot", hangcheck_parse_reboot);
 __setup("hcheck_dump_tasks", hangcheck_parse_dump_tasks);
 #endif /* not MODULE */
 
-#if defined(CONFIG_X86)
+#if defined(CONFIG_X86) || defined(CONFIG_S390)
 # define HAVE_MONOTONIC
 # define TIMER_FREQ 1000000000ULL
-#elif defined(CONFIG_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)
@@ -134,12 +131,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 */
 
@@ -188,8 +180,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 */
index a86a650f3d6df13684cb07526469d9e8e7d283e3..721787cc5a1c71ef69e50d777cef841ccf23c637 100644 (file)
@@ -51,6 +51,13 @@ config UNIX98_PTY_COUNT
          When not in use, each additional set of 256 PTYs occupy
          approximately 8 KB of kernel memory on 32-bit architectures.
 
+config HANGCHECK_TIMER
+       tristate "Hangcheck timer"
+       help
+         The hangcheck-timer module detects when the system has gone
+         out to lunch past a certain margin.  It can reboot the system
+         or merely print a warning.
+
 source "drivers/char/watchdog/Kconfig"
 
 comment "S/390 character device drivers"