forked from Imagelibrary/rtems
score: Delete bsp_smp_broadcast_interrupt()
Since the per-CPU SMP lock must be acquired and released to send the message a single interrupt broadcast operations offers no benefits. If synchronization is required, then a SMP barrier must be used anyway.
This commit is contained in:
@@ -44,18 +44,6 @@ uint32_t _CPU_SMP_Initialize(uint32_t configured_cpu_count)
|
||||
return used_cpu_count;
|
||||
}
|
||||
|
||||
void bsp_smp_broadcast_interrupt(void)
|
||||
{
|
||||
/*
|
||||
* FIXME: This broadcasts the interrupt also to processors not used by RTEMS.
|
||||
*/
|
||||
rtems_status_code sc = arm_gic_irq_generate_software_irq(
|
||||
ARM_GIC_IRQ_SGI_0,
|
||||
ARM_GIC_IRQ_SOFTWARE_IRQ_TO_ALL_EXCEPT_SELF,
|
||||
0xff
|
||||
);
|
||||
}
|
||||
|
||||
void _CPU_SMP_Send_interrupt( uint32_t target_processor_index )
|
||||
{
|
||||
rtems_status_code sc = arm_gic_irq_generate_software_irq(
|
||||
|
||||
@@ -803,9 +803,3 @@ void _CPU_SMP_Send_interrupt( uint32_t target_processor_index )
|
||||
{
|
||||
send_ipi( target_processor_index, 0x30 );
|
||||
}
|
||||
|
||||
void bsp_smp_broadcast_interrupt(void)
|
||||
{
|
||||
/* Single broadcast interrupt */
|
||||
send_ipi( 0, LAPIC_ICR_DS_ALLEX | 0x30 );
|
||||
}
|
||||
|
||||
@@ -163,12 +163,6 @@ uint32_t _CPU_SMP_Initialize(uint32_t configured_cpu_count)
|
||||
return cores;
|
||||
}
|
||||
|
||||
void bsp_smp_broadcast_interrupt(void)
|
||||
{
|
||||
uint32_t self = ppc_processor_id();
|
||||
qoriq.pic.per_cpu [self].ipidr [IPI_INDEX].reg = ALL_CORES;
|
||||
}
|
||||
|
||||
void _CPU_SMP_Send_interrupt(uint32_t target_processor_index)
|
||||
{
|
||||
uint32_t self = ppc_processor_id();
|
||||
|
||||
@@ -9,11 +9,7 @@
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
#include <bsp.h>
|
||||
#include <rtems/bspIo.h>
|
||||
#include <rtems/bspsmp.h>
|
||||
#include <stdlib.h>
|
||||
#include <rtems/score/cpu.h>
|
||||
|
||||
uint32_t _CPU_SMP_Initialize( uint32_t configured_cpu_count )
|
||||
{
|
||||
@@ -21,16 +17,6 @@ uint32_t _CPU_SMP_Initialize( uint32_t configured_cpu_count )
|
||||
return 1;
|
||||
}
|
||||
|
||||
void bsp_smp_broadcast_interrupt(void)
|
||||
{
|
||||
}
|
||||
|
||||
void bsp_smp_broadcast_message(
|
||||
uint32_t message
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
void _CPU_SMP_Send_interrupt( uint32_t target_processor_index )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -93,19 +93,3 @@ void _CPU_SMP_Send_interrupt(uint32_t target_processor_index)
|
||||
/* send interrupt to destination CPU */
|
||||
LEON3_IrqCtrl_Regs->force[target_processor_index] = 1 << LEON3_MP_IRQ;
|
||||
}
|
||||
|
||||
void bsp_smp_broadcast_interrupt(void)
|
||||
{
|
||||
uint32_t dest_cpu;
|
||||
uint32_t cpu;
|
||||
uint32_t max_cpus;
|
||||
|
||||
cpu = rtems_smp_get_current_processor();
|
||||
max_cpus = rtems_smp_get_processor_count();
|
||||
|
||||
for ( dest_cpu=0 ; dest_cpu < max_cpus ; dest_cpu++ ) {
|
||||
if ( cpu != dest_cpu ) {
|
||||
_CPU_SMP_Send_interrupt( dest_cpu );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user