Commit Graph

24989 Commits

Author SHA1 Message Date
Sebastian Huber
18e2fbe70d smp: Fix PowerPC context switch 2013-06-07 17:06:43 +02:00
Sebastian Huber
7cf2ec6f0d smp: Set state PER_CPU_STATE_UP on main processor 2013-06-07 17:06:43 +02:00
Sebastian Huber
2d2352bab9 score: Add and use _Objects_Put()
Add and use _Objects_Put_without_thread_dispatch().  These two functions
pair with the _Objects_Get() function.  This helps to introduce object
specific SMP locks to avoid lock contention.
2013-06-07 17:06:43 +02:00
Sebastian Huber
54e9216a0e score: Add _Objects_Put_for_get_isr_disable()
Provide SMP support.  The ISR disable/enable is not enough to ensure
mutual exclusion for SMP configurations.
2013-06-07 17:06:38 +02:00
Sebastian Huber
c398c6603a score: Align _Objects_Get_isr_disable()
Align ISR disable/enable sequence in _Objects_Get_isr_disable() with
thread dispatch disable/enable sequence in _Objects_Get().
2013-06-07 17:02:26 +02:00
Sebastian Huber
4fc370e3c6 score: Move thread dispatch content to new file
Move thread dispatch declarations and inline functions to new header
<rtems/score/threaddispatch.h> to make it independent of the
Thread_Control structure.  This avoids a cyclic dependency in case
thread dispatch functions are used for the object implementation.
2013-06-07 17:02:26 +02:00
Sebastian Huber
4f5baffd75 score: Simplify _CORE_mutex_Seize_interrupt_try* 2013-06-07 17:02:26 +02:00
Sebastian Huber
dcb4daf8e1 score: Simplify _CORE_semaphore_Seize_isr_disable 2013-06-07 17:02:26 +02:00
Sebastian Huber
17ce1034cf score: Simplify _Thread_Create_idle_helper()
The _Thread_Initialize() function has nothing to do with thread
dispatching it simply initializes the thread control.
2013-06-07 17:02:25 +02:00
Sebastian Huber
62da44e6d0 rtems: Move unnest dispatch after ISR enable
This prevents a lock order reversal.
2013-06-07 17:02:25 +02:00
Sebastian Huber
2f49cfdf87 rtems: Fix system event send for remote threads 2013-06-07 17:02:25 +02:00
Sebastian Huber
9bfd7ff09e dosfs: Documentation 2013-06-07 17:02:25 +02:00
Sebastian Huber
1f3ce602f9 termios: Fix warning 2013-06-07 17:02:24 +02:00
Sebastian Huber
36ae561c8e nfsclient: Add rpcSetXIDs() 2013-06-05 17:19:34 +02:00
Sebastian Huber
a2854fd55e nfsclient: Fix warnings 2013-06-05 17:19:33 +02:00
Sebastian Huber
442db915f8 nfsclient: Delete superfluous mask operation 2013-06-05 17:19:33 +02:00
Sebastian Huber
c295e098c6 nfsclient: Delete superfluous assignment 2013-06-05 17:19:33 +02:00
Sebastian Huber
cffa5b7838 libblock: Use UTF-8 converter in media manager 2013-06-04 13:56:19 +02:00
Ralf Kirchner
27170bae58 dosfs: Documentation 2013-06-03 17:28:42 +02:00
Ralf Kirchner
581c9982a3 fsdsosfsname01: Ensure endian correctness 2013-06-03 17:28:41 +02:00
Ralf Kirchner
e1483973c4 fsdosfsname01: Add compatibility tests
Test handling of file names and directory names according to Microsofts
specification for the FAT file system. Tests for compatibility with a
genuine MS Windows FAT file system have been added.
2013-06-03 17:28:41 +02:00
Ralf Kirchner
52f3aa0519 fsdosfsname01: Add multibyte tests
Test handling of file names and directory names according to Microsofts specification
for the FAT file system. Tests for multibyte file names and directory names have been added.
2013-06-03 17:28:41 +02:00
Ralf Kirchner
83a4cbb69d dosfs: UTF-8 Support: Multibyte conversions
Add optional conversion methods for multibyte strings. With these
conversions which make use of iconv and utf8proc it becomes possible to
use strings from any language (Czech, Chinese, Arabian, Hebrew, Corean,
...) for file names and directory names.

