summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2021-04-05 15:29:15 +1000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-04-05 11:59:56 +0200
commit417f458488e4802cc3f2658c1b241a5e0053df46 (patch)
tree62b4ed1c8ca7ee948bebb20595ceffe44f63d0ec
parent059c0e5970ebc5a56fd8abc458e0b26a5a26dc53 (diff)
Don't call EOI on spurious interrupts
Message-Id: <20210405052916.174771-4-damien@zamaudio.com>
-rw-r--r--i386/i386at/interrupt.S9
-rw-r--r--x86_64/interrupt.S9
2 files changed, 6 insertions, 12 deletions
diff --git a/i386/i386at/interrupt.S b/i386/i386at/interrupt.S
index da0eb044..cb314d32 100644
--- a/i386/i386at/interrupt.S
+++ b/i386/i386at/interrupt.S
@@ -33,7 +33,7 @@
ENTRY(interrupt)
#ifdef APIC
cmpl $255,%eax /* was this a spurious intr? */
- je _null_eoi /* if so, null eoi handler */
+ je _no_eoi /* if so, just return */
#endif
pushl %eax /* save irq number */
movl %eax,%ecx /* copy irq number */
@@ -87,16 +87,13 @@ ENTRY(interrupt)
ret
#else
cmpl $16,%ecx /* was this a low ISA intr? */
- jl _isa_eoi /* no, must be PCI */
- ret /* NB: let irq_acknowledge handle pci EOI */
+ jge _no_eoi /* no, must be PCI (let irq_ack handle EOI) */
_isa_eoi:
pushl %ecx /* push irq number */
call EXT(ioapic_irq_eoi) /* ioapic irq specific EOI */
addl $4,%esp /* pop irq number */
call EXT(lapic_eoi) /* lapic broadcast EOI */
- ret
-_null_eoi:
- call EXT(lapic_eoi) /* lapic broadcast EOI */
+_no_eoi:
ret
#endif
END(interrupt)
diff --git a/x86_64/interrupt.S b/x86_64/interrupt.S
index 779eae67..0dfda313 100644
--- a/x86_64/interrupt.S
+++ b/x86_64/interrupt.S
@@ -33,7 +33,7 @@
ENTRY(interrupt)
#ifdef APIC
cmpl $255,%eax /* was this a spurious intr? */
- je _null_eoi /* if so, null eoi handler */
+ je _no_eoi /* if so, just return */
#endif
pushq %rax /* save irq number */
call spl7 /* set ipl */
@@ -92,15 +92,12 @@ ENTRY(interrupt)
ret
#else
cmpl $16,%ecx /* was this a low ISA intr? */
- jl _isa_eoi /* no, must be PCI */
- ret /* NB: let irq_acknowledge handle pci EOI */
+ jge _no_eoi /* no, must be PCI (let irq_ack handle EOI) */
_isa_eoi:
movl %ecx,%edi /* load irq number as 1st arg */
call EXT(ioapic_irq_eoi) /* ioapic irq specific EOI */
call EXT(lapic_eoi) /* lapic broadcast EOI */
- ret
-_null_eoi:
- call EXT(lapic_eoi) /* lapic broadcast EOI */
+_no_eoi:
ret
#endif
END(interrupt)