• Philippe Gerum's avatar
    cobalt/thread: handle case of invalid domain migration over non-rt CPU · bbd11b1a
    Philippe Gerum authored
    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's avatarPhilippe Gerum <rpm@xenomai.org>
    Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
    bbd11b1a
process.c 39.3 KB