Commit Graph
28437 Commits
Author SHA1 Message Date
Sebastian Huber 970aa80fe1 bsp/realview-pbx-a9: Fix SMP startup 2014-06-12 13:00:47 +02:00
Sebastian Huber 4962d24d62 smptests/smpscheduler03: Test all SMP schedulers 2014-06-12 10:02:10 +02:00
Sebastian Huber 46390027c7 score: Make functions inline
These functions are used only via the function pointers in the generic
SMP scheduler implementation.  Provide them as static inline so that the
compiler can optimize more easily.
2014-06-12 10:00:39 +02:00
Sebastian Huber 82df6f347b score: Move NULL pointer check to order function
This helps to avoid untestable code for the normal SMP schedulers.
2014-06-12 09:06:53 +02:00
Sebastian Huber 65006149b9 score: Fix warnings 2014-06-12 08:49:08 +02:00
Sebastian Huber d9b54da8c5 score: Format 2014-06-12 08:48:02 +02:00
Sebastian Huber 6f4993e21a score: Add missing inline 2014-06-12 08:43:25 +02:00
Sebastian Huber 897a093519 score: Fix scheduler context initializer 2014-06-12 08:24:57 +02:00
Joel Sherrill 238629f2f1 Add SMP Priority Scheduler with Affinity
This scheduler attempts to account for needed thread migrations caused
as a side-effect of a thread state, affinity, or priority change operation.

This scheduler has its own allocate_processor handler named
_Scheduler_SMP_Allocate_processor_exact() because
_Scheduler_SMP_Allocate_processor() attempts to prevent an executing
thread from moving off its current CPU without considering affinity.
Without this, the scheduler makes all the right decisions and then
they are discarded at the end.

==Side Effects of Adding This Scheduler==

Added Thread_Control * parameter to Scheduler_SMP_Get_highest_ready type
so methods looking for the highest ready thread can filter by the processor
on which the thread blocking resides. This allows affinity to be considered.
Simple Priority SMP and Priority SMP ignore this parameter.

+ Added get_lowest_scheduled argument to _Scheduler_SMP_Enqueue_ordered().

+ Added allocate_processor argument to the following methods:
  - _Scheduler_SMP_Block()
  - _Scheduler_SMP_Enqueue_scheduled_ordered()
  - _Scheduler_SMP_Enqueue_scheduled_ordered()

+ schedulerprioritysmpimpl.h is a new file with prototypes for methods
  which were formerly static in schedulerprioritysmp.c but now need to
  be public to be shared with this scheduler.

NOTE:
  _Scheduler_SMP_Get_lowest_ready() appears to have a path which would
  allow it to return a NULL.  Previously, _Scheduler_SMP_Enqueue_ordered()
  would have asserted on it. If it cannot return a NULL,
  _Scheduler_SMP_Get_lowest_ready() should have an assertions.
2014-06-11 09:27:06 -05:00
Sebastian Huber 647859e9bb samples/pppd: Fix extra drivers initializer 2014-06-11 14:38:32 +02:00
Martin Galvan cb42c9a242 lm3s6965-testsuite.cfg: Add pppd.
When trying to compile RTEMS for the Stellaris LM3S6965 board, I had an
issue of pppd.exe's .rodata section being too big to fit in the board's
memory image (region 'ROM_INT' overflowed).
2014-06-10 09:48:54 -05:00
Sebastian Huber e473f3c12e score: Fix MrsP root node update
Set the new root after the resource tree update.
2014-06-10 16:05:10 +02:00
Sebastian Huber 2a2a16951e smptest/smpfatal03: Update due to API changes 2014-06-10 11:42:19 +02:00
Martin Boretto 19260fbe85 bsp/lpc176x: New BSP 2014-06-10 08:53:36 +02:00
Sebastian Huber c1072919fa Revert "bsps/powerpc: Fix potential relocation truncation"
This reverts commit d9ff8b3e68.

It is not that simple:

https://sourceware.org/ml/binutils/2014-06/msg00062.html

On Fri, Jun 06, 2014 at 01:31:48PM +0200, Sebastian Huber wrote:
> On 2014-06-06 13:23, Sebastian Huber wrote:
> >Ok, so this "cmplwi cr0, rX, ppc_exc_lock_std@sdarel" is illegal,
> >since
> >ppc_exc_lock_std@sdarel is signed and the immediate is unsigned
> >16-bit?  The
> >assembler doesn't issue a warning about this.
> >
> >Exists there a way to rescue this cmplwi hack without relaxing the
> >overflow
> >checks?
>
> Hm, sorry, it was surprisingly simple.  This works:
>
> "cmplwi cr0, rX, ppc_exc_lock_std@sdarel@l"
>
> I was not aware that you can add several @ in a row.

