aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Glauber <jan.glauber@de.ibm.com>2006-02-01 06:06:34 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-01 11:53:24 -0500
commit3633b0475eb269dcb85923b23b321505f06b9488 (patch)
tree48e4f85a5f02ba4c56ebc7acbf963372f5f5f573
parent32f65f274602b43e8f48314e9769f254da1d8323 (diff)
[PATCH] s390: hangcheck timer support
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>
-rw-r--r--drivers/char/Kconfig2
-rw-r--r--drivers/char/hangcheck-timer.c12
-rw-r--r--drivers/s390/Kconfig7
3 files changed, 9 insertions, 12 deletions
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index 4135d8c5bcae..4c67727d75b1 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -992,7 +992,7 @@ config HPET_MMAP
992 992
993config HANGCHECK_TIMER 993config HANGCHECK_TIMER
994 tristate "Hangcheck timer" 994 tristate "Hangcheck timer"
995 depends on X86 || IA64 || PPC64 || S390 995 depends on X86 || IA64 || PPC64
996 help 996 help
997 The hangcheck-timer module detects when the system has gone 997 The hangcheck-timer module detects when the system has gone
998 out to lunch past a certain margin. It can reboot the system 998 out to lunch past a certain margin. It can reboot the system
diff --git a/drivers/char/hangcheck-timer.c b/drivers/char/hangcheck-timer.c
index 40a67c86420c..ac626418b329 100644
--- a/drivers/char/hangcheck-timer.c
+++ b/drivers/char/hangcheck-timer.c
@@ -117,12 +117,9 @@ __setup("hcheck_reboot", hangcheck_parse_reboot);
117__setup("hcheck_dump_tasks", hangcheck_parse_dump_tasks); 117__setup("hcheck_dump_tasks", hangcheck_parse_dump_tasks);
118#endif /* not MODULE */ 118#endif /* not MODULE */
119 119
120#if defined(CONFIG_X86) 120#if defined(CONFIG_X86) || defined(CONFIG_S390)
121# define HAVE_MONOTONIC 121# define HAVE_MONOTONIC
122# define TIMER_FREQ 1000000000ULL 122# define TIMER_FREQ 1000000000ULL
123#elif defined(CONFIG_S390)
124/* FA240000 is 1 Second in the IBM time universe (Page 4-38 Principles of Op for zSeries */
125# define TIMER_FREQ 0xFA240000ULL
126#elif defined(CONFIG_IA64) 123#elif defined(CONFIG_IA64)
127# define TIMER_FREQ ((unsigned long long)local_cpu_data->itc_freq) 124# define TIMER_FREQ ((unsigned long long)local_cpu_data->itc_freq)
128#elif defined(CONFIG_PPC64) 125#elif defined(CONFIG_PPC64)
@@ -134,12 +131,7 @@ extern unsigned long long monotonic_clock(void);
134#else 131#else
135static inline unsigned long long monotonic_clock(void) 132static inline unsigned long long monotonic_clock(void)
136{ 133{
137# ifdef __s390__
138 /* returns the TOD. see 4-38 Principles of Op of zSeries */
139 return get_clock();
140# else
141 return get_cycles(); 134 return get_cycles();
142# endif /* __s390__ */
143} 135}
144#endif /* HAVE_MONOTONIC */ 136#endif /* HAVE_MONOTONIC */
145 137
@@ -188,8 +180,6 @@ static int __init hangcheck_init(void)
188 VERSION_STR, hangcheck_tick, hangcheck_margin); 180 VERSION_STR, hangcheck_tick, hangcheck_margin);
189#if defined (HAVE_MONOTONIC) 181#if defined (HAVE_MONOTONIC)
190 printk("Hangcheck: Using monotonic_clock().\n"); 182 printk("Hangcheck: Using monotonic_clock().\n");
191#elif defined(__s390__)
192 printk("Hangcheck: Using TOD.\n");
193#else 183#else
194 printk("Hangcheck: Using get_cycles().\n"); 184 printk("Hangcheck: Using get_cycles().\n");
195#endif /* HAVE_MONOTONIC */ 185#endif /* HAVE_MONOTONIC */
diff --git a/drivers/s390/Kconfig b/drivers/s390/Kconfig
index a86a650f3d6d..721787cc5a1c 100644
--- a/drivers/s390/Kconfig
+++ b/drivers/s390/Kconfig
@@ -51,6 +51,13 @@ config UNIX98_PTY_COUNT
51 When not in use, each additional set of 256 PTYs occupy 51 When not in use, each additional set of 256 PTYs occupy
52 approximately 8 KB of kernel memory on 32-bit architectures. 52 approximately 8 KB of kernel memory on 32-bit architectures.
53 53
54config HANGCHECK_TIMER
55 tristate "Hangcheck timer"
56 help
57 The hangcheck-timer module detects when the system has gone
58 out to lunch past a certain margin. It can reboot the system
59 or merely print a warning.
60
54source "drivers/char/watchdog/Kconfig" 61source "drivers/char/watchdog/Kconfig"
55 62
56comment "S/390 character device drivers" 63comment "S/390 character device drivers"