All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 2.6.26-git] pm selftest:  rtc paranoia
@ 2008-07-25 20:26 David Brownell
  2008-07-25 21:49 ` Andrew Morton
  2008-07-25 21:49 ` Andrew Morton
  0 siblings, 2 replies; 8+ messages in thread
From: David Brownell @ 2008-07-25 20:26 UTC (permalink / raw)
  To: Andrew Morton, lkml, linux-pm

From: David Brownell <dbrownell@users.sourceforge.net>

Cope with a quirk of some RTCs (notably ACPI ones) which
aren't guaranteed to implement oneshot behavior when they
woke the system from sleeep:  forcibly disable the alarm,
just in case.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
---
 kernel/power/main.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/kernel/power/main.c	2008-07-22 16:38:32.000000000 -0700
+++ b/kernel/power/main.c	2008-07-22 16:39:15.000000000 -0700
@@ -635,6 +635,13 @@ static void __init test_wakealarm(struct
 	}
 	if (status < 0)
 		printk(err_suspend, status);
+
+	/* Some platforms can't detect that the alarm triggered the
+	 * wakeup, or (accordingly) disable it after it afterwards.
+	 * It's supposed to give oneshot behavior; cope.
+	 */
+	alm.enabled = false;
+	rtc_set_alarm(rtc, &alm);
 }
 
 static int __init has_wakealarm(struct device *dev, void *name_ptr)

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

* [patch 2.6.26-git] pm selftest:  rtc paranoia
@ 2008-07-25 20:26 David Brownell
  0 siblings, 0 replies; 8+ messages in thread
From: David Brownell @ 2008-07-25 20:26 UTC (permalink / raw)
  To: Andrew Morton, lkml, linux-pm

From: David Brownell <dbrownell@users.sourceforge.net>

Cope with a quirk of some RTCs (notably ACPI ones) which
aren't guaranteed to implement oneshot behavior when they
woke the system from sleeep:  forcibly disable the alarm,
just in case.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
---
 kernel/power/main.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/kernel/power/main.c	2008-07-22 16:38:32.000000000 -0700
+++ b/kernel/power/main.c	2008-07-22 16:39:15.000000000 -0700
@@ -635,6 +635,13 @@ static void __init test_wakealarm(struct
 	}
 	if (status < 0)
 		printk(err_suspend, status);
+
+	/* Some platforms can't detect that the alarm triggered the
+	 * wakeup, or (accordingly) disable it after it afterwards.
+	 * It's supposed to give oneshot behavior; cope.
+	 */
+	alm.enabled = false;
+	rtc_set_alarm(rtc, &alm);
 }
 
 static int __init has_wakealarm(struct device *dev, void *name_ptr)

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

* Re: [patch 2.6.26-git] pm selftest:  rtc paranoia
  2008-07-25 20:26 [patch 2.6.26-git] pm selftest: rtc paranoia David Brownell
@ 2008-07-25 21:49 ` Andrew Morton
  2008-07-25 21:49 ` Andrew Morton
  1 sibling, 0 replies; 8+ messages in thread
From: Andrew Morton @ 2008-07-25 21:49 UTC (permalink / raw)
  To: David Brownell; +Cc: linux-pm, linux-kernel

On Fri, 25 Jul 2008 13:26:51 -0700
David Brownell <david-b@pacbell.net> wrote:

> From: David Brownell <dbrownell@users.sourceforge.net>
> 
> Cope with a quirk of some RTCs (notably ACPI ones) which
> aren't guaranteed to implement oneshot behavior when they
> woke the system from sleeep:  forcibly disable the alarm,
> just in case.
> 
> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
> ---
>  kernel/power/main.c |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> --- a/kernel/power/main.c	2008-07-22 16:38:32.000000000 -0700
> +++ b/kernel/power/main.c	2008-07-22 16:39:15.000000000 -0700
> @@ -635,6 +635,13 @@ static void __init test_wakealarm(struct
>  	}
>  	if (status < 0)
>  		printk(err_suspend, status);
> +
> +	/* Some platforms can't detect that the alarm triggered the
> +	 * wakeup, or (accordingly) disable it after it afterwards.
> +	 * It's supposed to give oneshot behavior; cope.
> +	 */
> +	alm.enabled = false;
> +	rtc_set_alarm(rtc, &alm);
>  }
>  
>  static int __init has_wakealarm(struct device *dev, void *name_ptr)