That is the wrong thing to use here.  sdarel@l translates to a VLE
reloc which applies to a split 16-bit field in VLE insns.

You want
 cmpwi cr0, rX, ppc_exc_lock_std@sdarel
to properly compare a 16-bit signed number from sym@sdarel.

Note that the assembler does error if you write something like
 cmplwi 3,-30000
or
 cmpwi 3,40000
so what the linker is now doing is extending this behaviour to link
time.
2014-06-06 14:54:37 +02:00
Sebastian Huber d9ff8b3e68 bsps/powerpc: Fix potential relocation truncation
See also

https://sourceware.org/ml/binutils/2014-06/msg00059.html

On Fri, Jun 06, 2014 at 11:01:10AM +0200, Sebastian Huber wrote:
> I performed a git bisect and found this:
>
> 93d1b056cb396d6468781fe0e40dd769891bed32 is the first bad commit
> commit 93d1b056cb396d6468781fe0e40dd769891bed32
> Author: Alan Modra <amodra@gmail.com>
> Date:   Tue May 20 11:42:42 2014 +0930
>
>     Rewrite ppc32 backend .sdata and .sdata2 handling

Hmm, I'm surprised that your git bisect found this patch.  Was
_SDA_BASE_ set differently before this?

>                 0x00000000000dfc00                _SDA_BASE_
>                 0x00000000000d7f78                ppc_exc_lock_std

>      4b8:       28 05 00 00     cmplwi  r5,0
>                         4ba: R_PPC_SDAREL16     ppc_exc_lock_std

ppc_exc_lock_std@sdarel will be calculating 0xd7f78 - 0xdfc00
which is 0xf...fff8378, and that falls foul of

commit 86c9573369616e7437481b6e5533aef3a435cdcf
Author: Alan Modra <amodra@gmail.com>
Date:   Sat Mar 8 13:05:06 2014 +1030

    Better overflow checking for powerpc32 relocations

cmplwi has an *unsigned* 16-bit field, and we now check the overflow
properly.

