[PATCH 27/27] score: Add _Timecounter_Set_NTP_update_second()

2021-11-16 Thread Moyano, Gabriel
From: Sebastian Huber Allow the installation of an NTP update second handler which may be used by an NTP service. Update #4549. --- cpukit/include/rtems/score/timecounter.h | 24 +++- cpukit/score/src/kern_tc.c | 23 +-- 2 files changed, 44

[PATCH 25/27] score: Port large time delta support to RTEMS

2021-11-16 Thread Moyano, Gabriel
From: Sebastian Huber --- cpukit/score/src/kern_tc.c| 25 --- testsuites/sptests/sptimecounter01/init.c | 4 ++-- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index

[PATCH 26/27] score: Optimize timehand updates for non-SMP

2021-11-16 Thread Moyano, Gabriel
From: Sebastian Huber In uniprocessor configurations, the timehand updates are done with interrupts disabled. So, it is impossible to observe a generation number of zero. --- cpukit/score/src/kern_tc.c | 44 +++--- 1 file changed, 36 insertions(+), 8

[PATCH 23/27] timecounter: Load the currently selected tc once in tc_windup()

2021-11-16 Thread Moyano, Gabriel
From: Mark Johnston Reported by:Sebastian Huber Reviewed by:kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32729 --- cpukit/score/src/kern_tc.c | 23 --- 1 file changed, 16 insertions(+), 7

[PATCH 19/27] Remove "All Rights Reserved" from

2021-11-16 Thread Moyano, Gabriel
From: Ed Maste FreeBSD Foundation sys/ copyrights These ones were unambiguous cases where the Foundation was the only listed copyright holder (in the associated license block). Sponsored by: The FreeBSD Foundation --- cpukit/score/src/kern_tc.c | 1 - 1 file changed, 1 deletion(-) diff

[PATCH 21/27] timecounter: Lock the timecounter list

2021-11-16 Thread Moyano, Gabriel
From: Mark Johnston Timecounter registration is dynamic, i.e., there is no requirement that timecounters must be registered during single-threaded boot. Loadable drivers may in principle register timecounters (which can be switched to automatically). Timecounters cannot be unregistered, though

[PATCH 24/27] score: Initialize timehand generation to UINT_MAX

2021-11-16 Thread Moyano, Gabriel
From: Sebastian Huber This leads to a timehand generation overflow right at the system start and helps to get code coverage in test programs. --- cpukit/score/src/kern_tc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpukit/score/src/kern_tc.c

[PATCH 22/27] kern_tc.c: Scaling/large delta recalculation

2021-11-16 Thread Moyano, Gabriel
From: Sebastian Huber This change is a slight performance optimization for systems with a slow 64-bit division. The th->th_scale and th->th_large_delta values only depend on the timecounter frequency and the th->th_adjustment. The timecounter frequency of a timehand only changes when a new

[PATCH 20/27] timecounter: Let kern.timecounter.stepwarnings be set as a tunable

2021-11-16 Thread Moyano, Gabriel
From: Mark Johnston MFC after: 1 week --- cpukit/score/src/kern_tc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index 7ea38e2694..2b131bb423 100644 --- a/cpukit/score/src/kern_tc.c +++

[PATCH 17/27] Make kern.timecounter.hardware tunable

2021-11-16 Thread Moyano, Gabriel
From: Konstantin Belousov Noted and reviewed by: kevans MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D29122 --- cpukit/score/src/kern_tc.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff

[PATCH 15/27] Changes that improve DTrace FBT reliability

