- 23 Nov, 2018 2 commits
-
-
Jan Kiszka authored
If we change the quota value of thread group, we should take its already consumed time during the current cycle into account. So far, we refilled the budget blindly, which could have given the group an uncontrolled "peak". This commit first update the run_budget_ns of an active group and kills its limit timer. Then it refills run_budget_ns only with the remaining budget of the current cycle, taking the new quota as limit. Accumulated credits are still dropped - not worth to deal with their complexity in this scenario. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
This is to avoid namespace conflicts (e.g.: with Clang's arm_acle.h) Signed-off-by:
Giulio Moro <giuliomoro@yahoo.it> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 16 Nov, 2018 13 commits
-
-
Jan Kiszka authored
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>
-
This is a general fix for properly initializing private copperplate heaps managed by the heapmem allocator: - the heapmem descriptor must be allocated separately, not to consume space from the heap memory. At this chance, heapmem_init() must be given the right descriptor address, not NULL. - heaps must account for the size of the meta data the allocator needs. Make sure to allocate this extra-space when no specific heap memory has been given. - upon array allocation, align the item size used in calculating the overall heap size on the next power-of-two boundary, so that the required number of items can be obtained from the pool (as the caller may rightfully assume). Without these changes, the private copperplate allocator simply cannot work on top of heapmem, so keep them grouped. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Commit #20818d45 did not check properly for failure of the device_create() call. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
xeno-test-run always returned SUCCESS, even if its children exited with non zero. So xeno-test can not be used programmatically i.e. in CI. This patch adds some more verbosity and makes xeno-test-run exit FAILURE if at least one child returned non-zero. Signed-off-by:
Henning Schild <henning.schild@siemens.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Sebastian Smolorz <sebastian.smolorz@gmx.de> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
In the following situation a recv() call to a RT-TCP socket returned 0 although there was data already copied to the caller's buffer: - S1 connects to S2 - S1 calls recv() with buffer size b1 - S2 sends data of size b2 < b1 - S1 receives the data, copies it to its buffer and waits for more data - S2 terminates the connection - S1 receives the FIN packet and also starts its shutdown procedure which includes returning from the recv() call. But instead of returning the number of bytes which were already copied it returned 0. Signed-off-by:
Sebastian Smolorz <sebastian.smolorz@gmx.de> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Setting TCP header flags like ACK was fragile and not working when RTnet was running on big endian processors. Use the macro provided by the linux kernel for setting the TCP flags instead. Signed-off-by:
Sebastian Smolorz <sebastian.smolorz@gmx.de> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Closing a connected TCP socket initiates a handshake procedure. The closing socket is supposed to receive two more packets and send one ACK at the end. RTnet's TCP stack tries to get a reference to a socket before writing data to its buffer. Taking a reference to an RTnet socket in Xenomai 3 is realized by calling rtdm_fd_lock() which fails when a socket is about to be closed. Signed-off-by:
Sebastian Smolorz <sebastian.smolorz@gmx.de> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
A bug in rt_tcp_recvmsg() prevented an application to receive data over an RTTCP socket. Data was not copied back to the application's buffer but rather into a temporary kernel buffer. Signed-off-by:
Sebastian Smolorz <sebastian.smolorz@gmx.de> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Sebastian Smolorz <sebastian.smolorz@gmx.de> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
listen() and shutdown() pass their simple int argument directly casted to void *arg, not as a pointer to their value. Signed-off-by:
Sebastian Smolorz <sebastian.smolorz@gmx.de> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Fix compilation error in rt_tcp_accept() when returning its socket's own file descriptor. Signed-off-by:
Sebastian Smolorz <sebastian.smolorz@gmx.de> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 06 Nov, 2018 3 commits
-
-
Jan Kiszka authored
Hard to find a UP target these days, and we definitely want to be generic with Debian packages. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Meanwhile required for prepare-kernel.sh. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 05 Nov, 2018 1 commit
-
-
make cast explicit to avoid warning when user code is compiled with -Wconversion Signed-off-by:
Mauro Salvini <mauro.salvini@smigroup.net> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 31 Oct, 2018 2 commits
-
-
The rtps tools reads the /proc/xenomai/sched/acct file but didn't take the xsc field in account and failed to display some Xenomai threads. This patch adds the missing field when rtps reads a line. Signed-off-by:
Christophe Blaess <christophe.blaess@logilin.fr> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
-
- 28 Oct, 2018 9 commits
-
-
Philippe Gerum authored
We may have to call the regular MII layer from this routine. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Allow to safely unload the IGB driver module still hosting an active rtnet interface, by forcing this interface down on behalf on the PCI device removal handler. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Changing the device flags now implies downing the interface prior to switching it up anew with a different set of flags. Return success upon useless calls (e.g. UP when iface is up, DOWN when iface is down). Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
We may want to force a rtnet interface up, and more likely down before unloading a driver module. Export the ioctl() code which handles the IOC_RT_IFUP/IFDOWN core ioctl requests as standalone routines. The locking model remains unchanged, with ioctl() requests and direct service calls serializing on the per-device lock. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
We have no in-tree users for these anymore. Besides, __const may be conflicting with different definitions from legacy libc headers. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
knamecpy() is meant to copying NUL terminated strings even if this incurs potential truncation of the source argument if need be, prevent GCC 8.x from detecting a false positive when -Wstringop-truncation is in effect. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
namecpy() is meant to copying NUL terminated strings even if this incurs potential truncation of the source argument if need be, prevent GCC 8.x from detecting a false positive when -Wstringop-truncation is in effect. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
GCC 8.x introduced -Wstringop-truncation to help detecting likely unwanted outcomes of strncpy(dst, src, n), such as omitting the NUL character into the destination buffer whenever n < sizeof(src). Fix unsafe strncpy() calls when we do expect a null-terminated destination buffer. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
GCC 8.x introduced -Wstringop-truncation to help detecting likely unwanted outcomes of strncpy(dst, src, n), such as omitting the NUL character into the destination buffer whenever n < sizeof(src). Fix unsafe strncpy() calls when we do expect a null-terminated destination buffer. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
- 17 Oct, 2018 3 commits
-
-
RTDM drivers refer to open files or sockets by using struct rtdm_fd. Normally, the user-side file descriptors returned by socket() or open() calls are not necessary for driver operations. However, in some special cases the user-side fd has to be determined, for example as return value of rt_tcp_accept() which is a driver function of RTnet's TCP protocol driver. Signed-off-by:
Sebastian Smolorz <sebastian.smolorz@gmx.de> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
The CPU affinity mask in __base_setup_data.cpu_affinity - which may be set by --cpu-affinity - is conventionally checked by applications for determining which CPUs are usable for real-time duties. Over Cobalt, we need to make sure that such mask reflects the set of CPUs available for running real-time threads as defined by the core (i.e. /proc/xenomai/affinity), in absence of --cpu-affinity setting. Otherwise, some applications like switchest looking at an empty affinity mask may wrongly assume that all CPUs are available for running RT threads, leading to a failure when manually pinning such thread to an invalid (non-RT) CPU. With current Cobalt core and I-pipe releases not fixed for gracefully handling invalid domain migration requests over a non-RT CPU, such a failure may trigger a kernel panic. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Drop the obsoleted mknod calls - all modern systems use devtmpfs, and that creates the rtp nodes for us. Furthermore, switch the remaining installation of udev rules to proper automake, using sysconfdir, INSTALL_DATA etc., dropping sudo from those steps (installation into privileged folders implies "sudo make install" or running as root in the first place). Finally, only differentiate between pre-existing udev.rules and default installation into rules.d. This removes the need for the install-user target - drop it. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 10 Oct, 2018 2 commits
-
-
Jan Kiszka authored
If xnregistry_enter in mq_open fails, the new entry will not be added to cobalt_mqq. But the cleanup path taken afterwards will nevertheless try to remove it from there. That will cause a crash because the mq->link is uninitialized. Fix that by initializing it as list head so that list removal becomes harmless, even when the entry is not on any list.. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Otherwise, weird results could be seen when the second wraps, leading to t1.nsec < t2.nsec, e.g.: T: 0 ( 1107) P:98 I:1000 C:1886710 Min: 0 Act: 4 Avg:2147483647 Max: -1 Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 02 Oct, 2018 4 commits
-
-
xnsched_realtime_cpus is a misnomer defining the set of CPUs which may handle timer events. cobalt_cpu_affinity is a subset of xnsched_realtime_cpus which defines which CPU(s) may run Cobalt threads. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
cobalt_cpu_affinity defines the CPU set which may run Cobalt threads, which is a subset of xnsched_realtime_cpus. I.e. we may handle IRQs over CPUs which do not run threads. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Attempting to migrate to the head domain while running on a CPU which is not in part of the real-time set is a bug, and must be detected by the core. Furthermore, for this detection to work, the I-pipe must not BUG() unconditionally when failing to schedule out such thread in __ipipe_migrate_head(), but rather let the real-time core handle the situation (i.e. Xenomai in xnthread_harden()). Until both changes are in place, running a thread issuing a real-time call over a non-RT CPU would trigger a BUG() assertion, e.g.: With kernel parameter "xenomai.supported_cpus=2", running: $ switchtest --cpu-affinity=0 would lead to: [ 11.681486] kernel BUG at kernel/sched/core.c:5816! [ 11.686343] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Make sure people do run the cyclictest the way it is intended to with Xenomai (i.e. using Xenomai's rt scheduler...). Also, detect and bail out upon spurious relaxes in dual kernel mode, so that latency results are dismissed as they should until the bug is fixed. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 27 Sep, 2018 1 commit
-
-
Jan Kiszka authored
This overwrote the pointer itself - and more. Long pending bugs. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-