[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH gnumach] interrupt.S: No nested interrupts during IPIs && more x8
From: |
Damien Zammit |
Subject: |
[PATCH gnumach] interrupt.S: No nested interrupts during IPIs && more x86_64 smp support |
Date: |
Sat, 05 Aug 2023 15:48:53 +0000 |
---
i386/i386at/interrupt.S | 1 +
x86_64/interrupt.S | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/i386/i386at/interrupt.S b/i386/i386at/interrupt.S
index 55f4fa0f..1f661f8d 100644
--- a/i386/i386at/interrupt.S
+++ b/i386/i386at/interrupt.S
@@ -123,6 +123,7 @@ _no_eoi:
ret
_call_single:
+ cli /* no nested interrupts */
call EXT(lapic_eoi) /* lapic EOI before the handler to
allow extra update */
call EXT(pmap_update_interrupt) /* TODO: Allow other functions */
ret
diff --git a/x86_64/interrupt.S b/x86_64/interrupt.S
index 31f386ec..eabf934e 100644
--- a/x86_64/interrupt.S
+++ b/x86_64/interrupt.S
@@ -42,6 +42,9 @@ ENTRY(interrupt)
#ifdef APIC
cmpl $255,%eax /* was this a spurious intr? */
je _no_eoi /* if so, just return */
+
+ cmpl $CALL_SINGLE_FUNCTION_BASE,%eax /* was this a SMP call single
function request? */
+ je _call_single
#endif
subq $16,%rsp /* Two local variables */
movl %eax,S_IRQ /* save irq number */
@@ -112,6 +115,13 @@ ENTRY(interrupt)
_isa_eoi:
movl %ecx,%edi /* load irq number as 1st arg */
call EXT(ioapic_irq_eoi) /* ioapic irq specific EOI */
+ addq $16,%rsp /* pop local variables */
+ ret
+_call_single:
+ cli /* no nested interrupts */
+ call EXT(lapic_eoi) /* lapic EOI before the handler to
allow extra update */
+ call EXT(pmap_update_interrupt) /* TODO: Allow other functions */
+ ret
#endif
addq $16,%rsp /* pop local variables */
_no_eoi:
--
2.40.1
- [PATCH gnumach] interrupt.S: No nested interrupts during IPIs && more x86_64 smp support,
Damien Zammit <=