[Bug 1729] SMP Step #2

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Tue Jan 25 09:23:35 UTC 2011


https://www.rtems.org/bugzilla/show_bug.cgi?id=1729

--- Comment #4 from Sebastian Huber <sebastian.huber at embedded-brains.de> 2011-01-25 03:23:34 CST ---
1. The include file

#include <bsp/apic.h>

is missing in the patch and CVS head?

I disagree with several names in this patch.  The SMP support belongs to the
Score.  Thus we should use the Score naming conventions.

2. rtems_bsp_smp_get_current():  This should be renamed to
_BSP_smp_processor_id() or simply bsp_smp_processor_id().  That this function
is placed in the BSP domain is a pity.  Linux manages to determine the
processor ID on a per architecture basis.

3. CONFIGURE_SMP_CPUS: Rename to CONFIGURE_SMP_PROCESSOR_COUNT.

4. rtems_smp_maximum_cpus: Rename to _SMP_Processor_count.

5. per_cpu_initialize(): Rename to _SMP_Handler_initialize().

6. Why do we need the RTEMS_BSP_SMP_CPU_INITIAL_STATE,
RTEMS_BSP_SMP_CPU_INITIALIZED, and RTEMS_BSP_SMP_CPU_SHUTDOWN states in
addition to System_state_Codes?  Why are this defines and not an enum?

7. rtems_lock_t: Where does this come from?  Why this name?  The Score
generally has no _t names.

8. volatile uint32_t state and volatile uint32_t message in Per_CPU_Control:
Usage of volatile is probably wrong here.  Why do we use uint32_t here?

9. int rtems_bsp_smp_get_current(void)  __attribute__ ((pure)): FreeBSD, Linux,
and RTEMS (sometimes) use defines to avoid hard coded compiler dependencies. 
We should really consider to avoid all these __attribute__ stuff throughout the
code.

10. _Per_CPU_Information = _Workspace_Allocate_or_fatal_error(): We should
consider to define this array in confdefs.h and place it in the BSS or
architecture dependent section (e.g. small data area on PowerPC).

11. We should consider to avoid a lot of these #if defined(RTEMS_SMP) and
simply define _SMP_Processor_count (rtems_smp_maximum_cpus) to 0 in the non-SMP
case.  The code size overhead is not huge.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list