Commit Graph

26597 Commits

Author SHA1 Message Date
Jennifer Averett
61d26f939d smpschedaffinity04: New test.
This test walks a secondary high prority task across
all the cores.
2014-07-11 10:12:48 -05:00
Jennifer Averett
28d6674966 smpschedaffinity03: New test.
This task walks the affinity of self across all the cores.
2014-07-11 10:12:48 -05:00
Jennifer Averett
0929306933 smpschedaffinity02: New test.
This test checks setting the affinity of a secondary task
on a two core system.
2014-07-11 10:12:48 -05:00
Jennifer Averett
d88b0e7fc8 smpschedaffinity01: New test.
This test verifies that affinity is honored when set prior to task start.
2014-07-11 10:12:47 -05:00
Jennifer Averett
82d137ae21 capture01: New non-interactive test for capture engine. 2014-07-11 09:49:55 -05:00
Jennifer Averett
463de590f0 capture: Fix capture engine to handle new extensions. 2014-07-11 09:48:50 -05:00
Jennifer Averett
1af8634a84 capture: Update comment block style in capture engine.
Doxygen added and comment blocks standardized.
2014-07-11 09:48:35 -05:00
Sebastian Huber
f0c8501e4c score: Scheduler helping proto for affinity sched
The priority affinity scheduler has the nice property that it can
produce more than one scheduled to ready state change in one operation.
Each scheduled to ready state change may lead to one thread in need for
help.  Since it is currently only possible to return at most one thread
in need for help, we have a problem here.

A solution might be to move the check for migrations into the ask for
help mechanism.
2014-07-11 09:55:33 +02:00
Sebastian Huber
27783f6ca8 score: Fix scheduler helping implementation
Do not extract the idle threads from the ready set so that there is
always a thread available for comparison.
2014-07-10 15:29:57 +02:00
Sebastian Huber
333f9426f6 score: Fix assertions 2014-07-10 15:29:57 +02:00
Chris Johns
76ad756c09 FreeBSD standard shell does not support substring expansion.
Switch to using awk to get a string of spaces.
2014-07-10 15:56:11 +10:00
Sebastian Huber
e1f446d3c1 bsps/sparc: Set best baud in APBUART driver
This prevents failures of all tests using rtems_shell_wait_for_input(),
e.g. capture, termios, pppd, etc.
2014-07-09 15:56:43 +02:00
Sebastian Huber
93726e5205 termios: Add rtems_termios_set_best_baud() 2014-07-09 15:56:43 +02:00
Christian Mauderer
8074342c9b termios: Add rtems_termios_get_termios() 2014-07-09 13:33:06 +02:00
Christian Mauderer
8448a4defc bsps/sparc: Move APBUART printk support 2014-07-09 12:07:49 +02:00
Sebastian Huber
21abc43fb5 bsps/sparc: Add and use shared APBUART console
Move the APBUART console driver support to the shared SPARC area so that
it can be reused by other BSPs.  Only the console driver initialization
is now BSP specific.
2014-07-09 12:07:49 +02:00
Sebastian Huber
a0eb21ebab bsps: Basic console driver for Termios devices 2014-07-09 12:07:49 +02:00
Sebastian Huber
a0fb29fb80 termios: PR1279: Use first open status 2014-07-09 12:07:49 +02:00
Sebastian Huber
32fc6a3490 termios: PR1279: Use set attributes status 2014-07-09 12:07:49 +02:00
Sebastian Huber
ef8c00bc88 termios: PR2153: New low-level device API
Add a new low-level device API to Termios that passes the TTY structure
to the low-level device functions.  This greatly simplifies the
low-level device drivers since they are no longer forced to derive their
private data from the minor number.

It makes it possible to use the TTY low-level lock in the device driver
low-level functions which is necessary for proper SMP support.  For
example to set the attributes it is often necessary to perform a
read-modify-write operation on a control register used also by interrupt
routines.

