diff options
author | Derek Basehore <dbasehore@chromium.org> | 2013-04-29 19:20:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 21:28:35 -0400 |
commit | e005715efaf674660ae59af83b13822567e3a758 (patch) | |
tree | c51aa76cb555ba879b5ba47975dcba7efb60825c /drivers/rtc | |
parent | a5ef73f06cb648c3f41edfb5920cbc208368e5bd (diff) |
drivers/rtc/rtc-cmos.c: don't disable hpet emulation on suspend
There's a bug where rtc alarms are ignored after the rtc cmos suspends
but before the system finishes suspend. Since hpet emulation is
disabled and it still handles the interrupts, a wake event is never
registered which is done from the rtc layer.
This patch reverts commit d1b2efa83fbf ("rtc: disable hpet emulation on
suspend") which disabled hpet emulation. To fix the problem mentioned
in that commit, hpet_rtc_timer_init() is called directly on resume.
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-cmos.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index af97c94e8a3a..cc5bea9c4b1c 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c | |||
@@ -804,9 +804,8 @@ static int cmos_suspend(struct device *dev) | |||
804 | mask = RTC_IRQMASK; | 804 | mask = RTC_IRQMASK; |
805 | tmp &= ~mask; | 805 | tmp &= ~mask; |
806 | CMOS_WRITE(tmp, RTC_CONTROL); | 806 | CMOS_WRITE(tmp, RTC_CONTROL); |
807 | hpet_mask_rtc_irq_bit(mask); | ||
807 | 808 | ||
808 | /* shut down hpet emulation - we don't need it for alarm */ | ||
809 | hpet_mask_rtc_irq_bit(RTC_PIE|RTC_AIE|RTC_UIE); | ||
810 | cmos_checkintr(cmos, tmp); | 809 | cmos_checkintr(cmos, tmp); |
811 | } | 810 | } |
812 | spin_unlock_irq(&rtc_lock); | 811 | spin_unlock_irq(&rtc_lock); |
@@ -870,6 +869,7 @@ static int cmos_resume(struct device *dev) | |||
870 | rtc_update_irq(cmos->rtc, 1, mask); | 869 | rtc_update_irq(cmos->rtc, 1, mask); |
871 | tmp &= ~RTC_AIE; | 870 | tmp &= ~RTC_AIE; |
872 | hpet_mask_rtc_irq_bit(RTC_AIE); | 871 | hpet_mask_rtc_irq_bit(RTC_AIE); |
872 | hpet_rtc_timer_init(); | ||
873 | } while (mask & RTC_AIE); | 873 | } while (mask & RTC_AIE); |
874 | spin_unlock_irq(&rtc_lock); | 874 | spin_unlock_irq(&rtc_lock); |
875 | } | 875 | } |