summaryrefslogtreecommitdiffstats
path: root/cpukit/score (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix exception handler for supporting FPUSudarshan Rajagopalan2017-02-151-4/+4
| | | | Close #2401.
* bsps/arm: do not introduce CPU_CACHE_LINE_BYTES in 4.11 and correct ↵Pavel Pisa2016-10-031-4/+2
| | | | CPU_STRUCTURE_ALIGNMENT.
* score/arm: Ensure that copile time alignment is 64 bytes for Cortex-A multilib.Pavel Pisa2016-10-022-2/+11
| | | | | | | | Some/many Cortex-A cores have data cache line length 64 bytes and maximum value has to be used for system structures alignment. Updates #2782 Updates #2783
* arm/score and shared: define ARM hypervisor mode and alternate vector table ↵Pavel Pisa2016-10-021-0/+1
| | | | | | | | | | | base access. The main reason for inclusion of minimum hypervisor related defines is that current ARM boards firmware and loaders (U-boot for example) start loaded operating system kernel in HYP mode to allow it take control of virtualization (Linux/KVM for example). Updates #2783
* score: Fix C/C++ compatibility issueSebastian Huber2016-09-2318-67/+17
| | | | | | | | | Only use CPU_Per_CPU_control if it contains at least one filed. In GNU C empty structures have a size of zero. In C++ structures have a non-zero size. In case CPU_PER_CPU_CONTROL_SIZE is defined to zero, then this structure is not used anymore. Close #2789.
* posix: Fix pthread_spin_unlock() error statusSebastian Huber2016-05-252-15/+6
| | | | Update #2719.
* score: Fix simple timecounter supportSebastian Huber2016-01-272-10/+33
| | | | Close #2502.
* score: Fix watchdog insertSebastian Huber2016-01-051-4/+12
| | | | | | | | | Under certain conditions a new watchdog was inserted with a wrong and very large delta interval due to a wrong iterator update. Bug was introduced by 1ccbd052910ed16131c74b0d5595c8a94066942d. Close #2507.
* score: Fix watchdog removalSebastian Huber2015-12-211-1/+10
| | | | | | | | | Under certain conditions a new watchdog was inserted with a wrong and very large delta interval due to an incomplete iterator update. Bug was introduced by 1ccbd052910ed16131c74b0d5595c8a94066942d. Close #2501.
* Fix _Assert() statementSebastian Huber2015-11-251-1/+1
|
* sparc: Fix context switch on SMPDaniel Cederman2015-11-171-0/+3
| | | | | | | | | | | | | | | | | | We must not load registers (e.g. PSR) from the heir context area before the heir stopped execution. With this patch the write to PSR is divided into two steps. We first update the current window pointer and then we restore the status registers and enable traps. This allows us to move the first write to PSR to be before the write to WIM, as there is now no risk that we get an interrupt where the CWP and WIM would be inconsistent. We only need to make sure that we do not use any of the non-global registers or instructions that affects CWP for three instructions after the write. In the earlier code the non-global %o1 register was used right after the write to PSR, which required the use of three nop:s. Close #2472.
* score: Fix race condition on SMPSebastian Huber2015-11-171-19/+28
| | | | | | | | We must ensure that the Thread_Control::Wait information update is visible to the target thread before we update its wait flags, otherwise we may return out of date events or a wrong status. Close #2471.
* Fix interrupt epilogue for ARMv7-AR and PowerPCSebastian Huber2015-11-171-0/+27
| | | | Close #2470.
* arm: Replace __sync_synchronize() implementationSebastian Huber2015-09-011-8/+19
|
* arm: Use compiler memory barrier by defaultSebastian Huber2015-09-011-1/+7
|
* rbtree: Delete rtems_rbtree_find_control()Sebastian Huber2015-09-011-25/+0
| | | | | This function is hard to support in alternative implementations. It has no internal use case.
* Add __synch_synchronize function for armJan Sommer2015-08-012-0/+10
| | | | Fixes link failure when linking Ada programs on the raspberry pi
* m68k: Include proper header fileSebastian Huber2015-07-241-3/+3
|
* arm: Include proper header fileSebastian Huber2015-07-231-3/+3
|
* sparc64/rtems/score/cpu.h: Delete dead declarationJoel Sherrill2015-07-161-16/+0
|
* powerpc: Do not use the ATB for e500 multilibSebastian Huber2015-07-151-1/+1
| | | | | | The e500v1 has no support for the ATB. Update #2369.
* powerpc: Fix _CPU_Counter_read()Nick Withers2015-07-151-1/+1
| | | | | | The mftb is not available on Book E processors. Use SPR 268 instead. Close #2369.
* score: Simplify _Thread_Lock_set()Sebastian Huber2015-07-131-11/+56
| | | | | Exploit the fact that the current thread lock must be the default thread lock and interrupts are disabled if we call _Thread_Lock_set().
* score: TypoSebastian Huber2015-07-131-2/+2
|
* powerpc: Add BUCSR register definesSebastian Huber2015-07-081-0/+2
|
* score: Simplify _SMP_ticket_lock_Release()Sebastian Huber2015-07-012-12/+13
| | | | | Add a SMP lock statistics pointer to SMP_lock_Stats_context and drop the SMP lock statistics parameter from _SMP_ticket_lock_Release().
* score: Accept NULL pointer in _Freechain_Put()Sebastian Huber2015-07-012-2/+5
| | | | With this a _Freechain_Put( _Freechain_Get() ) works always.
* score: Freechain handler API changesSebastian Huber2015-07-012-37/+70
| | | | | Replace the extend function with an allocator since this fits better to the current use case.
* score: Hide SMP lock profiling impl if disabledSebastian Huber2015-06-264-82/+131
| | | | The problem is that empty structures have a different size in C and C++.
* score: Simplify <rtems/score/scheduler.h>Sebastian Huber2015-06-262-4/+5
| | | | | Drop the <rtems/score/percpu.h> include since this file exposes a lot of implementation details.
* score: Simplify <rtems/system.h>Sebastian Huber2015-06-267-4/+7
| | | | | Drop the <rtems/score/percpu.h> include since this file exposes a lot of implementation details.
* score: Fix extern "C" in <rtems/score/heap.h>Sebastian Huber2015-06-251-2/+1
|
* score: Simplify <rtems/score/thread.h>Sebastian Huber2015-06-253-44/+42
| | | | | | Avoid Thread_Control typedef in <rtems/score/percpu.h>. This helps to get rid of the <rtems/score/percpu.h> include in <rtems/score/thread.h> which exposes a lot of implementation details.
* score: Move default _ISR_Is_in_progress()Sebastian Huber2015-06-253-35/+53
|
* score: Move SMP CPU_USE_DEFERRED_FP_SWITCH checkSebastian Huber2015-06-252-4/+4
|
* score: Assert proper node sizeSebastian Huber2015-06-241-3/+4
|
* arm: Implement _CPU_ISR_Get_level() for ARMv7-MSebastian Huber2015-06-151-3/+3
|
* Remove use ticks for statistics configure option.Joel Sherrill2015-06-154-29/+7
| | | | | | | | | | 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.
* score: Add _Watchdog_Preinitialize()Sebastian Huber2015-06-132-2/+23
| | | | | | 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.
* score: Delete unused state WATCHDOG_REMOVE_ITSebastian Huber2015-06-133-24/+2
|
* Revert "timecounter: No _Timecounter_Tick_simple() for SMP"Sebastian Huber2015-06-111-6/+0
| | | | | | | | | This reverts commit 46ae1d7a2b49b8f973dd6ba44fbbd38383798524. 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.
* timecounter: No _Timecounter_Tick_simple() for SMPSebastian Huber2015-06-091-0/+6
|
* timecounter: Synchronize with FreeBSDkib2015-06-091-42/+82
| | | | | | | | | | | | | | | | 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
* timecounter: Synchronize with FreeBSDian2015-06-091-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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@
* timecounter: Synchronize with FreeBSDian2015-06-091-9/+10
| | | | Use sbuf_printf() for sysctl strings instead of stack buffers and snprintf().
* timecounter: Synchronize with FreeBSDhselasky2015-06-091-8/+6
| | | | | | | | Add mutex support to the pps_ioctl() API in the kernel. Bump kernel version to reflect structure change. PR: 196897 MFC after: 1 week
* score: Fix compiler memory barriers for atomic opsSebastian Huber2015-06-091-6/+18
|
* sparc: Add SPARC_USE_SAFE_FP_SUPPORTSebastian Huber2015-06-093-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* score: Add Thread_Control::is_fpSebastian Huber2015-06-094-7/+15
| | | | | | | | 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.
* rtems: Change CONTEXT_FP_SIZE defineSebastian Huber2015-06-031-1/+5
| | | | | | | 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.