Commit Graph

28231 Commits

Author SHA1 Message Date
Joel Sherrill
e0938c2754 user/conf.t: Fix names for CONFIGURE_UNLIMITED_OBJECTS and CONFIGURE_UNLIMITED_ALLOCATION_SIZE
closes #2368.
2015-06-15 13:22:31 -05:00
Joel Sherrill
e6b31b27fb Remove use ticks for statistics configure option.
This was obsolete and broken based upon recent time keeping changes.

Thie build option was previously enabled by adding
USE_TICKS_FOR_STATISTICS=1 to the configure command line.

This propagated into the code as preprocessor conditionals
using the __RTEMS_USE_TICKS_FOR_STATISTICS__ conditional.
2015-06-15 13:20:17 -05:00
Sebastian Huber
80fca28198 score: Add _Watchdog_Preinitialize()
Add an assert to ensure that the watchdog is the proper state for a
_Watchdog_Initialize().  This helps to detect invalid initializations
which may lead to a corrupt watchdog chain.
2015-06-13 15:51:21 +02:00
Sebastian Huber
258d580c42 score: Delete unused state WATCHDOG_REMOVE_IT 2015-06-13 14:49:23 +02:00
Sebastian Huber
0562060f07 sptests/sptasknopreempt01: New test
Update #2365.
2015-06-12 13:59:47 +02:00
Joel Sherrill
becbedac78 pc386/console/fb*.c: Use atomics to avoid dependency on pthreads
closes #2364.
2015-06-11 08:06:33 -07:00
Sebastian Huber
aa2a62ce34 rtems: Do not switch off the FP attribute
This is necessary after commit 335e5caa9a.
2015-06-11 10:47:38 +02:00
Sebastian Huber
f718e790e1 Revert "timecounter: No _Timecounter_Tick_simple() for SMP"
This reverts commit 46ae1d7a2b.

The _Timecounter_Tick_simple() function actually doesn't switch to the
next timehand, so it is all right to use the simple timecounter approach
even on SMP configurations.  The use of simple timecounters is not
recommended however since they impose a performance penalty.
2015-06-11 09:56:18 +02:00
Sebastian Huber
46ae1d7a2b timecounter: No _Timecounter_Tick_simple() for SMP 2015-06-09 21:31:27 +02:00
Gedare Bloom
6f55315ff2 cpukit/rtems: Fix doc for rtems_clock_get_ticks_per_second
closes #2357.
2015-06-09 13:54:26 -04:00
Gedare Bloom
fecc911b41 doc: fix typo. closes #2361. 2015-06-09 11:46:23 -04:00
kib
e1d61fe2aa timecounter: Synchronize with FreeBSD
When updating/accessing the timehands, barriers are needed to ensure
that:
- th_generation update is visible after the parameters update is
  visible;
- the read of parameters is not reordered before initial read of
  th_generation.

On UP kernels, compiler barriers are enough.  For SMP machines, CPU
barriers must be used too, as was confirmed by submitter by testing on
the Freescale T4240 platform with 24 PowerPC processors.

Submitted by:	Sebastian Huber <sebastian.huber@embedded-brains.de>
MFC after:	1 week
2015-06-09 14:56:02 +02:00
ian
7e1a9ac5b5 timecounter: Synchronize with FreeBSD
Implement a mechanism for making changes in the kernel<->driver PPS
interface without breaking ABI or API compatibility with existing drivers.

The existing data structures used to communicate between the kernel and
driver portions of PPS processing contain no spare/padding fields and no
flags field or other straightforward mechanism for communicating changes
in the structures or behaviors of the code.  This makes it difficult to
MFC new features added to the PPS facility.  ABI compatibility is
important; out-of-tree drivers in module form are known to exist.  (Note
that the existing api_version field in the pps_params structure must
contain the value mandated by RFC 2783 and any RFCs that come along after.)

These changes introduce a pair of abi-version fields which are filled in
by the driver and the kernel respectively to indicate the interface
version.  The driver sets its version field before calling the new
pps_init_abi() function.  That lets the kernel know how much of the
pps_state structure is understood by the driver and it can avoid using
newer fields at the end of the structure that it knows about if the driver
is a lower version.  The kernel fills in its version field during the init
call, letting the driver know what features and data the kernel supports.

To implement the new version information in a way that is backwards
compatible with code from before these changes, the high bit of the
lightly-used 'kcmode' field is repurposed as a flag bit that indicates the
driver is aware of the abi versioning scheme.  Basically if this bit is
clear that indicates a "version 0" driver and if it is set the driver_abi
field indicates the version.

