- 03 Jul, 2018 40 commits
-
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
Each rtnet device registered with the stack is represented by a node into /sys/devices/virtual/rtnet/. Setting the address of the real device probed by the kernel into the rtnet_device.sysbind field before calling rt_register_rtnetdev(), causes the "adapter" symlink to be installed in the newly created attribute directory, pointing at that device. e.g. static int probe_handler(struct pci_dev *pdev, const struct pci_device_id *ent) { ... rtdev->sysbind = &pdev->dev; ... ret = rt_register_rtnetdev(rtdev); ... } $ ls -l /sys/devices/virtual/rtnet/ total 0 drwxr-xr-x 2 root root 0 Mar 30 12:50 enp1s0 drwxr-xr-x 2 root root 0 Mar 30 12:50 rtlo $ ls -l /sys/devices/virtual/rtnet/enp1s0/ total 0 lrwxrwxrwx 1 root root 0 Mar 30 12:51 adapter -> ../../../pci0000:00/0000:00:13.0/0000:01:00.0 lrwxrwxrwx 1 root root 0 Mar 30 12:51 subsystem -> ../../../../class/rtnet -rw-r--r-- 1 root root 4096 Mar 30 12:50 uevent
-
Moving the definition out of the ifdef solves the following error: include/xenomai/cobalt/kernel/clock.h:260:16: error: ‘struct <anonymous>’ has no member named ‘adjust_time’ include/xenomai/cobalt/kernel/clock.h:263:19: error: ‘struct <anonymous>’ has no member named ‘adjust_time’ Signed-off-by:
Henning Schild <henning.schild@siemens.com>
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
CONFIG_X86_X32 used to depend on CONFIG_IA32_EMULATION. Since upstream commit #9b54050b, this is not the case anymore, and both options can be enabled separately. Remove the assumption about such dependency, fixing the build issue.
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Except for the short phase between thread_init and shadow_map, a thread is always identifiable via the pid of its Linux mate. Use this shorter value, which also correlates with what ftrace records anyway, instead of the pointer or the name. Report the full thread name only in prominent cases: init, resume and switch. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
All these are synchronous, and the thread context is already recorded by ftrace. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Matching numbers against syscall.h, specifically when the call is compat or x32, is tedious work. Fortunately, ftrace allows up to automate this. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Specifically useful to validate scheduling during PI or PP phases. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Adding PIDs and the state of the previous task will allow to track Xenomai task switches in kernelshark (so far via out-of-tree patches, upstream is planning for the necessary plugin concept). Moreover, reporting the current priority on context switch helps debugging unexpected or delayed context switches Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
The code of cobalt_print_sched_params is carried into the format string in tracefs, and trace-cmd tries to make any sense out of it. While it can process simply statements, this code is too complex and will prevent the parsing. Convert it into a function. That still does not resolve the parsing issue of trace-cmd, but that can be addressed by a custom plugin which can then interpret this tracepoint. That wouldn't be possible with the broken format string. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
__print_symbolic already ensures that unknown policies are printed numerically. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
That renaming only took place in 4.5. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Catch the case that we try to obtain the pid of a not yet fully initialized thread. Signal the error by returning -1 which is specifically useful in case the value is added to some debug output or trace. xnthread_host_pid is now too complex for inlining. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
This allows to inject a user-defined string into the system's ftrace without leaving RT mode (because of using a standard write on /sys/kernel/debug/tracing/trace_marker). As the signature of this function is different from the existing trace syscall, create as dedicated one. For simplicity reasons, the maximum string length that can be passed down to the kernel is limited to 255 characters (+1 for termination). We call directly into the internal __trace_puts to avoid both the unneeded strlen call of the trace_puts wrapper and the false warning that kernel code uses trace_printk. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Philippe Gerum authored
Ptracing may cause timer overruns, as the ptraced application cannot go waiting for the current period in a timely manner when stopped on a breakpoint or single-stepped. A mechanism was introduced a long time ago for hiding those overruns from the application, while ptracing is in effect. The current implementation dealing with this case has two major flaws: - it crashes the system when single-stepping (observed on ARM i.MX6q), revealing a past regression which went unnoticed so far. - it uses a big hammer to forward (most) timers without running their respective timeout handler while ptracing, in order to hide this timespan from the overrun accounting code. This introduces two issues: * the timer forwarding code sits in the tick announcement code, which is a very hot path, despite ptracing an application is definitely not a common operation. * all timers are affected / blocked during ptracing, except those which have been specifically marked (XNTIMER_NOBLCK) at creation, which turns out to be impractical for the common case. The new implementation only addresses what is at stake, i.e. hiding overrun reports due to ptracing from applications. This can be done simply by noting when a thread should disregard overruns after an exit from the ptraced mode (XNHICCUP), then discard the pending overruns if this flag is detected by the code reporting them (xntimer_get_overrun()).
-
In contrast to #ifdef CONFIG_x, #if IS_ENABLED(x) (or our wrapper of the latter) does not update the dependency information for kbuild. So, switching any config easily left inconsistent build artifacts behind. This conversion also fixes de66d324 : there is and there was never a CONFIG_XENO_DEBUG_LOCKING. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
This reveals a bug in the trylock kernel slow-path when CONFIG_XENO_OPT_DEBUG_MUTEX_SLEEP is set. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
No need to have different patterns, and the one of mutex_timedlock is more compact. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
We missed to call set_current_owner on successful acquisition. That destroyed prio ceiling and could even cause a crash when lock debugging was enabled. This can easily be addressed by switching the open-coded trylock to xnsynch_try_acquire. Nice side effect: less code. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
Since 4.9.x, the interrupt pipeline implementation guarantees that the regular context switching code may be used over the head stage, including the fpu management bits. Drop the open coded support and use mainline's implementation instead. At this chance, drop the useless conditionals for handling the non-FPU case: this one does not apply to arm64.
-
Philippe Gerum authored
-
Philippe Gerum authored
At this chance, stop using the obsolete flush_cache_all() routine which cannot honor the documented semantics for arm64. Besides, calibrating the access times to the timer registers in no-cache conditions does not make sense.
-