score: _SMP_Inter_processor_interrupt_handler()

Pass current processor control via parameter since it may be already
available at the caller side.
This commit is contained in:
Sebastian Huber
2018-07-23 14:54:51 +02:00
parent f8d00a3f19
commit 0d362ff397
7 changed files with 12 additions and 11 deletions

View File

@@ -109,7 +109,9 @@ void bsp_interrupt_dispatch(void)
if ( local_source & BCM2836_IRQ_SOURCE_MBOX3 ) { if ( local_source & BCM2836_IRQ_SOURCE_MBOX3 ) {
/* reset mailbox 3 contents to zero */ /* reset mailbox 3 contents to zero */
BCM2835_REG(BCM2836_MAILBOX_3_READ_CLEAR_BASE + 0x10 * cpu_index_self) = 0xffffffff; BCM2835_REG(BCM2836_MAILBOX_3_READ_CLEAR_BASE + 0x10 * cpu_index_self) = 0xffffffff;
_SMP_Inter_processor_interrupt_handler(); _SMP_Inter_processor_interrupt_handler(
_Per_CPU_Get_by_index(cpu_index_self)
);
} }
if ( cpu_index_self != 0 ) if ( cpu_index_self != 0 )
return; return;

View File

@@ -22,7 +22,7 @@
static void bsp_inter_processor_interrupt(void *arg) static void bsp_inter_processor_interrupt(void *arg)
{ {
_SMP_Inter_processor_interrupt_handler(); _SMP_Inter_processor_interrupt_handler(_Per_CPU_Get());
} }
uint32_t _CPU_SMP_Initialize(void) uint32_t _CPU_SMP_Initialize(void)

View File

@@ -755,7 +755,7 @@ static void bsp_inter_processor_interrupt(void *arg)
smp_apic_ack(); smp_apic_ack();
message = _SMP_Inter_processor_interrupt_handler(); message = _SMP_Inter_processor_interrupt_handler(_Per_CPU_Get());
if ((message & SMP_MESSAGE_CLOCK_TICK) != 0) { if ((message & SMP_MESSAGE_CLOCK_TICK) != 0) {
Clock_isr(NULL); Clock_isr(NULL);

View File

@@ -100,7 +100,7 @@ void bsp_interrupt_dispatch(uintptr_t exception_number)
#ifdef RTEMS_SMP #ifdef RTEMS_SMP
if (exception_number == 36) { if (exception_number == 36) {
_SMP_Inter_processor_interrupt_handler(); _SMP_Inter_processor_interrupt_handler(_Per_CPU_Get());
return; return;
} }
#endif #endif

View File

@@ -101,7 +101,7 @@ void bsp_start_on_secondary_processor(void)
#ifndef QORIQ_IS_HYPERVISOR_GUEST #ifndef QORIQ_IS_HYPERVISOR_GUEST
static void bsp_inter_processor_interrupt(void *arg) static void bsp_inter_processor_interrupt(void *arg)
{ {
_SMP_Inter_processor_interrupt_handler(); _SMP_Inter_processor_interrupt_handler(_Per_CPU_Get());
} }
#endif #endif

View File

@@ -32,7 +32,7 @@ static rtems_isr bsp_inter_processor_interrupt(
rtems_vector_number vector rtems_vector_number vector
) )
{ {
_SMP_Inter_processor_interrupt_handler(); _SMP_Inter_processor_interrupt_handler(_Per_CPU_Get());
} }
void bsp_start_on_secondary_processor() void bsp_start_on_secondary_processor()

View File

@@ -165,13 +165,12 @@ void _SMP_Multicast_actions_process( void );
* *
* @return The received message. * @return The received message.
*/ */
static inline long unsigned _SMP_Inter_processor_interrupt_handler( void ) static inline long unsigned _SMP_Inter_processor_interrupt_handler(
Per_CPU_Control *cpu_self
)
{ {
Per_CPU_Control *cpu_self;
unsigned long message; unsigned long message;
cpu_self = _Per_CPU_Get();
/* /*
* In the common case the inter-processor interrupt is issued to carry out a * In the common case the inter-processor interrupt is issued to carry out a
* thread dispatch. * thread dispatch.