These changes also move the recently-added 'mtx' field of pps_state from
the middle to the end of the structure, and make the kernel code that uses
this field conditional on the driver being abi version 1 or higher.  It
changes the only driver currently supplying the mtx field, usb_serial, to
use pps_init_abi().

Reviewed by:	hselasky@
2015-06-09 14:56:02 +02:00
ian
cb6fde65c1 timecounter: Synchronize with FreeBSD
Use sbuf_printf() for sysctl strings instead of stack buffers and snprintf().
2015-06-09 14:56:02 +02:00
hselasky
b5b8116d20 timecounter: Synchronize with FreeBSD
Add mutex support to the pps_ioctl() API in the kernel.
Bump kernel version to reflect structure change.

PR:		196897
MFC after:	1 week
2015-06-09 14:56:02 +02:00
Sebastian Huber
2ccd150d28 sptests/sptimecounter03: New test 2015-06-09 14:56:02 +02:00
Sebastian Huber
7919f70e8f score: Fix compiler memory barriers for atomic ops 2015-06-09 14:56:02 +02:00
Sebastian Huber
30f8412ab3 bsps/sparc: tlib clock driver timecounter support 2015-06-09 10:01:50 +02:00
Sebastian Huber
b88d346fbd sptests/spcontext01: Add second volatile clobber
Do a volatile clobber in the context switch extension to cover the path
through _Thread_Do_dispatch() invoked after interrupt processing.
2015-06-09 09:28:36 +02:00
Sebastian Huber
a51b3526ea sparc: Add SPARC_USE_SAFE_FP_SUPPORT
The SPARC ABI is a bit special with respect to the floating point context.
The complete floating point context is volatile.  Thus from an ABI point
of view nothing needs to be saved and restored during a context switch.
Instead the floating point context must be saved and restored during
interrupt processing.  Historically the deferred floating point switch is
used for SPARC and the complete floating point context is saved and
restored during a context switch to the new floating point unit owner.
This is a bit dangerous since post-switch actions (e.g. signal handlers)
and context switch extensions may silently corrupt the floating point
context.  The floating point unit is disabled for interrupt handlers.
Thus in case an interrupt handler uses the floating point unit then this
will result in a trap.

On SMP configurations the deferred floating point switch is not
supported in principle.  So use here a safe floating point support.  Safe
means that the volatile floating point context is saved and restored
around a thread dispatch issued during interrupt processing.  Thus
post-switch actions and context switch extensions may safely use the
floating point unit.

Update #2270.
2015-06-09 09:05:50 +02:00
Sebastian Huber
335e5caa9a score: Add Thread_Control::is_fp
Store the floating-point unit property in the thread control block
regardless of the CPU_HARDWARE_FP and CPU_SOFTWARE_FP settings.  Make
sure the floating-point unit is only enabled for the corresponding
multilibs.  This helps targets which have a volatile only floating point
context like SPARC for example.
2015-06-09 09:05:50 +02:00
Sebastian Huber
b276507552 sptests/spcontext01: Improve output 2015-06-03 10:07:23 +02:00
Sebastian Huber
f455cdeabe rtems: Change CONTEXT_FP_SIZE define
Define CONTEXT_FP_SIZE to zero in case hardware and software floating
point support is disabled.  The problem is that empty structures have a
different size in C and C++.  In C++ they have a non-zero size leading
to an overestimate of the workspace size.
2015-06-03 09:20:51 +02:00
Sebastian Huber
43d7005829 smptests/smpscheduler02: Reduce required CPU count 2015-06-03 09:19:34 +02:00
Sebastian Huber
2c14e67342 smptests/smpmrsp01: Reduce required CPU count 2015-06-03 09:19:34 +02:00
Sebastian Huber
f48b73deb6 smptests/smpscheduler03: Use proper lock 2015-06-03 09:19:34 +02:00
Sebastian Huber
863dcf458b score: Remove assert
With the introduction of fine grained locking there is no longer a
one-to-one connection between the Giant lock nest level and the thread
dispatch disable level.
2015-06-03 09:19:34 +02:00
Sebastian Huber
f9a2d36455 posix: Fix _POSIX_Timer_Insert_helper() locking
Close #2358.
2015-06-03 09:18:52 +02:00
Alexander Krutwig
2764bd43d0 sparc: Disable FPU in interrupt context
Update #2270.
2015-05-30 16:46:36 +02:00
Sebastian Huber
1f6cdba6e1 sparc: Remove superfluous FP enable
The FP context save/restore makes only sense in the context of FP
threads.