A compatibility layer is provided to support device drivers using the
old callback functions so it is not necessary to modify existing device
drivers.
2014-07-09 11:55:00 +02:00
Sebastian Huber
c6048ee2c5 score: _Scheduler_Thread_get_own_node()
Provide this function also for uni-processor configurations.
2014-07-09 11:22:02 +02:00
Sebastian Huber
9f228beaa6 smptests/smpmrsp01: Add and update test cases 2014-07-09 10:05:21 +02:00
Sebastian Huber
5c3d250959 score: Implement scheduler helping protocol
The following scheduler operations return a thread in need for help

    - unblock,
    - change priority, and
    - yield.

A thread in need for help is a thread that encounters a scheduler state
change from scheduled to ready or a thread that cannot be scheduled in
an unblock operation.  Such a thread can ask threads which depend on
resources owned by this thread for help.

Add a new ask for help scheduler operation.  This operation is used by
_Scheduler_Ask_for_help() to help threads in need for help returned by
the operations mentioned above.  This operation is also used by
_Scheduler_Thread_change_resource_root() in case the root of a resource
sub-tree changes.  A use case is the ownership change of a resource.

In case it is not possible to schedule a thread in need for help, then
the corresponding scheduler node will be placed into the set of ready
scheduler nodes of the scheduler instance.  Once a state change from
ready to scheduled happens for this scheduler node it may be used to
schedule the thread in need for help.
2014-07-09 10:05:17 +02:00
Joel Sherrill
52f8e90d7f schedulerpriorityaffinitysmp.c: Add period at end of sentence 2014-07-08 11:42:57 -05:00
Sebastian Huber
8568341d69 score: Need for help indicator for scheduler ops
Return a thread in need for help for the following scheduler operations

- unblock,
- change priority, and
- yield.

A thread in need for help is a thread that encounters a scheduler state
change from scheduled to ready or a thread that cannot be scheduled in
an unblock operation.  Such a thread can ask threads which depend on
resources owned by this thread for help.
2014-07-08 16:30:48 +02:00
Sebastian Huber
ac532f3350 score: Add _Scheduler_Help()
Manage the help state of threads with respect to scheduling decisions.
2014-07-08 16:30:48 +02:00
Sebastian Huber
08d9760daf score: Rename *_Node_get() to *_Thread_get_node()
This emphasizes that the scheduler node of a thread is returned and this
is not a function working with scheduler nodes like the other *_Node_*()
functions.
2014-07-08 16:30:48 +02:00
Sebastian Huber
19e417678a score: Simplify SMP processor allocation
Avoid copy and paste and set the scheduler node state in one place.
2014-07-08 16:30:48 +02:00
Sebastian Huber
835b88b883 score: Rename _Scheduler_SMP_Update_heir()
Rename and move _Scheduler_SMP_Update_heir() to
_Thread_Dispatch_update_heir() since this function is not scheduler
specific.
2014-07-08 16:30:47 +02:00
Sebastian Huber
5c632c4a18 score: Fix warning 2014-07-07 13:56:18 +02:00
Sebastian Huber
46cd17a3be score: Fix MrsP resource root change
Use the root of the owner for the new root, since the owner may depend
on a resource as well.
2014-07-04 14:52:16 +02:00
Sebastian Huber
fbda4a8834 score: PR2183: Fix context switch on SMP
Fix context switch on SMP for ARM, PowerPC and SPARC.

