1. 28 Oct, 2018 6 commits
  2. 17 Oct, 2018 3 commits
    • Sebastian Smolorz's avatar
      rtdm: expose user-side file descriptors to drivers · 04df9389
      Sebastian Smolorz authored
      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: default avatarSebastian Smolorz <sebastian.smolorz@gmx.de>
      Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
      04df9389
    • Philippe Gerum's avatar
      boilerplate/setup: cobalt: do not advertise non-RT CPUs to applications · bed7acf3
      Philippe Gerum authored
      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's avatarPhilippe Gerum <rpm@xenomai.org>
      Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
      bed7acf3
    • Jan Kiszka's avatar
      build: Modernize device installation · e3eefdf4
      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's avatarJan Kiszka <jan.kiszka@siemens.com>
      e3eefdf4
  3. 10 Oct, 2018 2 commits
  4. 02 Oct, 2018 4 commits
  5. 27 Sep, 2018 1 commit
  6. 24 Sep, 2018 3 commits
    • Philippe Gerum's avatar
      cobalt: use generic linux/uaccess.h header · bae753be
      Philippe Gerum authored
      asm/uaccess.h is an arch-local, partial header which may cause build
      issues if included directly.
      Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
      Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
      bae753be
    • Marek Vasut's avatar
      cobalt/arm64: prepare-kernel: Map aarch64 to arm64 · 6171f857
      Marek Vasut authored
      Various build systems and also the kernel uses aarch64 to refer to
      arm64, map aarch64 and arm64 to the same thing.
      Signed-off-by: Marek Vasut's avatarMarek Vasut <marex@denx.de>
      Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
      6171f857
    • Philippe Gerum's avatar
      drivers/can: flexcan: rebase on mainline v4.14.58 · c6f278d6
      Philippe Gerum authored
      Usable with latest Flexcan controller revisions available from recent
      i.MX series. The older driver would break when initializing the chip
      (FIFO activation), e.g.:
      
      [  957.052272] rtcan0: real bitrate 1000000, sampling point 75.0%
      [  957.058325] rtcan0: writing ctrl=0x011a2003
      [  957.062670] rtcan0: flexcan_set_bit_time: mcr=0x5980000f ctrl=0x011a2003
      [  957.069403] rtcan0: flexcan_chip_start: writing mcr=0x79a2020f
      [  957.069421] rtcan0: flexcan_chip_start: writing ctrl=0x011aac53
      [  957.075359] Unhandled fault: imprecise external abort (0x1c06) at 0xaec71a2c
      [  957.088371] pgd = cae8c000
      [  957.091106] [aec71a2c] *pgd=9d843835, *pte=ba49d75f, *ppte=ba49dc7f
      [  957.097447] Internal error: : 1c06 [#1] SMP ARM
      [  957.108324] CPU: 1 PID: 843 Comm: rtcanconfig Not tainted 4.14.34 #1
      [  957.115391] Hardware name: Freescale i.MX7 Dual (Device Tree)
      [  957.121155] I-pipe domain: Linux
      [  957.124404] task: caee1900 task.stack: ca5d0000
      [  957.128968] PC is at flexcan_chip_start+0x180/0x34c
      [  957.133869] LR is at flexcan_chip_start+0x178/0x34c
      
      As a bonus, the latest work arounds addressing silicon bugs are now
      included (e.g. use of timestamp-based offloading when the FIFO
      ordering does not match the time of arrival).
      Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
      Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
      c6f278d6
  7. 17 Sep, 2018 4 commits
  8. 06 Sep, 2018 4 commits
    • Jan Kiszka's avatar
      Add CONTRIBUTING guide and workflow explanation · 1b5b1156
      Jan Kiszka authored
      Shall both help new comers to understand in which form patches are
      requested and what will happen to them normally after submitting them.
      Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
      1b5b1156
    • Jan Kiszka's avatar
      cobalt/posix/signal: Fix return code on siginfo copy errors · 09b207f9
      Jan Kiszka authored
      The put_siginfo functions return a non-zero value on error. We have to
      convert that into proper -EFAULT before returning.
      Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
      09b207f9
    • Philippe Gerum's avatar
      cobalt/sched: improve watchdog accuracy · f5a67a24
      Philippe Gerum authored
      The original watchdog mechanism was based on a sampling method: every
      second (built-in value), it used to check the runtime mode of the
      current task preempted on the ticking CPU. A per-cpu counter was
      increased by one every time rt/primary mode was detected, then checked
      against the trigger limit (CONFIG_XENO_OPT_WATCHDOG_TIMEOUT).
      Otherwise, the counter was reset to zero.
      
      With this fairly naive approach, it only takes a single hit with
      CONFIG_XENO_OPT_WATCHDOG_TIMEOUT=1 to trigger the watchdog, i.e. if
      the system-fixed 1s watchdog tick preempts any Xenomai task when it is
      running in primary mode on the current CPU, the watchdog fires.
      
      The default value of 4s papered over the inherent imprecision of such
      a coarse-grained method, lengthening the odds of observing false
      positive triggers.
      
      To improve the accuracy of the watchdog, arm the watchdog timer to
      fire at the final trigger date directly, right before switching the
      CPU to primary mode (leave_root()), disarming it when the CPU is about
      to switch back to secondary mode (enter_root()).
      
      Better accuracy comes at the expense of slightly more overhead when
      transitioning between primary and secondary modes, which should be
      acceptable for a debug feature which is not affecting the hot path
      anyway (i.e. there is no added cost for strictly rt context switches).
      Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
      Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
      f5a67a24
    • Philippe Gerum's avatar
      b4cd0f72
  9. 04 Sep, 2018 1 commit
  10. 03 Sep, 2018 6 commits
  11. 31 Aug, 2018 2 commits
    • Philippe Gerum's avatar
      drivers/autotune: fix computation of gravity limit · 553881db
      Philippe Gerum authored
      A wrongly computed gravity limit value caused the calibration to end
      too early on some platforms (e.g. arm64).
      
      This value should be the max. among the set of min. latencies observed
      while running the warmup steps. In the same move, run more warmup
      steps to increase the likeliness of reaching such max.
      553881db
    • Philippe Gerum's avatar
      drivers/autotune: fix calibration with low frequency timers · 262cdf25
      Philippe Gerum authored
      When a single timer tick last less than the adjustment step time
      (i.e. < 500 ns), we end up with a zero adjustment value which either
      leads to a spurious early shot detection due to a rounding error, or a
      null gravity value at the end of a lengthy but useless calibration
      process.
      
      Make sure to adjust by at least one timer tick, and mitigate rounding
      errors when checking for early shots when the timer frequency is lower
      than 1e9 / ADJUSTMENT_STEP.
      262cdf25
  12. 28 Aug, 2018 1 commit
    • Philippe Gerum's avatar
      cobalt/arm64: calibrate: prevent excessive delay of next host tick · abd64d98
      Philippe Gerum authored
      The calibration procedure overwrites the current value of the timer
      counter for a pending oneshot tick event, which is admittedly ok in
      the context of initializing Cobalt. However, the previous
      implementation maxed the counter value, potentially causing excessive
      delay to the host waiting for the overwritten timer event.
      
      Use a shorter delay value when calibrating so that the next shot does
      not occur later than one jiffy after we left the calibration
      routine. One jiffy is also long enough for preventing the timer to
      ever fire while running the calibration loop.
      abd64d98
  13. 25 Aug, 2018 1 commit
  14. 22 Aug, 2018 1 commit
    • Philippe Gerum's avatar
      cobalt/arm: calibrate: prevent excessive delay of next host tick · 630f0a33
      Philippe Gerum authored
      The calibration procedure overwrites the current value of the timer
      counter for a pending oneshot tick event, which is admittedly ok in
      the context of initializing Cobalt. However, the previous
      implementation maxed the counter value, potentially causing excessive
      delay to the host waiting for the overwritten timer event.
      
      Use a shorter delay value when calibrating so that the next shot does
      not occur later than one jiffy after we left the calibration
      routine. One jiffy is also long enough for preventing the timer to
      ever fire while running the calibration loop.
      630f0a33
  15. 20 Aug, 2018 1 commit