Update #2270.
2015-05-30 16:46:36 +02:00
Sebastian Huber
8a1dc71b8e sparc: Avoid new window for FP save/restore
Update #2270.
2015-05-30 16:46:34 +02:00
Sebastian Huber
18d18e1c4b tmtests/tm26: Fix context switch to FP task
It is wrong to restore the floating point context here.  The
_Context_Switch() ends up in _Thread_Handler() which will call
_Thread_Restore_fp().  In _Thread_Do_dispatch() the FP restore is after
the context switch.
2015-05-29 21:20:31 +02:00
Sebastian Huber
b17fb17a56 Revert "tmtests/tm26: Avoid NULL pointer access"
There is no NULL pointer access.  Please note that
_Thread_Get_executing() != executing variable in Low_task().

This reverts commit 5611839a7e.
2015-05-29 17:51:38 +02:00
Alexander Krutwig
4a5a45045a sparc: Improve _CPU_Context_validate()
Write the pattern only once to the entry register window and the
floating point registers.

Update #2270.
2015-05-29 15:36:40 +02:00
Sebastian Huber
5611839a7e tmtests/tm26: Avoid NULL pointer access 2015-05-29 15:06:53 +02:00
Sebastian Huber
8f6a31459c posix: Fix clock_gettime()
The _TOD_Get_zero_based_uptime_as_timespec() returns already the right
value.
2015-05-29 15:03:46 +02:00
Sebastian Huber
aff220db7a bsps/powerpc: Fix potential integer overflow
Update #2356.
2015-05-29 08:59:59 +02:00
Ben Gras
3b8e3953c7 MAINTAINERS: added self 2015-05-28 14:41:37 +02:00
ragunath
d55d7a067f beagle bsp: RTC support for BBB 2015-05-28 14:41:37 +02:00
Gedare Bloom
92422be16c dosfs: avoid buffer-overread. closes #2292. 2015-05-27 11:21:12 -04:00
Sebastian Huber
9d0913d16c libtests/i2c01: Avoid stack overflow 2015-05-27 12:48:53 +02:00
Sebastian Huber
ec84273de4 score: Replace _API_Mutex_Is_locked()
Replace _API_Mutex_Is_locked() with _API_Mutex_Is_owner().
2015-05-27 12:24:24 +02:00
Sebastian Huber
ffe14b26c8 sapi: Fix workspace size estimate
Reserve a full minimum block to account for the heap protection enabled
via RTEMS_DEBUG.
2015-05-27 10:46:30 +02:00
Sebastian Huber
3f1bf0ce4b sapi: Fix workspace size estimate 2015-05-27 09:04:25 +02:00
Sebastian Huber
67901a8265 sapi: Simplify confdefs.h
The _Configure_From_workspace() already takes care that zero size
allocations contribute nothing to the workspace size estimate.
2015-05-27 08:55:51 +02:00
Sebastian Huber
ee4e7f09b4 jffs2: Move into separate library
In case the zlib compression was used, then the librtemscpu.a depended
on libz.a.  To avoid a GCC patch or complicated link flags move the
JFFS2 support into a separate library to use a simple "-ljffs2 -lz" to
link the executable.
2015-05-27 08:53:05 +02:00
Hesham ALMatary
5774c41455 generic_or1k: Fix a typo in a comment 2015-05-26 11:34:06 -05:00
Hesham ALMatary
5b1a10a01c generic_or1k: Use the correct bsp_specs file 2015-05-26 11:34:06 -05:00
Jan Dolezal
6f79310889 i386/pc386: default graphics driver changed from VGA to VESA based
basic VGA driver can be enabled during configure phase by exporting variable
USE_VGA=1 so that it is available in configure environment
cirrus driver is enabled the same way by exporting variable
USE_CIRRUS_GD5446=1
2015-05-26 11:26:54 -05:00
Jan Dolezal
56399c3bc8 i386/pc386/VESA framebuffer driver: modified and extended initialization options
driver is not initialized by default
initialization is possible through multiboot command line option or
through the string variable (see fb_default_mode.h) set in user's module
allowing the driver to evaluate this variable after the two
modules are linked together
2015-05-26 11:26:46 -05:00