[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1497.81.207.0.53.1177891613.squirrel@secure.samage.net>
Date: Mon, 30 Apr 2007 02:06:53 +0200 (CEST)
From: "Indan Zupancic" <indan@....nu>
To: tglx@...utronix.de
Cc: johnstul@...ibm.com, linux-kernel@...r.kernel.org
Subject: Re: [2.6.21] BUG: clocksource_watchdog isn't reset after resume
On Sun, April 29, 2007 21:25, Thomas Gleixner wrote:
> --- linux-2.6.orig/kernel/time/tick-common.c
> +++ linux-2.6/kernel/time/tick-common.c
> @@ -308,16 +308,20 @@ static void tick_suspend(void)
> spin_unlock_irqrestore(&tick_device_lock, flags);
> }
>
> -static void tick_resume(void)
> +static void tick_resume(int broadcast)
> {
> struct tick_device *td = &__get_cpu_var(tick_cpu_device);
> unsigned long flags;
>
> spin_lock_irqsave(&tick_device_lock, flags);
> - if (td->mode == TICKDEV_MODE_PERIODIC)
> - tick_setup_periodic(td->evtdev, 0);
> - else
> - tick_resume_oneshot();
> + clockevents_set_mode(td->evtdev, CLOCK_EVT_MODE_RESUME);
> +
> + if (!broadcast) {
> + if (td->mode == TICKDEV_MODE_PERIODIC)
> + tick_setup_periodic(td->evtdev, 0);
> + else
> + tick_resume_oneshot();
> + }
> spin_unlock_irqrestore(&tick_device_lock, flags);
> }
>
> @@ -327,6 +331,8 @@ static void tick_resume(void)
> static int tick_notify(struct notifier_block *nb, unsigned long reason,
> void *dev)
> {
> + int res;
> +
> switch (reason) {
>
> case CLOCK_EVT_NOTIFY_ADD:
> @@ -354,8 +360,8 @@ static int tick_notify(struct notifier_b
> break;
>
> case CLOCK_EVT_NOTIFY_RESUME:
> - if (!tick_resume_broadcast())
> - tick_resume();
> + res = tick_resume_broadcast();
> + tick_resume(res);
> break;
What about moving the tick_resume_broadcast() check into tick_resume() and
removing the parameter again? Something like the below:
--- tick-common.c 2007-04-30 01:45:19.000000000 +0200
+++ tick-common.c.iz 2007-04-30 01:45:14.000000000 +0200
@@ -308,7 +308,7 @@ static void tick_suspend(void)
spin_unlock_irqrestore(&tick_device_lock, flags);
}
-static void tick_resume(int broadcast)
+static void tick_resume(void)
{
struct tick_device *td = &__get_cpu_var(tick_cpu_device);
unsigned long flags;
@@ -316,7 +316,7 @@ static void tick_resume(int broadcast)
spin_lock_irqsave(&tick_device_lock, flags);
clockevents_set_mode(td->evtdev, CLOCK_EVT_MODE_RESUME);
- if (!broadcast) {
+ if (!tick_resume_broadcast()) {
if (td->mode == TICKDEV_MODE_PERIODIC)
tick_setup_periodic(td->evtdev, 0);
else
@@ -360,8 +360,7 @@ static int tick_notify(struct notifier_b
break;
case CLOCK_EVT_NOTIFY_RESUME:
- res = tick_resume_broadcast();
- tick_resume(res);
+ tick_resume();
break;
default:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists