Skip to content
  • Philippe Gerum's avatar
    cobalt/thread: handle case of invalid domain migration over non-rt CPU · fddde89d
    Philippe Gerum authored and Jan Kiszka's avatar Jan Kiszka committed
    
    
    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: default avatarPhilippe Gerum <rpm@xenomai.org>
    Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
    fddde89d