diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-04-18 07:38:13 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-05-20 08:49:39 +0200 |
commit | 1a971d836cdb4b9b642b69a71817e2b14484f20d (patch) | |
tree | ec643ebabe7e37cadf4cee82b4ff9e2a9e0114ca /bsps | |
parent | score: Simplify _SMP_Multicast_action() (diff) | |
download | rtems-1a971d836cdb4b9b642b69a71817e2b14484f20d.tar.bz2 |
score: Remove SMP_MESSAGE_CLOCK_TICK
Use _SMP_Multicast_action() instead.
Diffstat (limited to 'bsps')
-rw-r--r-- | bsps/i386/pc386/clock/ckinit.c | 10 | ||||
-rw-r--r-- | bsps/i386/pc386/start/smp-imps.c | 11 |
2 files changed, 10 insertions, 11 deletions
diff --git a/bsps/i386/pc386/clock/ckinit.c b/bsps/i386/pc386/clock/ckinit.c index afd5d01f1e..478a37f5d7 100644 --- a/bsps/i386/pc386/clock/ckinit.c +++ b/bsps/i386/pc386/clock/ckinit.c @@ -29,6 +29,9 @@ #include <libcpu/cpuModel.h> #include <assert.h> #include <rtems/timecounter.h> +#ifdef RTEMS_SMP +#include <rtems/score/smpimpl.h> +#endif #define CLOCK_VECTOR 0 @@ -66,7 +69,12 @@ extern volatile uint32_t Clock_driver_ticks; #ifdef RTEMS_SMP #define Clock_driver_support_at_tick() \ - _SMP_Send_message_broadcast(SMP_MESSAGE_CLOCK_TICK) + do { \ + Processor_mask targets; \ + _Processor_mask_Assign(&targets, _SMP_Get_online_processors()); \ + _Processor_mask_Clear(&targets, _SMP_Get_current_processor()); \ + _SMP_Multicast_action(&targets, Clock_isr, NULL); \ + } while (0) #endif static uint32_t pc386_get_timecount_tsc(struct timecounter *tc) diff --git a/bsps/i386/pc386/start/smp-imps.c b/bsps/i386/pc386/start/smp-imps.c index d8b2dd3edc..0543b17ec5 100644 --- a/bsps/i386/pc386/start/smp-imps.c +++ b/bsps/i386/pc386/start/smp-imps.c @@ -744,22 +744,13 @@ static void smp_apic_ack(void) IMPS_LAPIC_WRITE(LAPIC_EOI, 0 ); /* ACK the interrupt */ } -/* FIXME: There should be a header file for this */ -void Clock_isr(void *arg); - static void bsp_inter_processor_interrupt(void *arg) { - unsigned long message; - (void) arg; smp_apic_ack(); - message = _SMP_Inter_processor_interrupt_handler(_Per_CPU_Get()); - - if ((message & SMP_MESSAGE_CLOCK_TICK) != 0) { - Clock_isr(NULL); - } + _SMP_Inter_processor_interrupt_handler(_Per_CPU_Get()); } static void ipi_install_irq(void) |