Commit Graph
29877 Commits
Author SHA1 Message Date
Sebastian Huber 4e2bc0a308 arm: Fix Thumb-1 targets
We cannot use the MRS or MSR instructions in Thumb-1 mode.  Stay in ARM
mode for the Thumb-1 targets during interrupt low-level processing.

Update #2751.
2016-11-21 13:15:35 +01:00
Sebastian Huber f730c25b70 powerpc/mpc5xx: Rename CPU_Interrupt_frame
The MPC5XX support uses a legacy interrupt/exception infrastructure.

Close #2819.
2016-11-21 11:19:37 +01:00
Sebastian Huber ccc92b81c9 score: Group Per_CPU_Control members by alignment
Close #2820.
2016-11-21 10:26:32 +01:00
Sebastian Huber 27eccdad87 sparc64: Fix _CPU_ISR_Is_enabled()
Update #2820.
2016-11-21 10:25:58 +01:00
Sebastian Huber fd6d3f1f03 nios2: Fix _CPU_ISR_Is_enabled()
Close #2818.
2016-11-21 10:13:37 +01:00
Sebastian Huber 9f225dea19 arm: Fix ARM_CONTEXT_CONTROL_ISR_DISPATCH_DISABLE
Close #2816.
2016-11-21 10:11:18 +01:00
Sebastian Huber c6f446bd70 bfin: ASM compatibility for <rtems/score/cpu.h>
Close #2817.
2016-11-21 10:06:36 +01:00
Sebastian Huber 142628edcd score: Optimize self-contained objects
Avoid use of the stack for the hot paths.
2016-11-18 07:30:36 +01:00
Sebastian Huber 1b87f27cac score: Constify _MRSP_Get_owner() 2016-11-18 07:30:35 +01:00
Sebastian Huber 408609f6b9 score: Add _ISR_Is_enabled()
In contrast to _ISR_Get_level() the _ISR_Is_enabled() function evaluates
a level parameter and returns a boolean value.

Update #2811.
2016-11-18 07:30:35 +01:00
Sebastian Huber 537f00ebe8 score: Restrict task interrupt level to 0 on SMP
Update #2811.
2016-11-18 07:30:35 +01:00
Sebastian Huber 7ce60b378d powerpc: Use Per_CPU_Control::isr_dispatch_disable
Update #2751.
2016-11-18 07:30:35 +01:00
Sebastian Huber d59585db26 arm: Use Per_CPU_Control::isr_dispatch_disable
Update #2751.
2016-11-18 07:30:35 +01:00
Sebastian Huber 2668e4f639 arm: Simplify _ARMV4_Exception_interrupt
Move profiling code closer to bsp_interrupt_disable() to allow re-use of
r9 later.
2016-11-18 07:30:34 +01:00
Sebastian Huber 4924756f69 arm: Use local labels 2016-11-18 07:30:34 +01:00
Sebastian Huber c11ac2d59d sparc: Use Per_CPU_Control::isr_dispatch_disable
Update #2751.
2016-11-18 07:30:34 +01:00
Sebastian Huber d5e073cde7 score: Allow interrupts during thread dispatch
Use a processor-specific interrupt frame during context switches in case
the executing thread is longer executes on the processor and the heir
thread is about to start execution.  During this period we must not use
a thread stack for interrupt processing.

Update #2809.
2016-11-18 07:30:34 +01:00
Sebastian Huber f9aa34ddd9 score: Add Per_CPU_Control::Interrupt_frame
Update #2809.
2016-11-18 07:30:34 +01:00
Sebastian Huber 2072dd242f score: Add Per_CPU_Control::isr_dispatch_disable
Update #2751.
2016-11-18 07:30:33 +01:00
Sebastian Huber dbeccf0ec0 arm: Provide CPU_Interrupt_frame for ARMv4
Update #2809.
2016-11-18 07:30:33 +01:00
Sebastian Huber 2599c8e63e powerpc: Add up to date CPU_Interrupt_frame
Rename ppc_exc_min_frame to CPU_Interrupt_frame.  Move it and the
corresponding defines to <rtems/score/cpuimpl.h>.

Update #2809.
2016-11-18 07:30:33 +01:00
Sebastian Huber bf4fdb1f1d powerpc: Move legacy CPU_Interrupt_frame
The only remaining user of CPU_Interrupt_frame on PowerPC is the mpc5xx
support.  Move it to here.

Update #2809.
2016-11-18 07:30:33 +01:00
Sebastian Huber 40d592eb3e bsps/powerpc: Avoid use of CPU_Interrupt_frame
This type is not relevant for the code since only a pointer is passed
around.

Update #2809.
2016-11-18 07:30:33 +01:00
Sebastian Huber c539a865f4 sparc: Move CPU_Interrupt_frame related defines
Move CPU_Interrupt_frame related defines to <rtems/score/cpuimpl.h>.

Update #2809.
2016-11-18 07:30:33 +01:00
Sebastian Huber 427dcee837 sparc: Rename CPU_Minimum_stack_frame
Rename SPARC-specific CPU_Minimum_stack_frame to
SPARC_Minimum_stack_frame.  Rename SPARC-specific
CPU_MINIMUM_STACK_FRAME_SIZE to SPARC_MINIMUM_STACK_FRAME_SIZE.

Update #2809.
2016-11-18 07:30:32 +01:00
Sebastian Huber d18560ae05 sparc64: Rename CPU_Minimum_stack_frame
Rename SPARC64-specific CPU_Minimum_stack_frame to
SPARC64_Minimum_stack_frame.  Rename SPARC64-specific
CPU_MINIMUM_STACK_FRAME_SIZE to SPARC64_MINIMUM_STACK_FRAME_SIZE.