2021-11-16 Thread Moyano, Gabriel
From: Robert Watson on freebsd/arm64: - Implement a dtrace_getnanouptime(), matching the existing dtrace_getnanotime(), to avoid DTrace calling out to a potentially instrumentable function. (These should probably both be under KDTRACE_HOOKS. Also, it's not clear to me that they are

[PATCH 12/27] Consolidate read code for timecounters

2021-11-16 Thread Moyano, Gabriel
From: Konstantin Belousov and fix possible overflow in bintime()/binuptime(). The algorithm to read the consistent snapshot of current timehand is repeated in each accessor, including the details proper rollup detection and synchronization with the writer. In fact there are only two different

[PATCH 16/27] Add ddb 'show timecounter' command.

2021-11-16 Thread Moyano, Gabriel
From: Konstantin Belousov MFC after: 1 week Sponsored by: The FreeBSD Foundation --- cpukit/score/src/kern_tc.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index

[PATCH 18/27] kern: clarify boot time

2021-11-16 Thread Moyano, Gabriel
From: Warner Losh In FreeBSD, the current time is computed from uptime + boottime. Uptime is a continuous, smooth function that's monotonically increasing. To effect changes to the current time, boottime is adjusted. boottime is mutable and shouldn't be cached against future need. Document the

[PATCH 08/27] Instead of using an incomplete list of platforms

2021-11-16 Thread Moyano, Gabriel
From: Olivier Houchard that uses 64bits time_t in 32bits mode, special case amd64, as i386 is the only arch that still uses 32bits time_t. --- cpukit/score/src/kern_tc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c

[PATCH 14/27] Remove double-calls to tc_get_timecount()

2021-11-16 Thread Moyano, Gabriel
From: Konstantin Belousov to warm timecounters. It seems that second call does not add any useful state change for all implemented timecounters. Discussed with: bde Sponsored by: The FreeBSD Foundation MFC after: 3 weeks --- cpukit/score/src/kern_tc.c | 3 --- 1 file changed, 3

[PATCH 13/27] Mark more nodes as CTLFLAG_MPSAFE

2021-11-16 Thread Moyano, Gabriel
From: Pawel Biernacki or CTLFLAG_NEEDGIANT (17 of many) r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds

[PATCH 10/27] Initialize timehands linkage much earlier.

2021-11-16 Thread Moyano, Gabriel
From: Konstantin Belousov Reported and tested by: trasz Sponsored by: The FreeBSD Foundation MFC after: 1 week --- cpukit/score/src/kern_tc.c | 34 ++ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/cpukit/score/src/kern_tc.c

[PATCH 11/27] Remove duplicated empty lines from kern/*.c

2021-11-16 Thread Moyano, Gabriel
From: Mateusz Guzik No functional changes. --- cpukit/score/src/kern_tc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index 0051d49330..a72abaca35 100644 --- a/cpukit/score/src/kern_tc.c +++ b/cpukit/score/src/kern_tc.c @@ -1763,7

[PATCH 06/27] tc: bcopy -> memcpy

2021-11-16 Thread Moyano, Gabriel
From: Mateusz Guzik --- cpukit/score/src/kern_tc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index 6e517f9f17..28994d82b4 100644 --- a/cpukit/score/src/kern_tc.c +++ b/cpukit/score/src/kern_tc.c @@ -80,7 +80,6

[PATCH 09/27] Make timehands count selectable at boottime.

2021-11-16 Thread Moyano, Gabriel
From: Konstantin Belousov Tested by: O'Connor, Daniel Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D21563 This patch was modified by Sebastian Huber to adjust it for RTEMS. See comment in the patch. ---

[PATCH 04/27] score: Remove FreeBSD identifier

2021-11-16 Thread Moyano, Gabriel
From: Sebastian Huber --- cpukit/score/src/kern_tc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index 9e6602e478..f63e48d16b 100644 --- a/cpukit/score/src/kern_tc.c +++ b/cpukit/score/src/kern_tc.c @@ -46,7 +46,7

[PATCH 07/27] Create a new macro for static DPCPU data.

2021-11-16 Thread Moyano, Gabriel
From: Andrew Turner On arm64 (and possible other architectures) we are unable to use static DPCPU data in kernel modules. This is because the compiler will generate PC-relative accesses, however the runtime-linker expects to be able to relocate these. In preparation to fix this create two

[PATCH 05/27] Move most of the contents of opt_compat.h

2021-11-16 Thread Moyano, Gabriel
From: Brooks Davis to opt_global.h. opt_compat.h is mentioned in nearly 180 files. In-progress network driver compabibility improvements may add over 100 more so this is closer to "just about everywhere" than "only some files" per the guidance in sys/conf/options. Keep COMPAT_LINUX32 in

[PATCH 02/27] SPDX: use the Beerware identifier.

2021-11-16 Thread Moyano, Gabriel
From: "Pedro F. Giffuni" --- cpukit/score/src/kern_tc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index f004c9bf97..b17327a2f8 100644 --- a/cpukit/score/src/kern_tc.c +++ b/cpukit/score/src/kern_tc.c @@ -1,4 +1,6 @@ /*- + *

[PATCH 03/27] Use atomic_load(9) to read ppsinfo sequence numbers.

2021-11-16 Thread Moyano, Gabriel
From: Konstantin Belousov In this case volatile qualifiers enusre that a compiler does not optimize the accesses out. Reviewed by:alc, jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D13534 --- cpukit/score/src/kern_tc.c

[PATCH 01/27] kern_tc.c: Remove unused code

2021-11-16 Thread Moyano, Gabriel
From: Sebastian Huber This fix relates to a Coverity issue (PW.DECLARED_BUT_NOT_REFERENCED). --- cpukit/score/src/kern_tc.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index 1b65cf41ee..f004c9bf97 100644 ---

[PATCH 00/27] Update kern_tc in rtems 5 for ntp support

2021-11-16 Thread Moyano, Gabriel
These commits port to rtems 5 the last changes in kern_tc and timecounter pushed by Sebastian Huber. Additionally the last commit closes the ticket 4549, which is a clone of 2348(NTP support) for rtems 5. Andrew Turner (1): Create a new macro for static DPCPU data. Brooks Davis (1): Move

Re: [PATCH v2] c-user: Document new clock manager directives

2021-11-16 Thread Chris Johns
On 16/11/21 4:27 am, Sebastian Huber wrote: > On 11/11/2021 08:02, Sebastian Huber wrote:> On 09/11/2021 13:06, Sebastian > Huber wrote: >>> On 09/11/2021 08:50, Sebastian Huber wrote: On 09/11/2021 08:41, Chris Johns wrote: >> We could also use something like this: >> >> static

Re: [PATCH] config: CONFIGURE_DISABLE_BSP_SETTINGS

2021-11-16 Thread Chris Johns
OK Chris On 16/11/21 5:18 am, Sebastian Huber wrote: > Evaluate CONFIGURE_DISABLE_BSP_SETTINGS for each affected application > configuration option. This makes the code easier to review since the > influence > of CONFIGURE_DISABLE_BSP_SETTINGS is locally visible in the code. > --- >

Re: [PATCH] c-user: Use rubric for configuration options

2021-11-16 Thread Chris Johns
OK to push. This is a sensible change to make. Thanks Chris On 16/11/21 6:27 pm, Sebastian Huber wrote: > Use a rubric instead of a definition list for the application > configuration options similar to the directive documentation pages. For > direcives and application configuration options use

Re: [PATCH v2 1/4] Revert "optvermaj.yml: Allow __RTEMS_MAJOR__ to be overridden so RTEMS 7 tools can be tested"

2021-11-16 Thread Chris Johns
OK and thank you Chris On 16/11/21 5:47 pm, Sebastian Huber wrote: > This reverts commit d1bbfbea5f60f552b2b3138bb1df35c3372f2461. > --- > spec/build/cpukit/optvermaj.yml | 8 +++- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/spec/build/cpukit/optvermaj.yml

[PATCH] config: Fix IO driver table initialization

2021-11-16 Thread Sebastian Huber
Check all IO driver table configuration options which are used to initialize _IO_Driver_address_table[]. Checks for the following settings were missing: * CONFIGURE_BSP_PREREQUISITE_DRIVERS * CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS * CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER *

[PATCH] c-user: rtems_scheduler_remove_processor()

2021-11-16 Thread Sebastian Huber
Update error status description. Close #4544. --- c-user/scheduling-concepts/directives.rst | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/c-user/scheduling-concepts/directives.rst b/c-user/scheduling-concepts/directives.rst index aa0300e..1827060 100644 ---