summaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorClemens Ladisch2005-10-31 00:03:35 +0100
committerLinus Torvalds2005-10-31 02:37:29 +0100
commitf00c96f313b07d2eb2845305b9a3395e14385767 (patch)
tree94efe251de277aca3faf81b0334eb1c7eb5ca956 /arch/i386
parent[PATCH] hpet: allow shared interrupts (diff)
downloadkernel-qcow2-linux-f00c96f313b07d2eb2845305b9a3395e14385767.tar.gz
kernel-qcow2-linux-f00c96f313b07d2eb2845305b9a3395e14385767.tar.xz
kernel-qcow2-linux-f00c96f313b07d2eb2845305b9a3395e14385767.zip
[PATCH] hpet-RTC: disable interrupt when no longer needed
When the emulated RTC interrupt is no longer needed, we better disable it; otherwise, we get a spurious interrupt whenever the timer has rolled over and reaches the same comparator value. Having a superfluous interrupt every five minutes doesn't hurt much, but it's bad style anyway. ;-) Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Acked-by: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com> Cc: Andi Kleen <ak@muc.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/kernel/time_hpet.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/i386/kernel/time_hpet.c b/arch/i386/kernel/time_hpet.c
index 658c0629ba6a..23e81fcbeaea 100644
--- a/arch/i386/kernel/time_hpet.c
+++ b/arch/i386/kernel/time_hpet.c
@@ -319,8 +319,12 @@ static void hpet_rtc_timer_reinit(void)
{
unsigned int cfg, cnt;
- if (!(PIE_on | AIE_on | UIE_on))
+ if (unlikely(!(PIE_on | AIE_on | UIE_on))) {
+ cfg = hpet_readl(HPET_T1_CFG);
+ cfg &= ~HPET_TN_ENABLE;
+ hpet_writel(cfg, HPET_T1_CFG);
return;
+ }
if (PIE_on && (PIE_freq > DEFAULT_RTC_INT_FREQ))
hpet_rtc_int_freq = PIE_freq;