mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-18 18:23:00 +08:00
score: Remove SMP_MESSAGE_CLOCK_TICK
Use _SMP_Multicast_action() instead.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -57,16 +57,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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user