| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add a local context structure to the SMP lock API for acquire and
release pairs. This context can be used to store the ISR level and
profiling information. It may be later used to enable more
sophisticated lock algorithms, e.g. MCS locks.
There is only one lock that cannot be used with a local context. This
is the per-CPU lock since here we would have to transfer the local
context through a context switch which is very complicated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This partially reverts commit 1215fd4d9426a59d568560e9a485628560363133.
In order to support profiling of SMP locks and provide a future
compatible SMP locks API it is necessary to add an SMP lock destroy
function. Since the commit above adds an SMP lock to each chain control
we would have to add a rtems_chain_destroy() function as well. This
complicates the chain usage dramatically. Thus revert the patch above.
A global SMP lock for all chains is used to implement the protected
chain operations.
Advantages:
* The SAPI chain API is now identical on SMP and non-SMP
configurations.
* The size of the chain control is reduced and is then equal to the
Score chains.
* The protected chain operations work correctly on SMP.
Disadvantage:
* Applications using many different chains and the protected operations
may notice lock contention.
The chain control size drop is a huge benefit (SAPI chain controls are
66% larger than the Score chain controls). The only disadvantage is not
really a problem since these applications can use specific interrupt
locks and unprotected chain operations to avoid this issue.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
According to AAPCS, section 5.2.1.2, "Stack constraints at a public
interface" the stack must be 8 byte aligned. This was not the case
during interrupt processing.
|
|
|
|
|
|
|
| |
Formerly POSIX keys were only enabled when POSIX threads
were enabled. Because they are a truly safe alternative
to per-task variables in an SMP system, they are being
enabled in all configurations.
|
| |
|
|
|
|
|
| |
This is a useful POSIX thread API helper which is found in
`GNU/Linux and *BSD.
|
|
|
|
|
|
|
| |
This patch adds the following methods:
+ pthread_get_affinity_np
+ pthread_set_affinity_np
|
|
|
|
|
|
|
| |
This patch adds the following methods:
+ pthread_attr_get_affinity_np
+ pthread_attr_set_affinity_np
|
| |
|
|
|
|
|
| |
With the addition of pthread affinity information in pthread_attr_t,
the existing code for pthread_attr_t had to be adjusted.
|
|
|
|
|
|
|
| |
Add the following methods:
+ rtems_task_get_affinity
+ rtems_task_set_affinity
|
|
|
|
|
|
|
| |
SMP must be initialized in order to know the current set of
cores available. Without this, you cannot initialize the
default cpu_set_t associated with Classic API tasks and
POSIX threads.
|
|
|
|
|
|
| |
This new Score Handler provides a structure to manage a
cpu_set_t plus helper routines to validate the contents
against the current system configuration.
|
| |
|
|
|
|
|
| |
This function was only used in some tests and can be replaced with other
functions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A new option RTEMS_INTERRUPT_REPLACE is introduced that permits updating
the first interrupt handler for the registered interrupt vector and
matching argument. If no match is found, the install function fails
with RTEMS_UNSATISFIED.
The Interrupt Manager Extension offers interrupt handlers with an
argument pointer. It is impossible to update two words (handler and
argument) atomically on most architectures. In order to avoid an SMP
lock in bsp_interrupt_handler_dispatch() which would degrade the
interrupt response time an alternative must be provided that makes it
possible to tear-down interrupt sources without an SMP lock.
Add RTEMS_INTERRUPT_REPLACE option to Interrupt Manager Extension. This
enables a clean tear-down of interrupt sources on SMP configurations.
Instead of an interrupt handler removal a replacement handler can be
installed to silence an interrupt source. This can be used in contexts
that allow no sophisticated synchronization (e.g. in atexit() or fatal
handlers).
|
| |
|
| |
|
|
|
|
| |
New test smptests/smpfatal03.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Add rtems_cache_get_data_cache_size() and
rtems_cache_get_instruction_cache_size().
|
|
|
|
| |
A cache line cannot have a negative size.
|
|
|
|
| |
Move useful functions to the top of the file.
|
|
|
|
|
|
|
|
| |
The SPARC processors supported by RTEMS have no built-in CPU counter
support. We have to use some hardware counter module for this purpose.
The BSP must provide a 32-bit register which contains the current CPU
counter value and a function for the difference calculation. It can use
for example the GPTIMER instance used for the clock driver.
|
|
|
|
|
| |
Do not use _TLS_Size here since this will lead GCC to assume that this
symbol is not 0 and the later > 0 test will be optimized away.
|
|
|
|
|
|
|
| |
Remove RTEMS_COMPILER_PURE_ATTRIBUTE from _SMP_Get_current_processor()
and all _CPU_SMP_Get_current_processor(). Make inline ASM statements
volatile again. Test smptests/smpmigration01 showed that GCC optimizes
too much otherwise.
|
|
|
|
|
| |
Fix serious race-condition. Read the heir after the per-CPU lock
acquire.
|
|
|
|
| |
Rename _Internal_error_Occurred() into _Terminate().
|
| |
|
|
|
|
|
| |
Inline _SMP_Inter_processor_interrupt_handler() to avoid function call
overhead. Remove debug output.
|
|
|
|
|
|
| |
Wait for per-CPU changes into PER_CPU_STATE_READY_TO_BEGIN_MULTITASKING
later. There is no need to delay the initialization of the main
processor at this point.
|
| |
|
| |
|
|
|
|
|
|
| |
Rename rtems_smp_process_interrupt() into
_SMP_Inter_processor_interrupt_handler(). Delete unused header file
<rtems/bspsmp.h>.
|
|
|
|
|
|
| |
Rename rtems_smp_secondary_cpu_initialize() into
_SMP_Start_multitasking_on_secondary_processor(). Move declaration to
<rtems/score/smpimpl.h>.
|
|
|
|
|
| |
Collect SMP implementation specific parts in the
<rtems/score/smpimpl.h> header file.
|
|
|
|
|
|
| |
Since the per-CPU SMP lock must be acquired and released to send the
message a single interrupt broadcast operations offers no benefits. If
synchronization is required, then a SMP barrier must be used anyway.
|
|
|
|
|
| |
Rename bsp_smp_initialize() into _CPU_SMP_Initialize() since every CPU
port must supply this function.
|
| |
|
|
|
|
|
| |
Rename RTEMS_BSP_SMP_SHUTDOWN in SMP_MESSAGE_SHUTDOWN since SMP messages
have nothing to do with the BSP. Use UINT32_C() instead of casts.
|
|
|
|
|
|
| |
Use rtems_fatal() instead of _CPU_Fatal_halt() to shutdown processors in
SMP configurations since this allows intervention of BSP or application
specific fatal extensions.
|
|
|
|
|
|
| |
Merge RTEMS_FATAL_SOURCE_BSP_GENERIC and RTEMS_FATAL_SOURCE_BSP_SPECIFIC
into new fatal source RTEMS_FATAL_SOURCE_BSP. This makes it easier to
figure out the code position given a fatal source and code.
|