forked from Imagelibrary/rtems
score: Add _SMP_Othercast_action()
This commit is contained in:
@@ -102,13 +102,11 @@ typedef struct {
|
|||||||
|
|
||||||
static void a9mpcore_clock_secondary_action(void *arg)
|
static void a9mpcore_clock_secondary_action(void *arg)
|
||||||
{
|
{
|
||||||
if (!_Per_CPU_Is_boot_processor(_Per_CPU_Get())) {
|
|
||||||
volatile a9mpcore_gt *gt = A9MPCORE_GT;
|
volatile a9mpcore_gt *gt = A9MPCORE_GT;
|
||||||
a9mpcore_clock_init_data *init_data = arg;
|
a9mpcore_clock_init_data *init_data = arg;
|
||||||
|
|
||||||
a9mpcore_clock_gt_init(gt, init_data->cmpval, init_data->interval);
|
a9mpcore_clock_gt_init(gt, init_data->cmpval, init_data->interval);
|
||||||
bsp_interrupt_vector_enable(A9MPCORE_IRQ_GT);
|
bsp_interrupt_vector_enable(A9MPCORE_IRQ_GT);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -124,7 +122,7 @@ static void a9mpcore_clock_secondary_initialization(
|
|||||||
.interval = interval
|
.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) {
|
if (cmpval - a9mpcore_clock_get_counter(gt) >= interval) {
|
||||||
bsp_fatal(BSP_ARM_A9MPCORE_FATAL_CLOCK_SMP_INIT);
|
bsp_fatal(BSP_ARM_A9MPCORE_FATAL_CLOCK_SMP_INIT);
|
||||||
|
|||||||
@@ -122,13 +122,11 @@ static void arm_gt_clock_gt_init(uint64_t cval)
|
|||||||
#if defined(RTEMS_SMP) && !defined(CLOCK_DRIVER_USE_ONLY_BOOT_PROCESSOR)
|
#if defined(RTEMS_SMP) && !defined(CLOCK_DRIVER_USE_ONLY_BOOT_PROCESSOR)
|
||||||
static void arm_gt_clock_secondary_action(void *arg)
|
static void arm_gt_clock_secondary_action(void *arg)
|
||||||
{
|
{
|
||||||
if (!_Per_CPU_Is_boot_processor(_Per_CPU_Get())) {
|
|
||||||
uint64_t *cval;
|
uint64_t *cval;
|
||||||
|
|
||||||
cval = arg;
|
cval = arg;
|
||||||
arm_gt_clock_gt_init(*cval);
|
arm_gt_clock_gt_init(*cval);
|
||||||
bsp_interrupt_vector_enable(arm_gt_clock_instance.irq);
|
bsp_interrupt_vector_enable(arm_gt_clock_instance.irq);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -284,6 +284,21 @@ void _SMP_Broadcast_action(
|
|||||||
void *arg
|
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 ) */
|
#endif /* defined( RTEMS_SMP ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -258,3 +258,15 @@ void _SMP_Broadcast_action(
|
|||||||
{
|
{
|
||||||
_SMP_Multicast_action( _SMP_Get_online_processors(), handler, arg );
|
_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