diff options
author | neel <neel@FreeBSD.org> | 2014-12-16 06:33:57 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2014-12-16 06:33:57 +0000 |
commit | bdae65463ea82ed7b759b8281c6380f93c274157 (patch) | |
tree | 205edc821801abfeb2f406d2e635e209da81e9b1 | |
parent | 5635c9143838206c285747b2246d524a5b5f02c1 (diff) | |
download | FreeBSD-src-bdae65463ea82ed7b759b8281c6380f93c274157.zip FreeBSD-src-bdae65463ea82ed7b759b8281c6380f93c274157.tar.gz |
For level triggered interrupts clear the PIC IRR bit when the interrupt pin
is deasserted. Prior to this change each assertion on a level triggered irq
pin resulted in two interrupts being delivered to the CPU.
Differential Revision: https://reviews.freebsd.org/D1310
Reviewed by: tychon
MFC after: 1 week
-rw-r--r-- | sys/amd64/vmm/io/vatpic.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/amd64/vmm/io/vatpic.c b/sys/amd64/vmm/io/vatpic.c index 54d8155..deef5a2 100644 --- a/sys/amd64/vmm/io/vatpic.c +++ b/sys/amd64/vmm/io/vatpic.c @@ -388,6 +388,8 @@ vatpic_set_pinstate(struct vatpic *vatpic, int pin, bool newstate) } else if (oldcnt == 1 && newcnt == 0) { /* falling edge */ VATPIC_CTR1(vatpic, "atpic pin%d: deasserted", pin); + if (level) + atpic->request &= ~(1 << (pin & 0x7)); } else { VATPIC_CTR3(vatpic, "atpic pin%d: %s, ignored, acnt %d", pin, newstate ? "asserted" : "deasserted", newcnt); |