mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Indan Zupancic" <indan@nul.nu>
To: tglx@linutronix.de
Cc: johnstul@us.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [2.6.21] BUG: clocksource_watchdog isn't reset after resume
Date: Mon, 30 Apr 2007 02:06:53 +0200 (CEST)	[thread overview]
Message-ID: <1497.81.207.0.53.1177891613.squirrel@secure.samage.net> (raw)
In-Reply-To: <1177874733.5791.137.camel@localhost.localdomain>

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:



      parent reply	other threads:[~2007-04-30  0:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-29 16:20 Indan Zupancic
2007-04-29 19:25 ` Thomas Gleixner
2007-04-29 22:54   ` Indan Zupancic
2007-04-30  0:06   ` Indan Zupancic [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1497.81.207.0.53.1177891613.squirrel@secure.samage.net \
    --to=indan@nul.nu \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®