- 07 Apr, 2021 1 commit
-
-
We don't need this with Dovetail, there is no timestamp arithmetics to perform in userland whatsoever: we get timestamps from the regular vDSO-based clock_gettime() call. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 15 Mar, 2021 1 commit
-
-
Jan Kiszka authored
This macro may unroll to instantiating 'date' twice. If that is a call to some get-time function, as via xnstat_exectime_switch, we needlessly do that twice. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 08 Mar, 2021 6 commits
-
-
As internal interfaces are gradually being made y2038-safe, the deprecated timeval type is now available as __kernel_old_timeval in the mainline kernel for the sake of clarity. Switch to this type until Cobalt is y2038-safe as well. A wrapper is provided to build on older kernels not defining __kernel_old_timeval yet. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
In the same move, fix places which depend on such inclusion but fail to pull the related headers directly. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Since the low-level tick management code is pipeline specific, we may flatten the call stack by using the underlying pipeline API directly. At this chance, fix a uniprocessor build issue with IPIs. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> [Jan: fix non-SMP build issues on ppc32] Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> smp fixup
-
- 08 Feb, 2021 9 commits
-
-
Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Philippe Gerum <rpm@xenomai.org> [Jan: style tweak in detach_current] Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Dovetail enables irq_work for deferring the execution of a routine until the in-band stage is active again on the current CPU, we don't need to provide for any additional mechanism. Therefore we just need to wrap the pipeline interface calls to the irq_work API. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 03 Feb, 2021 7 commits
-
-
As its name suggests, TODO() can be added to the code in order to highlight a place where some implementation bits are known to be missing. Turning on CONFIG_XENO_TODO reveals the places where such markers might linger by triggering a build time assertion, so that they don't go unnoticed. We may drop this helper when the port to Dovetail is complete. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
The only user of the timer frequency setting was the machine-specific timer calibration handler, which is now gone. Therefore we don't need to know the timer frequency anymore. As a consequence, we don't care about overriding its value as determined by the I-pipe either. Let's drop all of these antiquated bits. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
The calibrated timer setup time is currently accounted for in the timer gravity triplet (.user, also used as default .irq latency), exclusively. This forces in a dynamically calculated parameter with no way to override it. Meanwhile, this value would be already included in every gravity value which autotune may determine, so this setting is pretty much redundant. Drop nktimerlat and the requirement for the machine section to provide a timer calibration handler, we don't need these. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Cobalt over Dovetail represents time values as counts of nanoseconds, dismissing the legacy (hardware) TSC representation entirely. For this reason, we can move any code which implements TSC/nanosecs conversion to the I-pipe specific section. This includes the handler applying CPU frequency updates (xnclock_update_freq()) which has no purpose over Dovetail, since these events are transparently dealt with for the proxy device by the generic clockevent framework. No functional change is introduced. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Dovetail enables applications to get timestamps from the CLOCK_MONOTONIC and CLOCK_REALTIME clocks via the regular vDSO by calling clock_gettime(), including from the out-of-band stage (i.e. primary mode). Legacy support involving IPIPE_HOSTRT can move to the I-pipe specific section. No functional change is introduced. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Although the synchronous single-stepping code has moved to the I-pipe section, we should be able to reuse the current logic nearly as is on top of Dovetail, with only minor adjustments. However, compared to the previous implementation, the single-stepping status (XNCONTHI) and the user return notifier are armed _after_ the personality handlers have run, in the relaxing path for the current thread (see xnthread_relax()). This change should not affect the overall logic, assuming no custom relax handler was depending on the original sequence of actions (which they should definitely not anyway). We keep this commit which does introduce a small functional change separated from the other scheduler-related modifications, as a convenience for chasing regressions if need be. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Implement an abstract API for the low-level context switching code, moving the legacy open coded support to the I-pipe specific section (e.g. fpu management, register file switching, root context tracking). Dovetail provides built-in support for all these nitty-gritty details, which we may tap into for the same purpose instead. The changes have been introduced in a way which properly maps to the Dovetail interface, while remaining compatible with the interface to the legacy code. No functional change is introduced. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> [Jan: make giveup_fpu static] Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 19 Jan, 2021 4 commits
-
-
Add wrappers to create "synthetic IRQs" the I-pipe way (used to be called "virtual IRQs" there). Those interrupt channels can only be triggered by software, with per-CPU semantics. We use them to schedule handlers to be run on the in-band execution stage, meaning "secondary mode" in the Cobalt jargon. We don't provide for executing handlers on the out-of-band stage, because Cobalt does not need this. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> [Jan: broke up one line in pipeline_create_inband_sirq into 2] Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Provide an abstract interface for triggering work handlers on the in-band execution stage (aka "secondary mode" in the old jargon), which can be implemented using ipipe_post_root_work() from the I-pipe, or as a Dovetail-aware irq_work. No functional change is introduced in the pre-existing code. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
No more in-tree users. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
APCs are gone, drop the related machine-specific data. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 11 Jan, 2021 6 commits
-
-
The I-pipe and Dovetail differ only marginally with respect to syscall handling. Abstract only the few details we need to cope with both interfaces. No functional change is introduced. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
No functional change is introduced. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Dovetail comes with built-in support for proxy tick device management, which enables a client core to grab control over the timer hardware based on the common clockevents abstraction. Once Dovetail's proxy tick device is declared to the common clockevent device layer, all timing requests issued by the in-band kernel for programming timer shots and controlling the device are transparently redirected to the real-time core for handling. The legacy ipipe_timer interface needs to move to the I-pipe section. No functional change is introduced. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
No functional change is introduced. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> [Jan: adjusted indention of cobalt_set_task_state, add missing include] Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Dovetail exports integrated services for proxying the host tick, which requires no specific interface for managing the hardware timer beyond the common clockevents interface. Likewise, the monotonic and realtime clocks can be read directly from the out-of-band stage via the regular kernel calls available from NMI context (ktime_get_mono_fast_ns(), ktime_get_real_fast()). Move the related support to the I-pipe section, we won't need it for Dovetail. No functional change is introduced. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
This interface is pointless with Dovetail whose applications directly refer to the wallclock time exported through the common vDSO. No functional change is introduced. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 08 Jan, 2021 6 commits
-
-
The I-pipe and Dovetail share the very same concept of out-of-band, high-priority IPI, but using a different interface. Let's abstract the calls manipulating those IPIs to make them pipeline-specific. No functional change is introduced. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
ipipe_root_p, !ipipe_root_p belong to the I-pipe jargon. Dovetail uses running_inband(), running_oob() for the same purpose instead. Replace all occurrences of ipipe_root_p found in generic code with is_primary_domain(), is_secondary_domain(), which in turn map to the proper predicates depending on the underlying pipeline flavour. No functional change is introduced. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Dovetail implements two types of locks: hard, and hybrid ones. See https://evlproject.org/dovetail/pipeline/locking/ for details. Cobalt is interested in using Dovetail's hard_spinlock_t locks, which are strictly equivalent to the ipipe_spinlock_t locks. Provide a wrapper mapping a generic hard lock to the proper implementation depending on the underlying pipeline flavour. No functional change is introduced. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Unlike the I-pipe, Dovetail comes with no specific tracer, tracepoints can be sent to common ftrace-based tracers, with the 'function' tracer reporting Dovetail-specific information such as the current execution stage, and the real & virtual interrupt states (hard disabled/enabled, stalled/unstalled) for the current context. In other words, ftrace's 'function' tracer with Dovetail is similar to the I-pipe specific tracer. Since we can use ftrace through the regular kernel interface with Dovetail, the legacy trace interface can move to the I-pipe section. No functional change is introduced. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Dovetail enables the regular irq_work() for submitting work from the out-of-band stage (primary mode) to the in-band one (secondary mode). We won't need APCs in the Dovetail case, let's move this code to the I-pipe section. No functional change is introduced. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
The I-pipe and Dovetail access the per-thread information block differently. Abstract this kernel interface. No functional change is introduced. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> [Jan: add linux/sched.h include for older kernels] Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-