diff options
author | Bernhard Walle <bwalle@suse.de> | 2008-01-15 10:44:38 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-15 10:44:38 -0500 |
commit | 8ee291f87c5dcebcf9c3a0ee4e021586897db364 (patch) | |
tree | e25b0847beb1834f6166458d7eaf1ae4bfb0944d /arch | |
parent | d43a3312c77eb6bbf71fbadefb1683f6d197bf91 (diff) |
x86: fix RTC_AIE with CONFIG_HPET_EMULATE_RTC
In the current code, RTC_AIE doesn't work if the RTC relies on
CONFIG_HPET_EMULATE_RTC because the code sets the RTC_AIE flag in
hpet_set_rtc_irq_bit(). The interrupt handles does accidentally check
for RTC_PIE and not RTC_AIE when comparing the time which was set in
hpet_set_alarm_time().
I now verified on a test system here that without the patch applied,
the attached test program fails on a system that has HPET with
2.6.24-rc7-default. That's not critical since I guess the problem has
been there for several kernel releases, but as the fix is quite
obvious.
Configuration is CONFIG_RTC=y and CONFIG_HPET_EMULATE_RTC=y.
Signed-off-by: Bernhard Walle <bwalle@suse.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/hpet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 4a86ffd67ec5..2f99ee206b95 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
@@ -657,7 +657,7 @@ irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id) | |||
657 | hpet_pie_count = 0; | 657 | hpet_pie_count = 0; |
658 | } | 658 | } |
659 | 659 | ||
660 | if (hpet_rtc_flags & RTC_PIE && | 660 | if (hpet_rtc_flags & RTC_AIE && |
661 | (curr_time.tm_sec == hpet_alarm_time.tm_sec) && | 661 | (curr_time.tm_sec == hpet_alarm_time.tm_sec) && |
662 | (curr_time.tm_min == hpet_alarm_time.tm_min) && | 662 | (curr_time.tm_min == hpet_alarm_time.tm_min) && |
663 | (curr_time.tm_hour == hpet_alarm_time.tm_hour)) | 663 | (curr_time.tm_hour == hpet_alarm_time.tm_hour)) |