NOTE: Iconv support must be activated during the build of the tool chain
for these conversion methods (options --enable-newlib-iconv
--enable-newlib-iconv-encodings=[ENCODINGS_YOU_WANT]).  Alternatively
you can provide your own conversion methods.
2013-06-03 17:28:41 +02:00
Ralf Kirchner
2ee8b15863 libtests: Add new test: utf8proc01
utf8proc is a library for processing UTF-8 encoded Unicode strings.
Some features are Unicode normalization, stripping of default ignorable characters, case folding and detection of grapheme cluster boundaries.
For now utf8proc is intended for normalizing and folding strings for comparison purposes within the UTF-8 support of the FAT file system.
This test will call interface methods of library utf8proc in order to make sure they compiled and linked ok.
The library is third party, thus it should be sufficient for us to make sure we can build it correctly.
2013-06-03 17:28:41 +02:00
Ralf Kirchner
46b7f92152 libmisc: Add utf8proc-v1.1.5
utf8proc is a small library for processing UTF-8 encoded Unicode strings.
Some features are Unicode normalization, stripping of default ignorable characters, case folding and detection of grapheme cluster boundaries.
For the time beeing utf8proc is intended to be used for normalizing and folding UTF-8 strings
for comparison purposes when adding UTF-8 support to the FAT file system.
2013-06-03 17:28:40 +02:00
Ralf Kirchner
ccd212efab fsdosfsname01: New test
Test handling of file names and directory names according to Microsofts
specification for the FAT file system. So far tested only for the
default character set (code page 850).
2013-06-03 17:28:40 +02:00
Ralf Kirchner
d2e0bb36e3 dosfs: UTF-8 Support: UI, backwards compatibility
User interface and backwards compatibility for UTF-8 support in the FAT
file system.  Purpose of UTF-8 support is to permit file names and
directory names with characters from all kinds of languages (Czech,
Chinese, Arabian, Hebrew, Korean, ...).  This commit does not yet
support multibyte characters. It only contains the user interface and
the backwards compatibility.
2013-06-03 17:28:40 +02:00
Sebastian Huber
8bed60314e bsp/lm3s69xx: Typos 2013-06-03 10:03:44 +02:00
Sebastian Huber
94c17afd9c bsp/qoriq: Add missing #ifdef RTEMS_SMP 2013-06-03 10:03:10 +02:00
Sebastian Huber
db42c079a0 bsps/arm: Add SMP support 2013-05-31 15:20:33 +02:00
Sebastian Huber
f2f211c543 smp: Add ARM support 2013-05-31 15:20:32 +02:00
Sebastian Huber
bd39add8fa bsp/qoriq: Add SMP support 2013-05-31 15:20:32 +02:00
Sebastian Huber
ffbeb6f6a3 smp: Add PowerPC support 2013-05-31 15:20:32 +02:00
Sebastian Huber
bbed18668f smptests/smplock01: New test 2013-05-31 15:20:32 +02:00
Sebastian Huber
e358088fc2 smp: New SMP lock API
Move the SMP lock implementation to the CPU port.  An optimal SMP lock
implementation is highly architecture dependent.  For example the memory
models may be fundamentally different.

