Re: [PATCH 5/8] score: Add _Per_CPU_Is_boot_processor()
On 03/03/16 16:18, Joel Sherrill wrote: On Thu, Mar 3, 2016 at 9:14 AM, Sebastian Huber> wrote: On 03/03/16 16:12, Joel Sherrill wrote: Other than bookkeeping, what is this going to be used for? Its used later in the watchdog tick. The boot processor manages the wall clock time. How is it configured? The _SMP_Fatal() call at the end of the patch hints that there is some related configuration. The boot processor is the processor that performs the sequential system initialization. This name is used in several other places. And it is configured currently? Just checking. I didn't have a problem with the name. The low level architecture/chip/board/bootloader dependent code determines the boot processor. It is the processor that calls boot_card(). -- 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.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 5/8] score: Add _Per_CPU_Is_boot_processor()
On Thu, Mar 3, 2016 at 9:14 AM, Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > > > On 03/03/16 16:12, Joel Sherrill wrote: > >> Other than bookkeeping, what is this going to be used for? >> > > Its used later in the watchdog tick. The boot processor manages the wall > clock time. > > >> How is it configured? The _SMP_Fatal() call at the end of the patch hints >> that there is some related configuration. >> > > The boot processor is the processor that performs the sequential system > initialization. This name is used in several other places. > > And it is configured currently? Just checking. I didn't have a problem with the name. > -- > 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.hu...@embedded-brains.de > PGP : Public key available on request. > > Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. > > ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 5/8] score: Add _Per_CPU_Is_boot_processor()
On 03/03/16 16:12, Joel Sherrill wrote: Other than bookkeeping, what is this going to be used for? Its used later in the watchdog tick. The boot processor manages the wall clock time. How is it configured? The _SMP_Fatal() call at the end of the patch hints that there is some related configuration. The boot processor is the processor that performs the sequential system initialization. This name is used in several other places. -- 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.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 5/8] score: Add _Per_CPU_Is_boot_processor()
--- cpukit/score/include/rtems/score/percpu.h | 19 +++ cpukit/score/src/smp.c| 2 ++ 2 files changed, 21 insertions(+) diff --git a/cpukit/score/include/rtems/score/percpu.h b/cpukit/score/include/rtems/score/percpu.h index 2b05b78..19f46d2 100644 --- a/cpukit/score/include/rtems/score/percpu.h +++ b/cpukit/score/include/rtems/score/percpu.h @@ -365,6 +365,12 @@ typedef struct Per_CPU_Control { * _CPU_SMP_Start_processor(). */ bool online; + +/** + * @brief Indicates if the processor is the one that performed the initial + * system initialization. + */ +bool boot; #endif Per_CPU_Stats Stats; @@ -536,6 +542,19 @@ static inline bool _Per_CPU_Is_processor_online( #endif } +static inline bool _Per_CPU_Is_boot_processor( + const Per_CPU_Control *cpu +) +{ +#if defined( RTEMS_SMP ) + return cpu->boot; +#else + (void) cpu; + + return true; +#endif +} + #if defined( RTEMS_SMP ) static inline void _Per_CPU_Send_interrupt( const Per_CPU_Control *cpu ) diff --git a/cpukit/score/src/smp.c b/cpukit/score/src/smp.c index 68a55ff..8049643 100644 --- a/cpukit/score/src/smp.c +++ b/cpukit/score/src/smp.c @@ -57,6 +57,8 @@ static void _SMP_Start_processors( uint32_t cpu_count ) } else { started = true; + cpu->boot = true; + if ( !_Scheduler_Should_start_processor( assignment ) ) { _SMP_Fatal( SMP_FATAL_BOOT_PROCESSOR_NOT_ASSIGNED_TO_SCHEDULER ); } -- 1.8.4.5 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel