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

2021-11-07 Thread Sebastian Huber
On 25/10/2021 19:50, Sebastian Huber wrote: On 19/10/2021 17:25, Sebastian Huber wrote: Add new clock manager directives to get all times provided by the timehands. Update #4527. --- For an updated document to review see: https://ftp.rtems.org/pub/rtems/people/sebh/c-user.pdf v2: Clarify

[PATCH 13/26] Remove double-calls to tc_get_timecount()

2021-11-07 Thread Sebastian Huber
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 11/26] Consolidate read code for timecounters

2021-11-07 Thread Sebastian Huber
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 09/26] Initialize timehands linkage much earlier.

2021-11-07 Thread Sebastian Huber
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 10/26] Remove duplicated empty lines from kern/*.c

2021-11-07 Thread Sebastian Huber
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 28a936232b..3af77ed05a 100644 --- a/cpukit/score/src/kern_tc.c +++ b/cpukit/score/src/kern_tc.c @@ -1780,7

[PATCH 08/26] Make timehands count selectable at boottime.

2021-11-07 Thread Sebastian Huber
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 22/26] timecounter: Load the currently selected tc once in tc_windup()

2021-11-07 Thread Sebastian Huber
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 26/26] score: Add _Timecounter_Set_NTP_update_second()

2021-11-07 Thread Sebastian Huber
Allow the installation of an NTP update second handler which may be used by an NTP service. Update #2348. --- cpukit/include/rtems/score/timecounter.h | 24 ++- cpukit/score/src/kern_tc.c | 30 2 files changed, 48 insertions(+), 6

[PATCH 21/26] kern_tc.c: Scaling/large delta recalculation

2021-11-07 Thread 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 timecounter is activated for

[PATCH 17/26] kern: clarify boot time

2021-11-07 Thread Sebastian Huber
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 25/26] score: Optimize timehand updates for non-SMP

2021-11-07 Thread 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 deletions(-) diff --git

[PATCH 24/26] score: Port large time delta support to RTEMS

2021-11-07 Thread 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 e43e3226b1..5544b9ecde 100644 ---

[PATCH 23/26] score: Initialize timehand generation to UINT_MAX

2021-11-07 Thread 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 b/cpukit/score/src/kern_tc.c index

[PATCH 01/26] SPDX: use the Beerware identifier.

2021-11-07 Thread Sebastian Huber
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 b5f761aae0..5fd318e984 100644 --- a/cpukit/score/src/kern_tc.c +++ b/cpukit/score/src/kern_tc.c @@ -16,6 +16,8 @@ */

[PATCH 05/26] tc: bcopy -> memcpy

2021-11-07 Thread Sebastian Huber
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 721a074e90..d7547cfe3f 100644 --- a/cpukit/score/src/kern_tc.c +++ b/cpukit/score/src/kern_tc.c @@ -97,7 +97,6

[PATCH 16/26] Make kern.timecounter.hardware tunable

2021-11-07 Thread Sebastian Huber
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/26] Add ddb 'show timecounter' command.

2021-11-07 Thread Sebastian Huber
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 02/26] Use atomic_load(9) to read ppsinfo sequence numbers.

2021-11-07 Thread Sebastian Huber
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 03/26] score: Remove FreeBSD identifier

2021-11-07 Thread 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 ec30d8145e..f0726c7b23 100644 --- a/cpukit/score/src/kern_tc.c +++ b/cpukit/score/src/kern_tc.c @@ -63,7 +63,7 @@ #include #endif /*

[PATCH 14/26] Changes that improve DTrace FBT reliability

2021-11-07 Thread Sebastian Huber
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 18/26] Remove "All Rights Reserved" from

2021-11-07 Thread Sebastian Huber
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 07/26] Instead of using an incomplete list of platforms

2021-11-07 Thread Sebastian Huber
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 19/26] timecounter: Let kern.timecounter.stepwarnings be set as a tunable

2021-11-07 Thread Sebastian Huber
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 4b79b23706..e8c773a890 100644 --- a/cpukit/score/src/kern_tc.c +++

[PATCH 04/26] Move most of the contents of opt_compat.h

2021-11-07 Thread Sebastian Huber
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 06/26] Create a new macro for static DPCPU data.

2021-11-07 Thread Sebastian Huber
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 20/26] timecounter: Lock the timecounter list

2021-11-07 Thread Sebastian Huber
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 12/26] Mark more nodes as CTLFLAG_MPSAFE

2021-11-07 Thread Sebastian Huber
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 00/26] Synchronize timecounter with FreeBSD

2021-11-07 Thread Sebastian Huber
This patch set synchronizes kern_tc.c with the latest FreeBSD version. Some changes were discussed on a FreeBSD mailing list. Two patches were integrated in FreeBSD which help using the timecounters in RTEMS. One patch adds a callback registration for NTP support. Andrew Turner (1): Create a

Re: [PATCH RSB v3] rtems-kernel: Implement kernel recipe using waf

2021-11-07 Thread Chris Johns
OK and thanks Chris On 5/11/21 1:31 am, Ryan Long wrote: > Closes #4145 > --- > rtems/config/tools/rtems-kernel-6.cfg | 6 +- > rtems/config/tools/rtems-kernel-common.cfg | 125 +++ > source-builder/sb/rtems-kernel-config-check | 147 >

[RSB v1 2/2] config/[67]/rtems-*.bset: Move dtc to default set

2021-11-07 Thread Joel Sherrill
--- rtems/config/6/rtems-default.bset| 2 ++ rtems/config/6/rtems-microblaze.bset | 2 -- rtems/config/6/rtems-moxie.bset | 1 - rtems/config/7/rtems-default.bset| 2 ++ rtems/config/7/rtems-moxie.bset | 1 - 5 files changed, 4 insertions(+), 4 deletions(-) diff --git

[RSB v1 1/2] rtems-tools-6.cfg: Bump rtems-tools hash

2021-11-07 Thread Joel Sherrill
--- rtems/config/tools/rtems-tools-6.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtems/config/tools/rtems-tools-6.cfg b/rtems/config/tools/rtems-tools-6.cfg index 4158753..6d05d12 100644 --- a/rtems/config/tools/rtems-tools-6.cfg +++

[RSB v1 0/2] Update rtems-tools and move dtc to base set

2021-11-07 Thread Joel Sherrill
Hi I'm putting these out for review while the tools are still building. If anyone sees an issue with these, I am sure you will comment. :) Otherwise, I am likely to push these Tuesday. --joel Joel Sherrill (2): rtems-tools-6.cfg: Bump rtems-tools hash config/[67]/rtems-*.bset: Move dtc to