cobalt/init: Fail if CPU 0 is missing from real-time CPU mask
PATCH 1/1 cobalt/init: Fail if CPU 0 is missing from real-time CPU mask
From: Jan Kiszka <[email protected]>
The core assumes in some places that CPU 0 is available for real-time. Therefore fail if the mask is excluding it.
Signed-off-by Jan Kiszka <[email protected]>
--- kernel/cobalt/init.c | 5 +++++ 1 file changed, 5 insertions(+)
kernel/cobalt/init.c +5 -0
@@ -202,6 +202,11 @@ static int __init xenomai_init(void)set_realtime_core_state (COBALT_STATE_DISABLED ); return 0; } +if (!cpumask_test_cpu (0 , &xnsched_realtime_cpus)) { +printk (XENO_ERR "CPU 0 is missing in real-time CPU mask\n" ); +set_realtime_core_state (COBALT_STATE_DISABLED ); +return -EINVAL ; + } cobalt_cpu_affinity = xnsched_realtime_cpus;#endif /* CONFIG_SMP */
Signature · 1 line
2.26.2