I assume this fixes some reported bug?  Any references?

Is this needed in 2.6.26.x?  2.6.25.x?

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

* Re: [patch 2.6.26-git] pm selftest:  rtc paranoia
  2008-07-25 20:26 [patch 2.6.26-git] pm selftest: rtc paranoia David Brownell
  2008-07-25 21:49 ` Andrew Morton
@ 2008-07-25 21:49 ` Andrew Morton
  2008-07-25 21:50   ` Andrew Morton
                     ` (3 more replies)
  1 sibling, 4 replies; 8+ messages in thread
From: Andrew Morton @ 2008-07-25 21:49 UTC (permalink / raw)
  To: David Brownell; +Cc: linux-kernel, linux-pm

On Fri, 25 Jul 2008 13:26:51 -0700
David Brownell <david-b@pacbell.net> wrote:

> From: David Brownell <dbrownell@users.sourceforge.net>
> 
> Cope with a quirk of some RTCs (notably ACPI ones) which
> aren't guaranteed to implement oneshot behavior when they
> woke the system from sleeep:  forcibly disable the alarm,
> just in case.
> 
> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
> ---
>  kernel/power/main.c |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> --- a/kernel/power/main.c	2008-07-22 16:38:32.000000000 -0700
> +++ b/kernel/power/main.c	2008-07-22 16:39:15.000000000 -0700
> @@ -635,6 +635,13 @@ static void __init test_wakealarm(struct
>  	}
>  	if (status < 0)
>  		printk(err_suspend, status);
> +
> +	/* Some platforms can't detect that the alarm triggered the
> +	 * wakeup, or (accordingly) disable it after it afterwards.
> +	 * It's supposed to give oneshot behavior; cope.
> +	 */
> +	alm.enabled = false;
> +	rtc_set_alarm(rtc, &alm);
>  }
>  
>  static int __init has_wakealarm(struct device *dev, void *name_ptr)

I assume this fixes some reported bug?  Any references?

Is this needed in 2.6.26.x?  2.6.25.x?

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

* Re: [patch 2.6.26-git] pm selftest:  rtc paranoia
  2008-07-25 21:49 ` Andrew Morton
@ 2008-07-25 21:50   ` Andrew Morton
  2008-07-25 21:50   ` Andrew Morton
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Andrew Morton @ 2008-07-25 21:50 UTC (permalink / raw)
  To: david-b, linux-kernel, linux-pm

On Fri, 25 Jul 2008 14:49:46 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:

> >  	}
> >  	if (status < 0)
> >  		printk(err_suspend, status);
> > +
> > +	/* Some platforms can't detect that the alarm triggered the
> > +	 * wakeup, or (accordingly) disable it after it afterwards.
> > +	 * It's supposed to give oneshot behavior; cope.
> > +	 */
> > +	alm.enabled = false;
> > +	rtc_set_alarm(rtc, &alm);
> >  }
> >  
> >  static int __init has_wakealarm(struct device *dev, void *name_ptr)
> 
> I assume this fixes some reported bug?  Any references?
> 
> Is this needed in 2.6.26.x?  2.6.25.x?

oh.  pm-selftest is new.  Ignore me.

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

* Re: [patch 2.6.26-git] pm selftest:  rtc paranoia
  2008-07-25 21:49 ` Andrew Morton
  2008-07-25 21:50   ` Andrew Morton
@ 2008-07-25 21:50   ` Andrew Morton
  2008-07-25 22:22   ` David Brownell
  2008-07-25 22:22   ` David Brownell
  3 siblings, 0 replies; 8+ messages in thread
From: Andrew Morton @ 2008-07-25 21:50 UTC (permalink / raw)
  To: david-b, linux-kernel, linux-pm

