mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-30 01:49:55 +08:00
@@ -100,7 +100,7 @@ static void restart_interrupt(void *arg)
|
||||
static void raise_restart_interrupt(void)
|
||||
{
|
||||
qoriq.pic.ipidr[RESTART_IPI_INDEX].reg =
|
||||
_Processor_mask_To_uint32_t(&_SMP_Online_processors, 0);
|
||||
_Processor_mask_To_uint32_t(_SMP_Get_online_processors(), 0);
|
||||
ppc_synchronize_data();
|
||||
ppc_synchronize_instructions();
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ static void Clock_driver_timecounter_tick( void )
|
||||
|
||||
if ( _Per_CPU_Is_boot_processor( cpu ) ) {
|
||||
rtems_timecounter_tick();
|
||||
} else if ( _Processor_mask_Is_set( &_SMP_Online_processors, cpu_index ) ) {
|
||||
} else if ( _Processor_mask_Is_set( _SMP_Get_online_processors(), cpu_index ) ) {
|
||||
_Watchdog_Tick( cpu );
|
||||
}
|
||||
}
|
||||
@@ -227,7 +227,9 @@ rtems_device_driver Clock_initialize(
|
||||
Clock_driver_support_install_isr( Clock_isr, Old_ticker );
|
||||
|
||||
#ifdef RTEMS_SMP
|
||||
Clock_driver_support_set_interrupt_affinity( &_SMP_Online_processors );
|
||||
Clock_driver_support_set_interrupt_affinity(
|
||||
_SMP_Get_online_processors()
|
||||
);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -451,7 +451,7 @@ static void gptimer_tlib_irq_reg(struct tlib_dev *hand, tlib_isr_t func, void *d
|
||||
tindex = timer->tindex;
|
||||
}
|
||||
drvmgr_interrupt_set_affinity(priv->dev, tindex,
|
||||
_SMP_Online_processors);
|
||||
_SMP_Get_online_processors());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -335,6 +335,15 @@ bool _SMP_Before_multitasking_action_broadcast(
|
||||
do { } while ( 0 )
|
||||
#endif
|
||||
|
||||
RTEMS_INLINE_ROUTINE const Processor_mask *_SMP_Get_online_processors( void )
|
||||
{
|
||||
#if defined(RTEMS_SMP)
|
||||
return &_SMP_Online_processors;
|
||||
#else
|
||||
return &_Processor_mask_The_one_and_only.
|
||||
#endif
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -106,7 +106,7 @@ void _SMP_Multicast_action(
|
||||
}
|
||||
|
||||
if( cpus == NULL ) {
|
||||
_Processor_mask_Assign( &targets, &_SMP_Online_processors );
|
||||
_Processor_mask_Assign( &targets, _SMP_Get_online_processors() );
|
||||
} else {
|
||||
_Processor_mask_Zero( &targets );
|
||||
|
||||
|
||||
@@ -248,7 +248,10 @@ bool _Thread_Initialize(
|
||||
RTEMS_STATIC_ASSERT( THREAD_SCHEDULER_BLOCKED == 0, Scheduler_state );
|
||||
the_thread->Scheduler.home = scheduler;
|
||||
_ISR_lock_Initialize( &the_thread->Scheduler.Lock, "Thread Scheduler" );
|
||||
_Processor_mask_Assign( &the_thread->Scheduler.Affinity, &_SMP_Online_processors );
|
||||
_Processor_mask_Assign(
|
||||
&the_thread->Scheduler.Affinity,
|
||||
_SMP_Get_online_processors()
|
||||
);
|
||||
_ISR_lock_Initialize( &the_thread->Wait.Lock.Default, "Thread Wait Default" );
|
||||
_Thread_queue_Gate_open( &the_thread->Wait.Lock.Tranquilizer );
|
||||
_RBTree_Initialize_node( &the_thread->Wait.Link.Registry_node );
|
||||
|
||||
@@ -162,7 +162,7 @@ static void test_send_message_flood(
|
||||
|
||||
for (cpu_index = 0; cpu_index < cpu_count; ++cpu_index) {
|
||||
rtems_test_assert(
|
||||
_Processor_mask_Is_set(&_SMP_Online_processors, cpu_index)
|
||||
_Processor_mask_Is_set(_SMP_Get_online_processors(), cpu_index)
|
||||
);
|
||||
|
||||
printf(
|
||||
@@ -176,7 +176,7 @@ static void test_send_message_flood(
|
||||
|
||||
for (; cpu_index < CPU_COUNT; ++cpu_index) {
|
||||
rtems_test_assert(
|
||||
!_Processor_mask_Is_set(&_SMP_Online_processors, cpu_index)
|
||||
!_Processor_mask_Is_set(_SMP_Get_online_processors(), cpu_index)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user