summaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2010-10-26 14:22:13 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-26 16:52:11 -0700
commit96e9694df446d1154ec2f4fdba8908588b9cba38 (patch)
tree09f667548a5e6bb465bdaac45d35d69b2cff9a39 /drivers/char/tpm
parenta56d5318716d120e040294bb258901ba89fb9c90 (diff)
downloadblackbird-op-linux-96e9694df446d1154ec2f4fdba8908588b9cba38.tar.gz
blackbird-op-linux-96e9694df446d1154ec2f4fdba8908588b9cba38.zip
hpet: fix unwanted interrupt due to stale irq status bit
Jaswinder Singh Rajput wrote: > By executing Documentation/timers/hpet_example.c > > for polling, I requested for 3 iterations but it seems iteration work > for only 2 as first expired time is always very small. > > # ./hpet_example poll /dev/hpet 10 3 > -hpet: executing poll > hpet_poll: info.hi_flags 0x0 > hpet_poll: expired time = 0x13 > hpet_poll: revents = 0x1 > hpet_poll: data 0x1 > hpet_poll: expired time = 0x1868c > hpet_poll: revents = 0x1 > hpet_poll: data 0x1 > hpet_poll: expired time = 0x18645 > hpet_poll: revents = 0x1 > hpet_poll: data 0x1 Clearing the HPET interrupt enable bit disables interrupt generation but does not disable the timer, so the interrupt status bit will still be set when the timer elapses. If another interrupt arrives before the timer has been correctly programmed (due to some other device on the same interrupt line, or CONFIG_DEBUG_SHIRQ), this results in an extra unwanted interrupt event because the status bit is likely to be set from comparator matches that happened before the device was opened. Therefore, we have to ensure that the interrupt status bit is and stays cleared until we actually program the timer. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Reported-by: Jaswinder Singh Rajput <jaswinderlinux@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: john stultz <johnstul@us.ibm.com> Cc: Bob Picco <bpicco@redhat.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/tpm')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud