aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hangcheck-timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/hangcheck-timer.c')
-rw-r--r--drivers/char/hangcheck-timer.c12
1 files changed, 1 insertions, 11 deletions
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 */