Update #2809.
2016-11-18 07:30:32 +01:00
Sebastian Huber 141e16d225 rtems: Conditionally define rtems_interrupt_frame
Update #2808.
2016-11-18 07:30:32 +01:00
Sebastian Huber 8ef8a32d00 bsps/mips: Use <libcpu/isr_entries.h>
Avoid duplicate mips_vector_isr_handlers() declarations.
2016-11-18 07:30:32 +01:00
Sebastian Huber 82d30a310c score: Move CPU_PER_CPU_CONTROL_SIZE
Move CPU_PER_CPU_CONTROL_SIZE and the optional CPU_Per_CPU_control to
<rtems/score/cpuimpl.h> to hide it from <rtems.h>.
2016-11-18 07:30:32 +01:00
Sebastian Huber d78d5294cd score: Add and use _Thread_Dispatch_direct()
This function is useful for operations which synchronously block, e.g.
self restart, self deletion, yield, sleep.  It helps to detect if these
operations are called in the wrong context.  Since the thread dispatch
necessary indicator is not used, this is more robust in some SMP
situations.

Update #2751.
2016-11-18 07:30:31 +01:00
Sebastian Huber acc6d9bf37 score: Remove obsolete defines
The thread dispatch inline option is no longer used.
2016-11-18 07:30:31 +01:00
Sebastian Huber 0e658d456c posix: Simplify cleanup push/pop
The POSIX cleanup list must be proteced from asynchronous thread
deletion.  Here local interrupt disable is sufficient.
2016-11-18 07:30:31 +01:00
Sebastian Huber 1897fa6d82 sptests/sp37: Better cope with internal padding 2016-11-18 07:30:31 +01:00
Sebastian Huber 04bd261726 arm: Use TPIDRPRW for current per-CPU control
Use the previously unused TPIDRPRW register to get the per-CPU control
of the current processor.  This avoids instructions in
GET_SELF_CPU_CONTROL which are not available in Thumb mode.
2016-11-18 07:30:31 +01:00
Chris Johns 3a30c6fa5c Fix untar mkdir when the directory exists. 2016-11-18 09:10:20 +11:00
Christian Mauderer bb5d97f3eb bsp/atsamv: Make size of nocache-memory configurable. 2016-11-17 15:18:03 +01:00
Jiri Gaisler 316da9356a rtl-mdreloc-sparc.c: Do not print unaligned pointer and cause unaligned access.
updates #2802.
2016-11-14 08:21:12 -06:00
Sebastian Huber 38a1449fd4 powerpc: Add _CPU_Get_current_per_CPU_control()
Add _CPU_Get_current_per_CPU_control() on SMP configurations.  Use SPRG0
for the current per-CPU control.  This reduces the code size by three
instructions and is slightly faster.

Update #2805.
2016-11-10 09:58:37 +01:00
Sebastian Huber 58bced64b9 score: Move _CPU_Get_current_per_CPU_control()
Move _CPU_Get_current_per_CPU_control() from <rtems/score/cpu.h> to
<rtems/score/cpuimpl.h>.
2016-11-10 09:22:18 +01:00
Sebastian Huber 05ca53ddf6 rtems: Add scheduler processor add/remove
Update #2797.
2016-11-10 09:22:09 +01:00
Sebastian Huber 1f5bee3d85 score: Add and use Thread_Control::is_idle
Update #2797.
2016-11-09 15:27:30 +01:00
Sebastian Huber e6107854b2 score: Rename _Scheduler_Assignments
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-09 15:27:29 +01:00
Sebastian Huber 68ef65bd5e score: Clarify _Scheduler_SMP_Start_idle() 2016-11-09 15:27:29 +01:00
Sebastian Huber 1c46b80329 score: Add scheduler to per-CPU information
This makes it possible to adjust the scheduler of a processor at
run-time.

Update #2797.
2016-11-09 15:27:29 +01:00
Sebastian Huber f20dfa8fcd score: Avoid _Scheduler_Get_by_CPU_index( 0 )
Avoid use of processor index 0 which may have no scheduler assigned.
2016-11-09 15:27:29 +01:00
Sebastian Huber 2612a0bf5b score: Simplify _Scheduler_Get_by_id()
Avoid dead code in non-SMP configurations.  Return scheduler identifier
independent of the current processor count of the scheduler via
rtems_scheduler_ident(), since this value may change during run-time.
Check the processor count in _Scheduler_Set() under scheduler lock
protection.

Update #2797.
2016-11-09 15:27:29 +01:00
Sebastian Huber 16b14cfdf8 score: Fix _MRSP_Initialize()
The ceiling priorities must be initialized by scheduler index.  Do not
confuse it with a processor index.
2016-11-09 15:27:28 +01:00
Sebastian Huber 947814cae7 mpci: Use the first scheduler for MPCI
Avoid use of processor index 0 which may have no scheduler assigned.
2016-11-09 15:27:28 +01:00
Sebastian Huber 2f5ac5b507 rtems: Fix rtems_task_create() scheduler selection
Use the home scheduler of the executing thread for the created thread.
This is in line with pthread_create().  Using the current processor may
pick up an unexpected scheduler in case of a temporary migration, e.g.
due to locking protocols.
2016-11-09 15:27:28 +01:00
Sebastian Huber eb98dd49bc score: Inline some SMP lock operations by default
The SMP ticket lock release turned out to be suitable for inlining, e.g.
a hand full of instructions, no branches.

The changes in the screen files do not reflect the changes due to this
commit.  However, they are now up to date.  Obtained on a T4240 running
at 1.5GHz using GCC 7.0.0 20161108..
2016-11-09 15:19:59 +01:00