- 10 Feb, 2020 1 commit
-
-
Jan Kiszka authored
The rtdm test relies on successively free file descriptors which is violated by this test when the run after each other. Reported-by:
Gylstorff Quirin <quirin.gylstorff@siemens.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 04 Feb, 2020 1 commit
-
-
Jan Kiszka authored
Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 03 Feb, 2020 1 commit
-
-
Jan Kiszka authored
This is where OpenSUSE puts them, maybe others as well. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 31 Jan, 2020 10 commits
-
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Philippe Gerum authored
Concurrent reads or writes to a buffer causing nested buffer space reservations could end up in a miscalculation of the number of bytes remaining to be read or written. Fix this by updating these counts only once the last reservation is committed. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Philippe Gerum authored
Since the vfile export and unexport operations are asynchronous, returning from xnregistry_remove() is no guarantee that the registered object won't be further accessed, especially by the vfile export handler. Plug this race at least for all in-band callers removing objects while running on root stage like RTIPC protocols by synchronizing with the workqueue which handles deferred export/unexport requests, before returning from xnregistry_remove(). This does not cover the issue of removing objects from the head stage. Fortunately, all users of the vfile export/unexport mechanism are unregistering objects from the root stage only (typically some RTDM close() handler). This issue was reported by KASAN. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Philippe Gerum authored
Running xnregistry_enter() then xnregistry_remove() in quick succession for the same object might cause the latter to NULLify the objaddr field while proc_callback() is busy calling the vfile export handler for the object, which is going to use that same value, certainly leading to a crash. This bug is due to the asynchronous nature of the vfile export/unexport process which is deferred to a regular workqueue on the root stage when kicked from the head stage. Fix this by adding a third logic state describing an aborted vfile export procedure, due to handling an object removal request while the workqueue is concurrently running for the same object. In addition, since an exported object might be stale before it is considered for export, do not anticipate on the next object to process in proc_callback() as list_for_each_entry_safe() would do, but always pick the list head under lock. At this chance, clarify the naming of the magic vfile values enumerating those states (i.e. XNOBJECT_EXPORT_xxx). Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Philippe Gerum authored
We need this information for debugging purpose when latex stop mode is enabled (--enable-verbose-latex=yes). Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Philippe Gerum authored
WARN_IF_UNDOCUMENTED is switched to "NO" to prevent a truckload of useless warnings from Doxygen since most ioctl calls are not documented. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
When we wait for all passed event bits to be set, we need to test for those bits, not the ones that are currently pending. The current code fails to detect that the condition is met when both the desired as well as other events are already pending. Reported by: Ronny Meeus <ronny.meeus@gmail.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
When we wait for all passed event bits to be set, we need to test for those bits, not the ones that are currently pending. The current code fails to detect that the condition is met when both the desired as well as other events are already pending. Reported by: Ronny Meeus <ronny.meeus@gmail.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
This fails so far due to a bug in the event wait implementations, both with cobalt and mercury. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 22 Jan, 2020 1 commit
-
-
Henning Schild authored
This feature might not be widely used but those debian packages are supposed to be generic. Having it default on brings more benefits than drawbacks for generic packages. Signed-off-by:
Henning Schild <henning.schild@siemens.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 21 Jan, 2020 1 commit
-
-
Laurentiu-Cristian Duca authored
Updated SPI Makefile and Kconfig in order to contain the option to compile am335x beaglebone black omap4 spi real-time driver. Signed-off-by:
Laurentiu-Cristian Duca <laurentiu.duca@gmail.com> [Jan: enabled in CI build] Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 16 Jan, 2020 2 commits
-
-
Jan Kiszka authored
At least the copied-in files can and should be removed on uninstall, but we do not make any efforts to remove us again from a pre-existing udev.rules. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 14 Jan, 2020 6 commits
-
-
Laurentiu-Cristian Duca authored
The ioctl_n user parameter must be set to non-zero value in order to perform ioctl(SPI_RTIOC_TRANSFER_N, TRANSFER_SIZE); if ioctl_n is 0 or undefined then the test performs ioctl(SPI_RTIOC_TRANSFER). Default SPI clock speed is set to 40MHz instead of 60MHz because bbb am335x realtime SPI driver has its maximum set to this value. Signed-off-by:
Laurentiu-Cristian Duca <laurentiu.duca@gmail.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Laurentiu-Cristian Duca authored
spi-omap2-mcspi-rt.c: I/O handling is lifted from omap2/4 mcspi linux driver. The code follows the model in spi-bcm2835.c. The theoretical maximum spi frequency of am335x omap4 is 48MHz, and the driver practical maximum frequency is limited to 40MHz. The omap4 maximum fifo queue size is 64 bytes, but when the transfer implies both sending and receiving it is limited to 32, so, in the driver things are kept simple: max 32 for tx and max 32 for rx. When the driver must transfer N bytes then ((int)(N/32))*32 bytes are transfered with fifo queue size 32 and (N mod 32) bytes are transfered with fifo queue size (N mod 32); between fifo setup, the slave chip select line is kept active by using the FORCE bit in the channel configuration register. Signed-off-by:
Laurentiu-Cristian Duca <laurentiu.duca@gmail.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Laurentiu-Cristian Duca authored
spi-bcm2835.c, spi-sun6i.c: In order to support SPI_RTIOC_TRANSFER_N ioctl option add functions bcm2835_transfer_iobufs_n() and sun6i_transfer_iobufs_n() which are similar to ..._transfer_iobufs(), but allow user specified len for spi transfer. Signed-off-by:
Laurentiu-Cristian Duca <laurentiu.duca@gmail.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Laurentiu-Cristian Duca authored
SPI_RTIOC_TRANSFER_N allows the user to make SPI transfers of arbitrary lengths by using the same mmapped memory area. Signed-off-by:
Laurentiu-Cristian Duca <laurentiu.duca@gmail.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Laurentiu-Cristian Duca authored
spi-master.c: spi_master_read_rt(): when master->ops->read() completes successfully it returns > 0, so, in this case, copy data to userspace. Signed-off-by:
Laurentiu-Cristian Duca <laurentiu.duca@gmail.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Maintenance will continue based on that branch only. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 17 Dec, 2019 1 commit
-
-
Jan Kiszka authored
f116e7eb already tried to enable live updates of a quota group but got one thing wrong and missed another catch: First, we must not use group_is_active() to check if the group is currently consuming time. That has to be the same logic as in xnsched_quota_pick(), i.e. a check of the currently running thread on the target sched belongs to the modified group. The second issue is that, if a group had no budget on refill or consumed it in this period already, an extension of the budget missed to move expired threads back to the runqueue. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 12 Dec, 2019 1 commit
-
-
Jan Kiszka authored
Add missing forward declaration of timex, avoid incorrect alias creations by COBALT_IMPL due to wrongly defined fputc and putchar. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 09 Dec, 2019 1 commit
-
-
Jan Kiszka authored
Make use of the kernel interface change in c20ed9f1 to fix truncation on 64-bit systems when passing pointers. Reported-by:
Norbert Lange <nolange79@gmail.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 06 Dec, 2019 2 commits
-
-
Jan Kiszka authored
Currently not an issue for the kernels we pull here, but 4.14-ppc would break e.g. because ls-remote --tags gives ... ipipe-core-4.14.36-ppc32-1.1 ... ipipe-core-4.14.36-ppc32-1.1^{} with the second one representing the dereferentiation of the annotated tag. We only need the first one, though, while the second breaks git clone. --refs filters this. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 05 Dec, 2019 1 commit
-
-
Jan Kiszka authored
This was missed in cfa2c51d. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 02 Dec, 2019 11 commits
-
-
Philippe Gerum authored
Kicking the rescheduling procedure (xnsched_run()) from call sites running over the root thread with hard irqs enabled may lead to missing a rescheduling opportunity as a consequence of a CPU migration, e.g.: CPU0 CPU1 ---- ---- t0: ... <context switch> t1: xnthread_resume(t0) xnsched_run() <CPU MIGRATION --> | | | | x | (missed rescheduling) v ___xnsched_run(CPU1.sched) To address this issue, make sure every call to xnsched_run() either runs from the head domain which is not affected by CPU migration, or moves into the latest atomic section which might have changed the scheduler state. Turning on CONFIG_XENO_OPT_DEBUG_COBALT also enables a (oneshot) assertion which detects invalid calls from the root domain with hard irqs enabled. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Philippe Gerum authored
rtdm_nrtsig_pend() is based on ipipe_post_root_work(), which keeps a copy of every request descriptor internally until it is consumed by the secondary mode handler. Triggering rtdm_nrtsig_pend() every time a packet is relayed from the stack to the tap device may cause such request buffer to overflow under pressure. To address this issue, trigger the non-rt signal only when the RX queue transitions from empty to non-empty state as a result of enqueuing the next skb. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
This feature is useful for applications tuning scheduling parameters from within RT contexts. Primarily a topic for legacy applications. But as this doesn't come with noteworthy downsides, make it available in the generic package configuration. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Now that this path goes via an own syscall, better test it. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
As we didn't migrate to RT, we didn't test properly if lazy parameter application actually works. Fix that, also taking into account the related config switch. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
This reverts commit b3c70f1a. Was broken by design and is now no longer needed. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Switch the implementation of pthread_setschedprio to the new cobalt syscall in order to avoid scheduler setting corruptions for SCHED_QUOTA and similar complex policies. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
The approach of using thread_setschedparam_ex with __SCHED_CURRENT failed for policies with complex parameter sets. Therefore, introduce a syscall that is fully aware of how to apply only the priority change to the target thread's scheduling settings. We need a compat path as well because we are passing down pointers. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
This pattern will be reused by cobalt_thread_setschedprio. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Philippe Gerum authored
rtdm_nrtsig_pend() is based on ipipe_post_root_work(), which keeps a copy of every request descriptor internally until it is consumed by the secondary mode handler. Triggering rtdm_nrtsig_pend() every time a packet is relayed from the stack to the tap device may cause such request buffer to overflow under pressure. To address this issue, trigger the non-rt signal only when the call completion queue transitions from empty to non-empty state. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Philippe Gerum authored
rtdm_nrtsig_pend() is based on ipipe_post_root_work(), which keeps a copy of every request descriptor internally until it is consumed by the secondary mode handler. Triggering rtdm_nrtsig_pend() every time a packet is relayed from the stack to the VNIC may cause such request buffer to overflow under pressure. To address this issue, trigger the non-rt signal only when the RX queue transitions from empty to non-empty state as a result of enqueuing the next skb. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-