From: Derek Basehore <[email protected]>
Subject: 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 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 <[email protected]>
Cc: Maxim Levitsky <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---
drivers/rtc/rtc-cmos.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -puN
drivers/rtc/rtc-cmos.c~drivers-rtc-rtc-cmosc-dont-disable-hpet-emulation-on-suspend
drivers/rtc/rtc-cmos.c
---
a/drivers/rtc/rtc-cmos.c~drivers-rtc-rtc-cmosc-dont-disable-hpet-emulation-on-suspend
+++ a/drivers/rtc/rtc-cmos.c
@@ -804,9 +804,8 @@ static int cmos_suspend(struct device *d
mask = RTC_IRQMASK;
tmp &= ~mask;
CMOS_WRITE(tmp, RTC_CONTROL);
+ hpet_mask_rtc_irq_bit(mask);
- /* shut down hpet emulation - we don't need it for alarm */
- hpet_mask_rtc_irq_bit(RTC_PIE|RTC_AIE|RTC_UIE);
cmos_checkintr(cmos, tmp);
}
spin_unlock_irq(&rtc_lock);
@@ -870,6 +869,7 @@ static int cmos_resume(struct device *de
rtc_update_irq(cmos->rtc, 1, mask);
tmp &= ~RTC_AIE;
hpet_mask_rtc_irq_bit(RTC_AIE);
+ hpet_rtc_timer_init();
} while (mask & RTC_AIE);
spin_unlock_irq(&rtc_lock);
}
_
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html