1. 07 Apr, 2021 2 commits
  2. 11 Jan, 2021 1 commit
  3. 17 Dec, 2020 1 commit
  4. 03 Jul, 2018 1 commit
  5. 08 Dec, 2017 1 commit
  6. 19 Nov, 2017 2 commits
  7. 14 Nov, 2017 1 commit
    • Jan Kiszka's avatar
      cobalt/debug: Fix locking · 5036abbe
      Jan Kiszka authored and Philippe Gerum's avatar Philippe Gerum committed
      
      
      None of these functions are called over interrupt context. Leaving the
      critical sections interruptible can cause premature/double-unlock
      scenarios and bug reports such as
      
      [Xenomai] lock ffffffff81c56000 already unlocked on CPU #1
                last owner = kernel/xenomai/debug.c:74 (hash_symbol(), CPU #1)
       000000000000002f ffff88007dc8bb10 ffffffff8118ae8f ffffffff00000001
       0000000000000021 ffff88007f897fde ffff88007dc8bb50 ffffffff8118b266
       00000000000000f1 ffff88007dc8bd68 0000000000000006 ffff88007dc8bd40
      Call Trace:
       [<ffffffff8118ae8f>] xnlock_dbg_release+0xdf/0xf0
       [<ffffffff8118b266>] hash_symbol+0x236/0x2d0
       [<ffffffff8118b668>] xndebug_trace_relax+0x118/0x450
       [<ffffffff811b8d50>] ? CoBaLt32emu_mmap+0xf0/0xf0
       [<ffffffff811b8dd7>] CoBaLt32emu_backtrace+0x87/0xb0
       [<ffffffff8100def6>] ? fpu__clear+0xd6/0x160
       [<ffffffff817b3691>] ? _raw_spin_unlock_irq+0x11/0x30
       [<ffffffff811ab1cc>] ipipe_syscall_hook+0x11c/0x3a0
       [<ffffffff8113d9bf>] __ipipe_notify_syscall+0xbf/0x180
       [<ffffffff810cd019>] ? __set_current_blocked+0x49/0x50
       [<ffffffff8113daab>] ipipe_handle_syscall+0x2b/0xb0
       [<ffffffff81001c9d>] do_fast_syscall_32+0xbd/0x220
       [<ffffffff817b64e2>] sysenter_flags_fixed+0x8/0x12
      Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
      5036abbe
  8. 12 Jul, 2015 1 commit
    • Philippe Gerum's avatar
      cobalt/kernel: improve handling of user debug options · 032fb4fa
      Philippe Gerum authored
      This changeset introduces individual switches for enabling/disabling
      particular user debug features. At this chance, the related
      documentation has been updated.
      
      Notification upon secondary mode switches is still considered
      regardless of the debug settings, as production setups may depend on
      it for basic sanity testing.
      032fb4fa
  9. 16 May, 2015 1 commit
    • Philippe Gerum's avatar
      cobalt/mutex, lib/cobalt: detect attempts to sleep while holding a mutex · e3153cf2
      Philippe Gerum authored
      Going to sleep intentionally while holding a mutex is an application
      issue. When user consistency checks are enabled (XENO_OPT_DEBUG_USER),
      any attempt to do so will trigger a SIGDEBUG signal to the offending
      thread, conveying the SIGDEBUG_RESCNT_SLEEP code.
      
      This change implicitly disables fast locking optimizations for
      user-space threads when XENO_OPT_DEBUG_USER is enabled. Since the
      debugging code present or future may already add some overhead, this
      seems acceptable anyway.
      e3153cf2
  10. 17 Feb, 2015 1 commit
  11. 31 Oct, 2014 1 commit
  12. 29 Oct, 2014 1 commit
  13. 17 Oct, 2014 1 commit
  14. 21 Sep, 2014 1 commit
  15. 09 Sep, 2014 1 commit
    • Philippe Gerum's avatar
      cobalt/debug: use separate memory pool for tracing relax requests · 9e0dce83
      Philippe Gerum authored
      Pulling memory from the system heap for logging such debug data has
      two adverse effects:
      
      - it might gradually deplete the core heap due to a constantly
        misbehaving application,
      
      - it may leave the user under the (wrong) impression that a memory
        leak is ongoing in the core heap, when a sane application is
        restarted multiple times, which invariably causes a few relax spots
        to be logged during the init phase.
      
      We fix this by assigning a private memory pool for this debug
      feature. Traces will simply stop being logged when the pool is full,
      until /proc/xenomai/debug/relax is written to for flushing it.
      9e0dce83
  16. 21 Aug, 2014 1 commit
  17. 26 Jun, 2014 1 commit
    • Philippe Gerum's avatar
      cobalt/thread: enable SIGDEBUG on denied lock break detection · 3eeb8249
      Philippe Gerum authored
      Send SIGDEBUG to the thread being denied a suspension/sleep state due
      to XNTRAPLB, if the atypical/abnormal detection feature is armed.
      The new SIGDEBUG_LOCK_BREAK alert code matches this case in the
      siginfo data conveyed by SIGDEBUG.
      
      At this chance, the related TCB state and information flag names have
      been updated to better reflect the semantics:
      
      XNTRAPSW -> XNWARN (SIGDEBUG warning enabled for atypical/abnormal
      conditions)
      
      XNSWREP -> XNPIALERT (Priority inversion alert sent [via SIGDEBUG])
      3eeb8249
  18. 15 Jun, 2014 1 commit
  19. 14 Jun, 2014 1 commit
  20. 12 Jun, 2014 1 commit
  21. 29 May, 2014 1 commit
  22. 07 Jan, 2014 1 commit
  23. 29 Dec, 2013 1 commit
  24. 10 Aug, 2013 3 commits
    • Philippe Gerum's avatar
      cobalt/kernel: remove pod abstraction entirely · b569cd72
      Philippe Gerum authored
      We don't have full-fledged in-kernel APIs going in and out selectively
      anymore, we now have a stable set of API services (i.e. core, POSIX
      and RTDM), with optional limited extensions through Xenomai
      "personalities".
      
      For this reason, the former "pod" abstraction, as a mean to group
      multiple API siblings in a common generic container is not much
      relevant anymore.
      
      The ongoing design simplification now allows to drop the pod-related
      services, dispatching them to the other existing abstractions.
      
      The renaming involved are fairly straightforward for the most part,
      i.e.:
      
      * Former thread-directed ops:
        xnpod_<action>_thread() => xnthread_<action>()
      
      * Former scheduler-related ops:
        xnpod_<action>() => xnsched_<action>()
      
      Hint: xnpod_schedule() became xnsched_run() (although xnsched_ule()
      would have been delighting).
      b569cd72
    • Philippe Gerum's avatar
      bc0b0d17
    • Philippe Gerum's avatar
      cobalt/kernel: introduce external clock support · 28eb37c8
      Philippe Gerum authored
      This patch introduces a mechanism for registering external clocks
      dynamically, in addition to Xenomai's built-in core clock
      (nkclock). Each external clock may drive Xenomai timers (struct
      xntimer) using the common timer infrastructure.
      
      Xenomai's core clock has nanosecond resolution; it is paced by the
      platform timer (which is driven by the interrupt pipeline).
      
      External clocks are driven by arbitrary timer sources, directly
      managed by the client code.
      
      Each clock provides an internal interface with the timer support code,
      through a set of common operations (e.g. reading time, converting time
      values, programming the next shot if applicable).
      
      The external interface is pretty simple:
      
      - xnclock_register() for instantiating a new clock
      - xnclock_deregister() for dropping an existing clock
      - xnclock_tick() for signaling an incoming tick, so that
        timers driven by the clock are elapsed appropriately.
      
      Since we may now have multiple clocks, each driving their ow...
      28eb37c8
  25. 30 Jul, 2013 1 commit
  26. 18 Jun, 2013 3 commits
  27. 11 Feb, 2013 2 commits
    • Jan Kiszka's avatar
      nucleus: use separate SIGDEBUG reason code for rescnt imbalance · 38311022
      Jan Kiszka authored and Philippe Gerum's avatar Philippe Gerum committed
      
      
      If user space caused an imbalance of the resource counter that the
      kernel tracks for XNOTHER threads, report this error via a separate
      SIGDEBUG reason code to avoid confusions.
      Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
      38311022
    • Philippe Gerum's avatar
      cobalt: move kernel-based Xenomai threads over native linux kthreads · c0e2b14d
      Philippe Gerum authored
      This is a long due change aimed at stopping the absolute non-sense of
      creating and managing non-linux threads in a linux kernel.
      
      Aside of a massive simplification of the low-level code, using native
      linux kthreads to support kernel-based Xenomai threads also gets rid
      of the braindamage non-linux stack contexts, which is quite of a
      relief.
      
      In addition, this introduces the secondary runtime mode for Xenomai
      kthreads, despite we don't expose it though any official interface for
      sanity reasons (i.e. we have no syscall interface to do the required
      fixups in case of mode mixing, so we don't want to open this feature
      broadly).
      c0e2b14d
  28. 05 Jan, 2013 1 commit
  29. 14 Dec, 2012 1 commit
    • Philippe Gerum's avatar
      cobalt: remove HAL interface · bb4f2d90
      Philippe Gerum authored
      Originally, the HAL interface was aimed at abstracting the real-time
      enabler on top of which the nucleus sits, when running over the linux
      kernel. Along the years, we only used the Adeos pipeline for this
      purpose, and 3.x is writing this dependency in stone for the Cobalt
      core.
      
      Therefore the HAL layer becomes pointless, and removing it simplifies
      a great deal of low level Xenomai code, making architecture ports even
      simpler.
      
      In the same move, we dismiss support for legacy pipelines. A pipeline
      from the recent "core" series, exposing API revision #2 or better is
      required to build and run Xenomai 3.x.
      
      NOTE: nios2 and sh4 are not ready for prime time, since we don't have
      a core pipeline implementation for them yet. We leave them in tree
      though, waiting for catch-up.
      bb4f2d90
  30. 07 Jul, 2012 1 commit
  31. 28 Jan, 2012 3 commits