summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/smp.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-01-24score: Remove unused return valueSebastian Huber1-6/+1
Several SMP message processing functions returned a value. This value was always unused. Close #4822.
2022-03-24smp: Add fatal errorSebastian Huber1-0/+5
Add SMP-specifc SMP_FATAL_MULTITASKING_START_ON_NOT_ONLINE_PROCESSOR fatal error. This fatal error helps to diagnose a broken SMP startup sequence. Without this error a context switch using the NULL pointer for the thread control block happens which may be difficult to debug.
2022-03-08score: Disable thread dispatching earlierSebastian Huber1-0/+6
Disable thread dispatching earlier on secondary processors. This ensures that fatal error and per-CPU job handlers are called with thread dispatching disabled. On the boot processor, the thread dispatching is already disabled by _Thread_Dispatch_initialization().
2022-02-28score/src/[n-s]*.c: Change license to BSD-2Joel Sherrill1-3/+22
Updates #3053.
2021-08-03score: Disable interrupts in SMP shutdownSebastian Huber1-0/+5
2021-07-29score: Change _SMP_Send_message() parameter typeSebastian Huber1-4/+2
Use the processor control to specify the target processor since this is what the callers have available.
2021-07-28score: Return value in _SMP_Process_message()Sebastian Huber1-0/+2
2021-07-28score: Remove SMP message multicast/broadcastSebastian Huber1-39/+1
Remove the unused _SMP_Send_message_multicast() and _SMP_Send_message_broadcast().
2021-07-28score: Simplify SMP processor state handlingSebastian Huber1-15/+127
The per-CPU states which control the SMP system initialization were added quite early during the SMP support development. Replace this initial implementation with a simplified one. There is no longer a global SMP lock required which serialized the state changes of all processors. The new implementation better integrates with the per-CPU jobs.
2021-06-10score: Add PER_CPU_DATA_NEED_INITIALIZATION()Sebastian Huber1-42/+0
Make the initialization of the per-CPU data optional. Change license to BSD-2-Clause according to file history and re-licensing agreement. Update #3053.
2020-12-02score: Canonicalize Doxygen @file commentsSebastian Huber1-3/+10
Use common phrases for the file brief descriptions. Update #3706.
2020-04-16Canonicalize config.h includeSebastian Huber1-1/+1
Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
2020-02-04bsps: Rework work area initializationSebastian Huber1-0/+42
The work area initialization was done by the BSP through bsp_work_area_initialize(). This approach predated the system initialization through the system initialization linker set. The workspace and C program heap were unconditionally initialized. The aim is to support RTEMS application configurations which do not need the workspace and C program heap. In these configurations, the workspace and C prgram heap should not get initialized. Change all bsp_work_area_initialize() to implement _Memory_Get() instead. Move the dirty memory, sbrk(), per-CPU data, workspace, and malloc() heap initialization into separate system initialization steps. This makes it also easier to test the individual initialization steps. This change adds a dependency to _Heap_Extend() to all BSPs. This dependency will be removed in a follow up change. Update #3838.
2019-05-20score: Remove unused SMP_MESSAGE_TESTSebastian Huber1-2/+0
All uses were replaced by per-processor jobs.
2019-04-12score: Remove _SMP_Before_multitasking_action()Sebastian Huber1-26/+0
Use _SMP_Multicast_action() instead.
2019-04-12score: Rework SMP multicast actionSebastian Huber1-0/+1
Use a FIFO list of jobs per processor to carry out the SMP multicast action. Use a done indicator per job to reduce the bus traffic a bit.
2019-04-12score: Use an ISR lock for Per_CPU_Control::LockSebastian Huber1-2/+1
The use of a hand crafted lock for Per_CPU_Control::Lock was necessary at some point in the SMP support development, but it is no longer justified.
2019-04-12score: Add _ISR_lock_Set_name()Sebastian Huber1-2/+3
Add _ISR_lock_Set_name() to optimize the initialization of zero-initialized locks.
2019-04-11score: Rename _SMP_Get_processor_count()Sebastian Huber1-22/+31
Rename _SMP_Get_processor_count() in _SMP_Get_processor_maximum() to be in line with the API level rtems_scheduler_get_processor_maximum(). Update #3732.
2019-04-11score: Rename _SMP_Processor_countSebastian Huber1-2/+2
Rename _SMP_Processor_count in _SMP_Processor_maximum to be in line with the API level rtems_scheduler_get_processor_maximum(). Update #3732.
2019-04-04doxygen: Rename Score* groups in RTEMSScore*Sebastian Huber1-1/+1
Update #3706
2018-07-25_SMP_Start_multitasking_on_secondary_processor()Sebastian Huber1-9/+17
Pass current processor control as first parameter to make dependency more explicit.
2017-07-07score: Add processor set to scheduler contextSebastian Huber1-3/+2
Replace the simple processor count with the processor set owned by the scheduler instance. Update #3059.
2017-07-06score: Use <sys/bitset.h> for Processor_maskSebastian Huber1-4/+4
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.
2017-04-05SMP: Simplify SMP multicast actionsSebastian Huber1-4/+3
2016-11-09score: Rename _Scheduler_AssignmentsSebastian Huber1-9/+35
Rename _Scheduler_Assignments into _Scheduler_Initial_assignments to make it clear that they may not reflect the run-time scheduler assignment. Update #2797.
2016-11-09score: Add scheduler to per-CPU informationSebastian Huber1-3/+7
This makes it possible to adjust the scheduler of a processor at run-time. Update #2797.
2016-11-02score: Add new SMP scheduler helping protocolSebastian Huber1-0/+1
Update #2556.
2016-07-06score: Postpone SMP shutdown in _Terminate()Sebastian Huber1-2/+5
This enables fatal extensions to continue program execution after some fatal errors.
2016-06-29score: Fix SMP message handlingSebastian Huber1-1/+1
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.
2016-05-20score: Remove the Giant lockSebastian Huber1-9/+0
Update #2555.
2016-03-04score: Replace watchdog handler implementationSebastian Huber1-0/+1
Use a red-black tree instead of delta chains. Close #2344. Update #2554. Update #2555. Close #2606.
2016-03-04score: Distribute clock tick to all online CPUsSebastian Huber1-1/+4
Update #2554.
2016-03-04score: Add _SMP_Before_multitasking_action()Sebastian Huber1-0/+23
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.
2016-03-04score: Add _Per_CPU_Is_boot_processor()Sebastian Huber1-0/+2
2016-03-04score: Add _SMP_Online_processorsSebastian Huber1-1/+4
2016-03-04score: Rename Per_CPU_Control::startedSebastian Huber1-2/+2
Rename Per_CPU_Control::started into Per_CPU_Control::online to match standard nomenclature.
2016-02-17score: Avoid SCORE_EXTERNSebastian Huber1-0/+2
Delete SCORE_INIT. This finally removes the some.h: #ifndef SOME_XYZ_EXTERN #define SOME_XYZ_EXTERN extern #endif SOME_XYZ_EXTERN type xyz; some_xyz.c: #define SOME_XYZ_EXTERN #include <some.h> pattern in favour of some.h: extern type xyz; some_xyz.c #include <some.h> type xyz; Update #2559.
2015-06-26score: Hide SMP lock profiling impl if disabledSebastian Huber1-1/+2
The problem is that empty structures have a different size in C and C++.
2015-06-25score: Move SMP CPU_USE_DEFERRED_FP_SWITCH checkSebastian Huber1-0/+4
2015-01-09smp: Add and use _SMP_Should_start_processor()Sebastian Huber1-3/+9
2014-08-22score: Rename SMP broadcast message functionDaniel Cederman1-1/+1
Change message type to unsigned long to match other SMP message functions.
2014-08-22score: Add function to send a SMP message to a set of CPUsDaniel Cederman1-0/+16
2014-05-26score: Fix race condition in SMP startupSebastian Huber1-1/+8
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.
2014-05-14score: Add and use _Scheduler_Get_context()Sebastian Huber1-3/+4
2014-05-07score: Fix SMP startupSebastian Huber1-1/+3
2014-05-07score: Implement forced thread migrationSebastian Huber1-1/+4
The current implementation of task migration in RTEMS has some implications with respect to the interrupt latency. It is crucial to preserve the system invariant that a task can execute on at most one processor in the system at a time. This is accomplished with a boolean indicator in the task context. The processor architecture specific low-level task context switch code will mark that a task context is no longer executing and waits that the heir context stopped execution before it restores the heir context and resumes execution of the heir task. So there is one point in time in which a processor is without a task. This is essential to avoid cyclic dependencies in case multiple tasks migrate at once. Otherwise some supervising entity is necessary to prevent life-locks. Such a global supervisor would lead to scalability problems so this approach is not used. Currently the thread dispatch is performed with interrupts disabled. So in case the heir task is currently executing on another processor then this prolongs the time of disabled interrupts since one processor has to wait for another processor to make progress. It is difficult to avoid this issue with the interrupt latency since interrupts normally store the context of the interrupted task on its stack. In case a task is marked as not executing we must not use its task stack to store such an interrupt context. We cannot use the heir stack before it stopped execution on another processor. So if we enable interrupts during this transition we have to provide an alternative task independent stack for this time frame. This issue needs further investigation.
2014-05-07score: Delete _SMP_Test_message_default_handlerSebastian Huber1-7/+1
A default handler is not necessary. The test message sender must ensure that a handler is installed.
2014-05-05score: Use atomic operations for SMP messagesSebastian Huber1-5/+2
2014-05-05score: Add SMP test message handlerSebastian Huber1-0/+8
This handler can be used to test the inter-processor interrupt implementation.