On Fri, 25 Jul 2008 14:49:46 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:

> >  	}
> >  	if (status < 0)
> >  		printk(err_suspend, status);
> > +
> > +	/* Some platforms can't detect that the alarm triggered the
> > +	 * wakeup, or (accordingly) disable it after it afterwards.
> > +	 * It's supposed to give oneshot behavior; cope.
> > +	 */
> > +	alm.enabled = false;
> > +	rtc_set_alarm(rtc, &alm);
> >  }
> >  
> >  static int __init has_wakealarm(struct device *dev, void *name_ptr)
> 
> I assume this fixes some reported bug?  Any references?
> 
> Is this needed in 2.6.26.x?  2.6.25.x?

oh.  pm-selftest is new.  Ignore me.

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

* Re: [patch 2.6.26-git] pm selftest:  rtc paranoia
  2008-07-25 21:49 ` Andrew Morton
  2008-07-25 21:50   ` Andrew Morton
  2008-07-25 21:50   ` Andrew Morton
@ 2008-07-25 22:22   ` David Brownell
  2008-07-25 22:22   ` David Brownell
  3 siblings, 0 replies; 8+ messages in thread
From: David Brownell @ 2008-07-25 22:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-pm, linux-kernel

On Friday 25 July 2008, Andrew Morton wrote:
> On Fri, 25 Jul 2008 13:26:51 -0700
> David Brownell <david-b@pacbell.net> wrote:
> 
> > From: David Brownell <dbrownell@users.sourceforge.net>
> > 
> > Cope with a quirk of some RTCs (notably ACPI ones) which
> > aren't guaranteed to implement oneshot behavior when they
> > woke the system from sleeep:  forcibly disable the alarm,
> > just in case.
> > 
> > ...
> 
> I assume this fixes some reported bug?  Any references?

It's more paranoia than anything else ... I saw a version
of this with on x86, but that was because of problems in
the HPET glue (fixed by a previous patch).

 
> Is this needed in 2.6.26.x?  2.6.25.x?

The selftest only merged this week, so not 2.6.25;
and since it's just paranoia, it shouldn't be critical
for 2.6.26 either.

- Dave

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

* Re: [patch 2.6.26-git] pm selftest:  rtc paranoia
  2008-07-25 21:49 ` Andrew Morton
                     ` (2 preceding siblings ...)
  2008-07-25 22:22   ` David Brownell
@ 2008-07-25 22:22   ` David Brownell
  3 siblings, 0 replies; 8+ messages in thread
From: David Brownell @ 2008-07-25 22:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-pm

On Friday 25 July 2008, Andrew Morton wrote:
> On Fri, 25 Jul 2008 13:26:51 -0700
> David Brownell <david-b@pacbell.net> wrote:
> 
> > From: David Brownell <dbrownell@users.sourceforge.net>
> > 
> > Cope with a quirk of some RTCs (notably ACPI ones) which
> > aren't guaranteed to implement oneshot behavior when they
> > woke the system from sleeep:  forcibly disable the alarm,
> > just in case.
> > 
> > ...
> 
> I assume this fixes some reported bug?  Any references?

It's more paranoia than anything else ... I saw a version
of this with on x86, but that was because of problems in
the HPET glue (fixed by a previous patch).

 
> Is this needed in 2.6.26.x?  2.6.25.x?

The selftest only merged this week, so not 2.6.25;
and since it's just paranoia, it shouldn't be critical
for 2.6.26 either.

- Dave




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

end of thread, other threads:[~2008-07-25 22:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-25 20:26 [patch 2.6.26-git] pm selftest: rtc paranoia David Brownell
2008-07-25 21:49 ` Andrew Morton
2008-07-25 21:49 ` Andrew Morton
2008-07-25 21:50   ` Andrew Morton
2008-07-25 21:50   ` Andrew Morton
2008-07-25 22:22   ` David Brownell
2008-07-25 22:22   ` David Brownell
  -- strict thread matches above, loose matches on Subject: below --
2008-07-25 20:26 David Brownell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.