linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] watchdog: s3c2410_wdt: Only register for cpufreq on CPU_FREQ_S3C24XX
@ 2013-11-25 22:55 Doug Anderson
  2013-11-25 23:23 ` Guenter Roeck
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Doug Anderson @ 2013-11-25 22:55 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: Leela Krishna Amudala, Olof Johansson, Tomasz Figa, Kukjin Kim,
	Doug Anderson, Ben Dooks, linux-arm-kernel, linux-samsung-soc,
	linux-watchdog, linux-kernel

On modern SoCs the watchdog timer is parented on a clock that doesn't
change every time we have a cpufreq change.  That means we don't need
to constantly adjust the watchdog timer, so avoid registering for and
dealing with cpufreq transitions unless we've actually got
CPU_FREQ_S3C24XX defined.

Note that this is more than just an optimization.  The s3c2410
watchdog driver actually pats the watchdog on every CPU frequency
change.  On modern systems these happen many times per second (even in
a system where "nothing" is happening).  That effectively makes any
userspace watchdog program useless (the watchdog is constantly patted
by the kernel).  If we need CPU_FREQ_S3C24XX defined on a
multiplatform kernel we'll need to make sure that kernel supports
common clock and change this to user common clock framework.

Signed-off-by: Doug Anderson <dianders@chromium.org>
---
 drivers/watchdog/s3c2410_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
index 7d8fd04..4980f84 100644
--- a/drivers/watchdog/s3c2410_wdt.c
+++ b/drivers/watchdog/s3c2410_wdt.c
@@ -264,7 +264,7 @@ static irqreturn_t s3c2410wdt_irq(int irqno, void *param)
 	return IRQ_HANDLED;
 }
 
-#ifdef CONFIG_CPU_FREQ
+#ifdef CONFIG_CPU_FREQ_S3C24XX
 
 static int s3c2410wdt_cpufreq_transition(struct notifier_block *nb,
 					  unsigned long val, void *data)
-- 
1.8.4.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-01-08 19:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-25 22:55 [PATCH] watchdog: s3c2410_wdt: Only register for cpufreq on CPU_FREQ_S3C24XX Doug Anderson
2013-11-25 23:23 ` Guenter Roeck
2013-11-25 23:27   ` Tomasz Figa
2013-11-25 23:28   ` Doug Anderson
2013-11-25 23:31     ` Tomasz Figa
2013-11-25 23:36 ` [PATCH v2] watchdog: s3c2410_wdt: Only register for cpufreq on ARM_S3C24XX_CPUFREQ Doug Anderson
2013-11-26  0:03   ` Tomasz Figa
2013-11-26 18:14   ` Guenter Roeck
2014-01-08 19:54   ` Wim Van Sebroeck
2013-11-26  0:08 ` [PATCH] watchdog: s3c2410_wdt: Only register for cpufreq on CPU_FREQ_S3C24XX Ben Dooks
2013-11-26  0:16   ` Tomasz Figa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).