summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-04-18 07:38:13 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-05-20 08:49:39 +0200
commit1a971d836cdb4b9b642b69a71817e2b14484f20d (patch)
treeec643ebabe7e37cadf4cee82b4ff9e2a9e0114ca
parentscore: Simplify _SMP_Multicast_action() (diff)
downloadrtems-1a971d836cdb4b9b642b69a71817e2b14484f20d.tar.bz2
score: Remove SMP_MESSAGE_CLOCK_TICK
Use _SMP_Multicast_action() instead.
-rw-r--r--bsps/i386/pc386/clock/ckinit.c10
-rw-r--r--bsps/i386/pc386/start/smp-imps.c11
-rw-r--r--cpukit/include/rtems/score/smpimpl.h10
3 files changed, 10 insertions, 21 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)
diff --git a/cpukit/include/rtems/score/smpimpl.h b/cpukit/include/rtems/score/smpimpl.h
index ecea1fda43..1b7841630b 100644
--- a/cpukit/include/rtems/score/smpimpl.h
+++ b/cpukit/include/rtems/score/smpimpl.h
@@ -58,16 +58,6 @@ extern "C" {
#define SMP_MESSAGE_PERFORM_JOBS 0x4UL
/**
- * @brief SMP message to request a clock tick.
- *
- * This message is provided for systems without a proper interrupt affinity
- * support and may be used by the clock driver.
- *
- * @see _SMP_Send_message().
- */
-#define SMP_MESSAGE_CLOCK_TICK 0x8UL
-
-/**
* @brief SMP fatal codes.
*/
typedef enum {