I wonder how many more of these we'll hit, and whether the uproar will
be enough that I'll be forced to relax the checks?
2014-06-06 13:39:55 +02:00
Sebastian Huber dc44de7686 bsps/arm: Fix TLB invalidation for ARMv7-A 2014-06-06 08:02:10 +02:00
Sebastian Huber c19342a767 bsps/arm: Fix Cortex-A9 MPCore clock driver
The nanoseconds extension returned wrong values on secondary processors
since some of the global timer registeres are banked.  Use global
variables instead.
2014-06-06 08:02:10 +02:00
Sebastian Huber 1468d70f79 bsp/altera-cyclone-v: Enable unified L2 cache 2014-06-06 08:02:10 +02:00
Sebastian Huber 2a1d86c6bf bsp/altera-cyclone-v: Move SMP support 2014-06-06 08:02:10 +02:00
Sebastian Huber 40599e7e86 bsps/arm: Change L2 cache initialization
Do not touch the L1 caches since they have been initialized by the start
hooks.
2014-06-06 08:02:09 +02:00
Sebastian Huber 8fb685b7a3 bsp/altera-cyclone-v: Simplify start hooks
Use arm_a9mpcore_start_hook_0().  The L2 cache is now disabled.
2014-06-06 08:02:09 +02:00
Sebastian Huber 330ccc5f65 bsp/altera-cyclone-v: Change default baud
Use value for standard U-Boot.
2014-06-06 08:02:09 +02:00
Sebastian Huber 82054c8052 bsp/altera-cyclone-v: Use NOLOAD for nocache sec 2014-06-06 08:02:09 +02:00
Sebastian Huber 9fa88124ef bsp/altera-cyclone-v: Simplify MMU config table 2014-06-06 08:02:08 +02:00
Sebastian Huber 2d3caccf86 bsps/arm: Define ARM_CP15_TEXT_SECTION
Define ARM_CP15_TEXT_SECTION to BSP_START_TEXT_SECTION so that the
start code is in the right section.
2014-06-06 08:02:04 +02:00
Sebastian Huber 66a2409d30 bsps/arm: Add ARM_CP15_TEXT_SECTION
Allow users of this header file to optionally place the inline functions
into a non-standard section.
2014-06-05 14:55:16 +02:00
Sebastian Huber 44fbca379a bsps/arm: Simplify L1 caches support
Delete superfluous/incorrect interrupt disable/enable.
2014-06-05 14:55:16 +02:00
Sebastian Huber d0a8f513f5 bsps/arm: Add all level data cache invalidation 2014-06-05 14:55:16 +02:00
Sebastian Huber def03aecef bsps/arm: Typo 2014-06-05 14:55:16 +02:00
Sebastian Huber 82850b8e82 bsps/arm: Cortex-A9 MPCore start
Invalidate entire branch predictor array.
2014-06-05 14:55:16 +02:00
Sebastian Huber e87ccf547b bsps/arm: Cortex-A9 MPCore start
Enable SCU only on the boot processor.
2014-06-05 14:55:16 +02:00
Sebastian Huber b938108b3d bsps/arm: Cortex-A9 MPCore start
Add arm_a9mpcore_start_enable_smp_in_auxiliary_control().
2014-06-05 14:55:16 +02:00
Sebastian Huber 041bf16fd4 bsps/arm: Simplify Cortex-A9 MPCore start
Add arm_a9mpcore_start_on_secondary_processor().  Rely on error checks
in _SMP_Start_multitasking_on_secondary_processor().
2014-06-05 14:55:16 +02:00
Sebastian Huber 9a1bab2525 score: _Per_CPU_State_wait_for_non_initial_state()
Replace _Per_CPU_State_wait_for_ready_to_start_multitasking() with
_Per_CPU_State_wait_for_non_initial_state().  Implement this function.
2014-06-05 14:55:16 +02:00
Sebastian Huber be3c257286 score: Avoid NULL pointer access
Check that the executing thread is not NULL in _Scheduler_Tick().  It
may be NULL in case the processor has an optional scheduler assigned and
the system was not able to start the processor.
2014-06-05 14:55:16 +02:00
Sebastian Huber c952ecab58 score: Delete SMP_FATAL_SHUTDOWN_EARLY
Sort enum lexicographically.
2014-06-05 14:55:15 +02:00
Daniel Hellstrom e640a88b62 remove not updated NEWS file 2014-06-05 09:34:51 +02:00
Daniel Hellstrom 537f7271b3 LEON2: enable exception prinout by default 2014-06-05 09:34:51 +02:00
Daniel Hellstrom 8343aa414c LEON3: enable exception prinout by default 2014-06-05 09:34:51 +02:00
Daniel Hellstrom a20c114f4a GRETH: remove TCP/UDP HW checksum generation
The GRETH doesn't support IP fragments.
2014-06-05 09:34:51 +02:00
Chris Johns bb581906a6 shell: Add rtems_shell_dup_current_env to get a default env.
Remove rtems_current_shell_env as this is dangerous because
the env can be NULL if used outside of a valid shell with the
POSIX key to an env set up.

Clean up the usage of rtems_current_shell_env.
2014-06-04 22:32:55 +10:00
Sebastian Huber 4d1f5008db score: Rename _Scheduler_Update()
Rename _Scheduler_Update() to _Scheduler_Update_priority().  Add
parameter for the new thread priority to avoid direct usage of
Thread_Control::current_priority in the scheduler operation.
2014-06-04 09:47:11 +02:00
Sebastian Huber 8e46738436 score: Replace _Scheduler_Allocate/Free()
Replace _Scheduler_Allocate() with _Scheduler_Node_initialize().  Remove
the return status and thus the node initialization must be always
successful.

Rename _Scheduler_Free() to _Scheduler_Node_destroy().
2014-06-04 08:37:06 +02:00
Sebastian Huber f6fc635943 sptests/spsem03: New test 2014-06-03 12:01:13 +02:00
Sebastian Huber 1d799ad6d6 rhealstone: Produce proper begin/end messages 2014-06-03 10:24:55 +02:00
Christian Mauderer 8df1f408fd score/sparc: Add support for paravirtualization
Guest systems in paravirtualization environments run usually in user
mode.  Thus it is not possible to directly access the PSR and TBR
registers.  Use functions instead of inline assembler to access these
registers if RTEMS_PARAVIRT is defined.
2014-06-03 08:35:47 +02:00
Sebastian Huber 98f2d5c505 libblock: Avoid recursive mutex 2014-06-03 08:28:46 +02:00
Christian Mauderer 5abe5a8122 smptests/smpthreadlife01: Fix for debug enabled 2014-06-03 08:17:12 +02:00
Christian Mauderer 1ee0d5f719 smptests/smpmrsp01: Fix scheduler ids 2014-06-03 08:16:09 +02:00