forked from Imagelibrary/rtems
score: Add _SMP_Othercast_action()
This commit is contained in:
@@ -102,14 +102,12 @@ typedef struct {
|
||||
|
||||
static void a9mpcore_clock_secondary_action(void *arg)
|
||||
{
|
||||
if (!_Per_CPU_Is_boot_processor(_Per_CPU_Get())) {
|
||||
volatile a9mpcore_gt *gt = A9MPCORE_GT;
|
||||
a9mpcore_clock_init_data *init_data = arg;
|
||||
|
||||
a9mpcore_clock_gt_init(gt, init_data->cmpval, init_data->interval);
|
||||
bsp_interrupt_vector_enable(A9MPCORE_IRQ_GT);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void a9mpcore_clock_secondary_initialization(
|
||||
@@ -124,7 +122,7 @@ static void a9mpcore_clock_secondary_initialization(
|
||||
.interval = interval
|
||||
};
|
||||
|
||||
_SMP_Broadcast_action(a9mpcore_clock_secondary_action, &init_data);
|
||||
_SMP_Othercast_action(a9mpcore_clock_secondary_action, &init_data);
|
||||
|
||||
if (cmpval - a9mpcore_clock_get_counter(gt) >= interval) {
|
||||
bsp_fatal(BSP_ARM_A9MPCORE_FATAL_CLOCK_SMP_INIT);
|
||||
|
||||
@@ -122,14 +122,12 @@ static void arm_gt_clock_gt_init(uint64_t cval)
|
||||
#if defined(RTEMS_SMP) && !defined(CLOCK_DRIVER_USE_ONLY_BOOT_PROCESSOR)
|
||||
static void arm_gt_clock_secondary_action(void *arg)
|
||||
{
|
||||
if (!_Per_CPU_Is_boot_processor(_Per_CPU_Get())) {
|
||||
uint64_t *cval;
|
||||
|
||||
cval = arg;
|
||||
arm_gt_clock_gt_init(*cval);
|
||||
bsp_interrupt_vector_enable(arm_gt_clock_instance.irq);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void arm_gt_clock_secondary_initialization(uint64_t cval)
|
||||
|
||||
@@ -284,6 +284,21 @@ void _SMP_Broadcast_action(
|
||||
void *arg
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Initiates an SMP multicast action to the set of all online
|
||||
* processors excluding the current processor.
|
||||
*
|
||||
* Simply calls _SMP_Multicast_action() with _SMP_Get_online_processors() as
|
||||
* the target processor set excluding the current processor.
|
||||
*
|
||||
* @param handler The multicast action handler.
|
||||
* @param arg The multicast action argument.
|
||||
*/
|
||||
void _SMP_Othercast_action(
|
||||
SMP_Action_handler handler,
|
||||
void *arg
|
||||
);
|
||||
|
||||
#endif /* defined( RTEMS_SMP ) */
|
||||
|
||||
/**
|
||||
|
||||
@@ -258,3 +258,15 @@ void _SMP_Broadcast_action(
|
||||
{
|
||||
_SMP_Multicast_action( _SMP_Get_online_processors(), handler, arg );
|
||||
}
|
||||
|
||||
void _SMP_Othercast_action(
|
||||
SMP_Action_handler handler,
|
||||
void *arg
|
||||
)
|
||||
{
|
||||
Processor_mask targets;
|
||||
|
||||
_Processor_mask_Assign( &targets, _SMP_Get_online_processors() );
|
||||
_Processor_mask_Clear( &targets, _SMP_Get_current_processor() );
|
||||
_SMP_Multicast_action( &targets, handler, arg );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user