summaryrefslogtreecommitdiffstats
path: root/bsps/i386
diff options
context:
space:
mode:
authorJan Sommer <jan.sommer@dlr.de>2020-05-31 16:22:59 +0200
committerChris Johns <chrisj@rtems.org>2020-06-11 13:29:41 +1000
commit96d9823ddda26481bd0e8f8105826b7adf7fe121 (patch)
treec9e7dd555857afc04c1c1a42afb4e3bc3b3778d6 /bsps/i386
parentsmpsignal01: Change state before sending the signal (diff)
downloadrtems-96d9823ddda26481bd0e8f8105826b7adf7fe121.tar.bz2
bsp/pc386: Disable interrupt nesting for job handler
- Fixes timeout for smpipi01 where: + Main thread sends perform jobs to worker cpu while it is already performing jobs + Interrupt on worker cpu performs jobs, but with empty job list + Worker cpu continues to execut previous job and adds new job list to itself, which is never performed, since the interrupt has already been handled + Main thread blocks forever on barrier D
Diffstat (limited to 'bsps/i386')
-rw-r--r--bsps/i386/pc386/start/smp-imps.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/bsps/i386/pc386/start/smp-imps.c b/bsps/i386/pc386/start/smp-imps.c
index de593f3c40..0985b8f08f 100644
--- a/bsps/i386/pc386/start/smp-imps.c
+++ b/bsps/i386/pc386/start/smp-imps.c
@@ -768,7 +768,17 @@ static void bsp_inter_processor_interrupt(void *arg)
smp_apic_ack();
+ /*
+ * Disallow nesting.
+ */
+ __asm__ __volatile__("cli");
+
_SMP_Inter_processor_interrupt_handler(_Per_CPU_Get());
+
+ /*
+ * Allow nesting.
+ */
+ __asm__ __volatile__("sti");
}
void