[rtems commit] score: _SMP_Inter_processor_interrupt_handler()
Sebastian Huber
sebh at rtems.org
Wed Jul 25 08:09:28 UTC 2018
Module: rtems
Branch: master
Commit: 0d362ff397a42ec2fdae258a7cc61a8c07ffd8b5
Changeset: http://git.rtems.org/rtems/commit/?id=0d362ff397a42ec2fdae258a7cc61a8c07ffd8b5
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Jul 23 14:54:51 2018 +0200
score: _SMP_Inter_processor_interrupt_handler()
Pass current processor control via parameter since it may be already
available at the caller side.
---
bsps/arm/raspberrypi/irq/irq.c | 4 +++-
bsps/arm/shared/start/arm-a9mpcore-smp.c | 2 +-
bsps/i386/pc386/start/smp-imps.c | 2 +-
bsps/powerpc/qoriq/irq/irq.c | 2 +-
bsps/powerpc/qoriq/start/bspsmp.c | 2 +-
bsps/sparc/leon3/start/bspsmp.c | 2 +-
cpukit/include/rtems/score/smpimpl.h | 9 ++++-----
7 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/bsps/arm/raspberrypi/irq/irq.c b/bsps/arm/raspberrypi/irq/irq.c
index 5b10385..925596a 100644
--- a/bsps/arm/raspberrypi/irq/irq.c
+++ b/bsps/arm/raspberrypi/irq/irq.c
@@ -109,7 +109,9 @@ void bsp_interrupt_dispatch(void)
if ( local_source & BCM2836_IRQ_SOURCE_MBOX3 ) {
/* reset mailbox 3 contents to zero */
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 )
return;
diff --git a/bsps/arm/shared/start/arm-a9mpcore-smp.c b/bsps/arm/shared/start/arm-a9mpcore-smp.c
index a8d3a54..c255013 100644
--- a/bsps/arm/shared/start/arm-a9mpcore-smp.c
+++ b/bsps/arm/shared/start/arm-a9mpcore-smp.c
@@ -22,7 +22,7 @@
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)
diff --git a/bsps/i386/pc386/start/smp-imps.c b/bsps/i386/pc386/start/smp-imps.c
index 2ba3680..405f7f0 100644
--- a/bsps/i386/pc386/start/smp-imps.c
+++ b/bsps/i386/pc386/start/smp-imps.c
@@ -755,7 +755,7 @@ static void bsp_inter_processor_interrupt(void *arg)
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) {
Clock_isr(NULL);
diff --git a/bsps/powerpc/qoriq/irq/irq.c b/bsps/powerpc/qoriq/irq/irq.c
index 625b9fc..18ca074 100644
--- a/bsps/powerpc/qoriq/irq/irq.c
+++ b/bsps/powerpc/qoriq/irq/irq.c
@@ -100,7 +100,7 @@ void bsp_interrupt_dispatch(uintptr_t exception_number)
#ifdef RTEMS_SMP
if (exception_number == 36) {
- _SMP_Inter_processor_interrupt_handler();
+ _SMP_Inter_processor_interrupt_handler(_Per_CPU_Get());
return;
}
#endif
diff --git a/bsps/powerpc/qoriq/start/bspsmp.c b/bsps/powerpc/qoriq/start/bspsmp.c
index a2d9fbe..048275b 100644
--- a/bsps/powerpc/qoriq/start/bspsmp.c
+++ b/bsps/powerpc/qoriq/start/bspsmp.c
@@ -101,7 +101,7 @@ void bsp_start_on_secondary_processor(void)
#ifndef QORIQ_IS_HYPERVISOR_GUEST
static void bsp_inter_processor_interrupt(void *arg)
{
- _SMP_Inter_processor_interrupt_handler();
+ _SMP_Inter_processor_interrupt_handler(_Per_CPU_Get());
}
#endif
diff --git a/bsps/sparc/leon3/start/bspsmp.c b/bsps/sparc/leon3/start/bspsmp.c
index 280788f..1ef6e8e 100644
--- a/bsps/sparc/leon3/start/bspsmp.c
+++ b/bsps/sparc/leon3/start/bspsmp.c
@@ -32,7 +32,7 @@ static rtems_isr bsp_inter_processor_interrupt(
rtems_vector_number vector
)
{
- _SMP_Inter_processor_interrupt_handler();
+ _SMP_Inter_processor_interrupt_handler(_Per_CPU_Get());
}
void bsp_start_on_secondary_processor()
diff --git a/cpukit/include/rtems/score/smpimpl.h b/cpukit/include/rtems/score/smpimpl.h
index 48e6a12..fd92f65 100644
--- a/cpukit/include/rtems/score/smpimpl.h
+++ b/cpukit/include/rtems/score/smpimpl.h
@@ -165,12 +165,11 @@ void _SMP_Multicast_actions_process( void );
*
* @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;
-
- cpu_self = _Per_CPU_Get();
+ unsigned long message;
/*
* In the common case the inter-processor interrupt is issued to carry out a
More information about the vc
mailing list