summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/smpimpl.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove make preinstallChris Johns2018-01-251-354/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
* score: Fix typoSebastian Huber2017-07-121-1/+1
| | | | Update #3059.
* score: Introduce _SMP_Get_online_processors()Sebastian Huber2017-07-071-0/+9
| | | | Update #3059.
* score: Use <sys/bitset.h> for Processor_maskSebastian Huber2017-07-061-2/+2
| | | | | | | | Implement the Processor_mask via <sys/bitset.h>. Provide _Processor_mask_To_uint32_t() to enable its use in device specific routines, e.g. interrupt affinity register in an interrupt controller. Update #3059.
* SMP: Simplify SMP multicast actionsSebastian Huber2017-04-051-5/+3
|
* score: Remove fatal is internal indicatorSebastian Huber2016-12-091-1/+1
| | | | | | | | | The fatal is internal indicator is redundant since the fatal source and error code uniquely identify a fatal error. Keep the fatal user extension is internal parameter for backward compatibility and set it to false always. Update #2825.
* score: Fix SMP message handlingSebastian Huber2016-06-291-8/+10
| | | | | | | | According to the C11 standard only atomic read-modify-write operations guarantee that the last value written in modification order is read, see "7.17.3 Order and consistency". Thus we must use a read-modify-write in _SMP_Inter_processor_interrupt_handler() to make sure we read an up-to-date message.
* score: Distribute clock tick to all online CPUsSebastian Huber2016-03-041-12/+22
| | | | Update #2554.
* score: Add _SMP_Before_multitasking_action()Sebastian Huber2016-03-041-2/+46
| | | | | | | | | The use case for this is the Cortex-A9 MPCore which has per-processor registers (only accessible by a particular processor) for the global timer used by the clock driver. This might be useful for other drivers as well. Update #2554.
* score: Add _SMP_Online_processorsSebastian Huber2016-03-041-0/+11
|
* basedefs.h: Add and use RTEMS_NO_RETURNSebastian Huber2015-10-261-1/+1
|
* SMP: Fix and optimize thread dispatchingSebastian Huber2015-09-281-0/+6
| | | | | | | | According to the C11 and C++11 memory models only a read-modify-write operation guarantees that we read the last value written in modification order. Avoid the sequential consistent thread fence and instead use the inter-processor interrupt to set the thread dispatch necessary indicator.
* score: Refactor SMP cache manager supportSebastian Huber2015-04-201-8/+25
|
* smp: Add and use _SMP_Should_start_processor()Sebastian Huber2015-01-091-0/+11
|
* score: Add SMP support to the cache managerDaniel Cederman2014-08-221-0/+19
| | | | | | | | | Adds functions that allows the user to specify which cores that should perform the cache operation. SMP messages are sent to all the specified cores and the caller waits until all cores have acknowledged that they have flushed their cache. If CPU_CACHE_NO_INSTRUCTION_CACHE_SNOOPING is defined the instruction cache invalidation function will perform the operation on all cores using the previous method.
* score: Rename SMP broadcast message functionDaniel Cederman2014-08-221-2/+2
| | | | Change message type to unsigned long to match other SMP message functions.
* score: Add function to send a SMP message to a set of CPUsDaniel Cederman2014-08-221-0/+15
|
* score: Delete SMP_FATAL_SHUTDOWN_EARLYSebastian Huber2014-06-051-4/+3
| | | | Sort enum lexicographically.
* score: Fix race condition in SMP startupSebastian Huber2014-05-261-1/+2
| | | | | | | | | | | | | | Do not use the Per_CPU_Control::started in _SMP_Start_multitasking_on_secondary_processor() since this field may be not up to date when a secondary processor reads it. Use the read-only scheduler assignment instead. Add a new fatal error SMP_FATAL_MULTITASKING_START_ON_INVALID_PROCESSOR. This prevents out-of-bounds access. It is currently not possible to test these fatal errors. One option would be to fake values of the _CPU_SMP_Get_current_processor(), but unfortunately this function is inline on some architectures.
* score: Use _SMP_Fatal()Sebastian Huber2014-05-231-1/+1
|
* SMP: make IPI fatal code uniqueDaniel Hellstrom2014-05-231-2/+3
| | | | | | | | | | The same smp fatal code is used in percpu _Per_CPU_State_change(). In order to determine which CPU requested a fatal shutdown and which CPU responds to it a unique code should be used. A unique code makes it also possible to handle the CPUs differently in the fatal exception handler.
* score: Use atomic operations for SMP messagesSebastian Huber2014-05-051-11/+9
|
* score: Add SMP test message handlerSebastian Huber2014-05-051-0/+28
| | | | | This handler can be used to test the inter-processor interrupt implementation.
* score: SMP_FATAL_SCHEDULER_WITHOUT_PROCESSORSSebastian Huber2014-05-051-1/+0
| | | | | Avoid the SMP_FATAL_SCHEDULER_WITHOUT_PROCESSORS fatal error and make it a run-time error in rtems_scheduler_ident() and _Scheduler_Get_by_id().
* score: Use common names for per-CPU variablesSebastian Huber2014-04-221-8/+8
| | | | | | | | | | | | | | | | Use "cpu" for an arbitrary Per_CPU_Control variable. Use "cpu_self" for the Per_CPU_Control of the current processor. Use "cpu_index" for an arbitrary processor index. Use "cpu_index_self" for the processor index of the current processor. Use "cpu_count" for the processor count obtained via _SMP_Get_processor_count(). Use "cpu_max" for the processor maximum obtained by rtems_configuration_get_maximum_processors().
* score: Add clustered/partitioned schedulingSebastian Huber2014-04-151-0/+9
| | | | | | | | | | | | | | | Clustered/partitioned scheduling helps to control the worst-case latencies in the system. The goal is to reduce the amount of shared state in the system and thus prevention of lock contention. Modern multi-processor systems tend to have several layers of data and instruction caches. With clustered/partitioned scheduling it is possible to honour the cache topology of a system and thus avoid expensive cache synchronization traffic. We have clustered scheduling in case the set of processors of a system is partitioned into non-empty pairwise-disjoint subsets. These subsets are called clusters. Clusters with a cardinality of one are partitions. Each cluster is owned by exactly one scheduler instance.
* score: SMP initialization changesSebastian Huber2014-04-141-1/+2
| | | | | | | | | | | | | | | | | Add and use _CPU_SMP_Start_processor(). Add and use _CPU_SMP_Finalize_initialization(). This makes most _CPU_SMP_Initialize() functions a bit simpler since we can calculate the minimum value of the count of processors requested by the application configuration and the count of physically or virtually available processors in the high-level code. The CPU port has now the ability to signal a processor start failure. With the support for clustered/partitioned scheduling the presence of particular processors can be configured to be optional or mandatory. There will be a fatal error only in case mandatory processors are not present. The CPU port may use a timeout to monitor the start of a processor.
* score: Add per-CPU state functionSebastian Huber2014-03-311-1/+2
| | | | | Add _Per_CPU_State_wait_for_ready_to_start_multitasking(). Add new fatal SMP error SMP_FATAL_SHUTDOWN_EARLY.
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-211-1/+1
|
* score: SMP initialization and shutdown changesSebastian Huber2014-03-061-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename _SMP_Request_other_cores_to_perform_first_context_switch() into _SMP_Request_start_multitasking() since this requests now a multitasking start on all configured and available processors. The name corresponds _Thread_Start_multitasking() and _SMP_Start_multitasking_on_secondary_processor() actions issued in response to this request. Move in source file to right place. Rename PER_CPU_STATE_READY_TO_BEGIN_MULTITASKING into PER_CPU_STATE_READY_TO_START_MULTITASKING. Rename PER_CPU_STATE_BEGIN_MULTITASKING into PER_CPU_STATE_REQUEST_START_MULTITASKING. Rename _SMP_Request_other_cores_to_shutdown() into _SMP_Request_shutdown(). Add a per-CPU state lock to protect all changes. This was necessary to offer a controlled shutdown of the system (atomic read/writes alone are not sufficient for this kind of synchronization). Add documentation for Per_CPU_State. Delete debug output. New tests smptests/smpfatal01 and smptests/smpfatal02.
* score: _SMP_Inter_processor_interrupt_handler()Sebastian Huber2014-02-191-1/+23
| | | | | Inline _SMP_Inter_processor_interrupt_handler() to avoid function call overhead. Remove debug output.
* score: Rename rtems_smp_process_interrupt()Sebastian Huber2014-02-191-0/+5
| | | | | | Rename rtems_smp_process_interrupt() into _SMP_Inter_processor_interrupt_handler(). Delete unused header file <rtems/bspsmp.h>.
* score: Rename rtems_smp_secondary_cpu_initialize()Sebastian Huber2014-02-191-0/+27
| | | | | | Rename rtems_smp_secondary_cpu_initialize() into _SMP_Start_multitasking_on_secondary_processor(). Move declaration to <rtems/score/smpimpl.h>.
* score: Add and use <rtems/score/smpimpl.h>Sebastian Huber2014-02-191-0/+123
Collect SMP implementation specific parts in the <rtems/score/smpimpl.h> header file.