The new SMP lock API has a flaw.  It does not provide the ability to use
a local context for acquire and release pairs.  Such a context is
necessary to implement for example the Mellor-Crummey and Scott (MCS)
locks.  The SMP lock is currently used in _Thread_Disable_dispatch() and
_Thread_Enable_dispatch() and makes them to a giant lock acquire and
release.  Since these functions do not pass state information via a
local context there is currently no use case for such a feature.
2013-05-31 15:20:32 +02:00
Sebastian Huber
7c5ceea5ba score: Mark as no return
Mark rtems_smp_secondary_cpu_initialize() as no return.
2013-05-31 15:20:31 +02:00
Sebastian Huber
e3be691598 score: Remove idle field of Per_CPU_Control
This field is unused except for special case simulator clock drivers.
In these places use an alternative.  Add and use
_Thread_Set_global_exit_status() and _Thread_Get_global_exit_status().
2013-05-31 15:20:31 +02:00
Sebastian Huber
17e09f8e0b bsps: Use _Objects_Information_table
Eliminate copy and paste.  Use the _Objects_Information_table since this
will take into account that more than one internal thread may exist,
e.g. MPCI thread or idle threads of secondary processors.
2013-05-31 15:20:31 +02:00
Sebastian Huber
5b391f857b bsps/arm: Use Write-Allocate cache for ARMv7 2013-05-31 15:20:31 +02:00
Sebastian Huber
1dcf5febf2 bsps/arm: Merge ARMv7 MMU section definitions 2013-05-31 15:20:31 +02:00
Sebastian Huber
ac2bb464a5 smptests: Use priority ceiling for locked print
In case the printf() blocks on a semaphore it was possible to end up in
a livelock.
2013-05-31 15:20:30 +02:00
Sebastian Huber
e071c18322 smp: Move secondary CPU initialization request
Do not assume that the scheduler selects the main processor for the
initialization thread.
2013-05-29 11:06:08 +02:00
Sebastian Huber
3148438e1e smp: Use _CPU_Fatal_halt() 2013-05-29 11:06:08 +02:00
Sebastian Huber
2f6108f93b smp: Simplify SMP initialization sequence
Delete bsp_smp_wait_for().  Other parts of the system work without
timeout, e.g. the spinlocks.  Using a timeout here does not make the
system more robust.

Delete bsp_smp_cpu_state and replace it with Per_CPU_State.  The
Per_CPU_State follows the Score naming conventions.  Add
_Per_CPU_Change_state() and _Per_CPU_Wait_for_state() functions to
change and observe states.

Use Per_CPU_State in Per_CPU_Control instead of the anonymous integer.

Add _CPU_Processor_event_broadcast() and _CPU_Processor_event_receive()
functions provided by the CPU port.  Use these functions in
_Per_CPU_Change_state() and _Per_CPU_Wait_for_state().

Add prototype for _SMP_Send_message().

Delete RTEMS_BSP_SMP_FIRST_TASK message.  The first context switch is
now performed in rtems_smp_secondary_cpu_initialize().  Issuing the
first context switch in the context of the inter-processor interrupt is
not possible on systems with a modern interrupt controller.  Such an
interrupt controler usually requires a handshake protocol with interrupt
acknowledge and end of interrupt signals.  A direct context switch in an
interrupt handler circumvents the interrupt processing epilogue and may
leave the system in an inconsistent state.

Release lock in rtems_smp_process_interrupt() even if no message was
delivered.  This prevents deadlock of the system.

Simplify and format _SMP_Send_message(),
_SMP_Request_other_cores_to_perform_first_context_switch(),
_SMP_Request_other_cores_to_dispatch() and
_SMP_Request_other_cores_to_shutdown().
2013-05-29 11:06:07 +02:00
Sebastian Huber
8cacceb7b9 smp: Delete bsp_smp_secondary_cpu_initialize()
Do not call bsp_smp_secondary_cpu_initialize() in
rtems_smp_secondary_cpu_initialize().  This allows more flexibilty in
the BSP low-level code.  Specify context requirements for a call to
rtems_smp_secondary_cpu_initialize().
2013-05-29 11:06:07 +02:00
Sebastian Huber
42eee51744 smp: Delete rtems_smp_send_message() 2013-05-29 11:06:07 +02:00
Sebastian Huber
9f703b46e7 smp: Delete rtems_smp_initialize_per_cpu() 2013-05-29 11:06:07 +02:00
Sebastian Huber
baf8f4dabc smp: Simplify main CPU initialization
Call _SMP_Handler_initialize() later and move bsp_smp_initialize() into
_SMP_Handler_initialize().  Change bsp_smp_initialize() prototype to
match integer types of calling context.
2013-05-29 11:06:07 +02:00
Sebastian Huber
10643e958c smp: Make CPU_ALLOCATE_INTERRUPT_STACK optional 2013-05-29 11:06:06 +02:00
Sebastian Huber
a29704eb04 smp: Rely on BSS initialization
The _Per_CPU_Information is part of the BSS segment and must be zero
initialized.  Some processors may already poll some per-CPU fields and
wait for a state change at this point.
2013-05-29 11:06:06 +02:00