[PATCH 11 minor addeum] arm/raspberrypi: GPIO - using RTEMS interrupt lock during BSP

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Sep 7 07:27:21 UTC 2016



On 07/09/16 08:52, Pavel Pisa wrote:
>> The smpfatal08 test is quite a hack since it re-defines some global SMP
>> >support functions locally. In order to support this, the ARM BSPs must
>> >place the _CPU_SMP_Start_processor() function as the only global
>> >function into the bspsmp.c file.
> I expected that
>
> CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
>
> in BSP and linker -Wl,--gc-section could/sould resolve that.
>
> So should I divide bspsmp.c into two files?
>
> For example, bspsmp-startcpu.c, bspsmp-init.c.
>
> What about
>
> uint32_t _CPU_SMP_Initialize(void)
> {
>    uint32_t cpu_count = (uint32_t)bsp_processor_count;
>
>    if ( cpu_count > 4 )
>      cpu_count = 4;
>
>    return cpu_count;
> }
>
> void _CPU_SMP_Finalize_initialization( uint32_t cpu_count )
> {
>    /* Do nothing */
> }
>
> void _CPU_SMP_Prepare_start_multitasking( void )
> {
>    /* Do nothing */
> }
>
> void _CPU_SMP_Send_interrupt( uint32_t target_cpu_index )
> {
>    /* Generates IPI */
>    BCM2835_REG(BCM2836_MAILBOX_3_WRITE_SET_BASE +
>        0x10 * target_cpu_index) = 0x1;
> }
>
> should they go to the same compilation unit as _CPU_SMP_Start_processor
> or bspsmp-init.c separate one.
>
> Or I should not care about smpfatal08 or add required symbol to it.

It would be nice to get the smpfatal08 to work with this BSP. There is 
already a special case for the the qoriq BSPs in this test, so maybe we 
need something similar for the RPI.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list