Atomically test and set the is executing indicator of the heir context
to ensure that at most one processor uses the heir context.  Break the
busy wait loop also due to heir updates.
2014-07-04 13:17:19 +02:00
Sebastian Huber
f28f5c4a1d arm: Use local label in _CPU_Context_restore() 2014-07-01 17:02:41 +02:00
Sebastian Huber
bec4730901 score: Add PER_CPU_OFFSET_EXECUTING
Add PER_CPU_OFFSET_HEIR.  Move Per_CPU_Control::executing and
Per_CPU_Control::heir for easy offset calculation.
2014-07-01 17:02:41 +02:00
Sebastian Huber
7ab6046a62 bsp/altera-cyclone-v: Move MMU configuration table
This makes it possible to use application specific version.
2014-07-01 15:30:07 +02:00
Sebastian Huber
9eb1994fd2 bsps/arm: Rename bsp_mm_config_table
Rename bsp_mm_config_table to arm_cp15_start_mmu_config_table and
rename bsp_mm_config_table_size to arm_cp15_start_mmu_config_table_size
to be in line with the other names in <bsp/arm-cp15-start.h>.
2014-07-01 15:23:04 +02:00
Sebastian Huber
88525944f3 sptests/spcontext01: Avoid NULL pointer access 2014-07-01 12:03:12 +02:00
Sebastian Huber
516a60a6f8 bsps/sparc: Reduce copy and paste 2014-07-01 10:25:27 +02:00
Daniel Hellstrom
47cf1adda9 LEON3: devfs free nodes must be sized
.. according to the maximum number of termios ports which is
8. Since LEON3 uses PnP to find how many UARTs there are
present we must make sure worst case work.

The current maximum of 4 free nodes caused for example the
GR712RC with its 6 UARTs to fail during devfs02 test.
2014-06-30 15:45:02 +02:00
Daniel Hellstrom
9f99232e4b LEON3: fix console close handling
On SMP rtems_interrupt_lock_context must be used. Most tests fail with a
NULL pointer exception when exiting, except on NGMP where main memory is
at 0x00000000.
2014-06-30 15:45:02 +02:00
Sebastian Huber
0b4ec4d74e smptests/smpfatal08: Support RTEMS_PARAVIRT 2014-06-30 12:30:12 +02:00
Sebastian Huber
f6b1e0630b termios: Make tty list static 2014-06-30 11:18:42 +02:00
Sebastian Huber
dd510a0b09 rtems: Delete unused <rtems/rtems/atomic.h> 2014-06-30 09:56:28 +02:00
Sebastian Huber
89f8eab582 score: Workaround for GCC 4.9 for atomic ops
The GCC 4.9 ships its own <stdatomic.h> which is not C++ compatible.
The suggested solution was to include <atomic> in case C++ is used.
This works at least with GCC 4.9.  See also:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60932
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60940
2014-06-30 09:56:23 +02:00
Sebastian Huber
b42e148587 smptests/smpmigration02: PR2183: Add test case 2014-06-24 09:53:11 +02:00
Sebastian Huber
152ad7d1cc score: Fix _Thread_Start_multitasking() on SMP
The _CPU_Context_Restart_self() implementations usually assume that self
context is executing.

FIXME: We have a race condition in _Thread_Start_multitasking() in case
another thread already performed scheduler operations and moved the heir
thread to another processor.  The time frame for this is likely too
small to be practically relevant.
2014-06-24 09:31:14 +02:00
Sebastian Huber
a92989a8bd score: Fix thread deletion on SMP
Close the thread object in _Thread_Make_zombie() so that all blocking
operations that use _Thread_Get() in the corresponding release directive
can find a terminating thread and can complete the operation.
2014-06-23 09:54:05 +02:00
Sebastian Huber
8f0c7a46ed score: Decouple thread and scheduler nodes on SMP
Add a chain node to the scheduler node to decouple the thread and
scheduler nodes.  It is now possible to enqueue a thread in a thread
wait queue and use its scheduler node at the same for other threads,
e.g. a resouce owner.
2014-06-23 09:53:59 +02:00
Sebastian Huber
647b95df9f score: Use chain nodes for ready queue support
This reduces the API to the minimum data structures to maximize the
re-usability.
2014-06-23 09:13:00 +02:00
Sebastian Huber
2d36931823 score: Collect scheduler related fields in TCB
Add Thread_Scheduler_control to collect scheduler related fields of the
TCB.
2014-06-23 09:13:00 +02:00