summaryrefslogtreecommitdiff
path: root/x86_64
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-08-13 01:00:37 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-08-13 01:00:37 +0200
commit940639858d782cf0349ce08c865cac7dfeadf4ff (patch)
tree23bca642eb01a37c4acd5c438a3ac6962af0707a /x86_64
parentd6ca407ed23159d161309740c5bf342d13edcc43 (diff)
IPI: Do not include support when NCPUS=1
Diffstat (limited to 'x86_64')
-rw-r--r--x86_64/interrupt.S4
-rw-r--r--x86_64/locore.S2
2 files changed, 6 insertions, 0 deletions
diff --git a/x86_64/interrupt.S b/x86_64/interrupt.S
index 74a25c49..fcd5a032 100644
--- a/x86_64/interrupt.S
+++ b/x86_64/interrupt.S
@@ -45,11 +45,13 @@ ENTRY(interrupt)
ret /* if so, just return */
1:
#endif
+#if NCPUS > 1
cmpl $CALL_PMAP_UPDATE,%eax /* was this a SMP pmap_update request? */
je _call_single
cmpl $CALL_AST_CHECK,%eax /* was this a SMP remote -> local ast request? */
je _call_local_ast
+#endif
subq $16,%rsp /* Two local variables */
movl %eax,S_IRQ /* save irq number */
@@ -125,6 +127,7 @@ _no_eoi:
addq $16,%rsp /* pop local variables */
ret
+#if NCPUS > 1
_call_single:
cli /* no nested interrupts */
call EXT(lapic_eoi) /* lapic EOI before the handler to allow extra update */
@@ -135,4 +138,5 @@ _call_local_ast:
call EXT(ast_check) /* AST check on this cpu */
call EXT(lapic_eoi) /* lapic EOI */
ret
+#endif
END(interrupt)
diff --git a/x86_64/locore.S b/x86_64/locore.S
index def73d89..a330d56b 100644
--- a/x86_64/locore.S
+++ b/x86_64/locore.S
@@ -769,8 +769,10 @@ INTERRUPT(21)
INTERRUPT(22)
INTERRUPT(23)
#endif
+#if NCPUS > 1
INTERRUPT(CALL_AST_CHECK)
INTERRUPT(CALL_PMAP_UPDATE)
+#endif
#ifdef APIC
/* Spurious interrupt, set irq number to vect number */
INTERRUPT(255)