* [PATCH] cobalt/init: Fail if CPU 0 is missing from real-time CPU mask
@ 2021-07-05 10:31 Jan Kiszka
0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2021-07-05 10:31 UTC (permalink / raw)
To: Xenomai
From: Jan Kiszka <jan.kiszka@siemens.com>
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 <jan.kiszka@siemens.com>
---
kernel/cobalt/init.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/kernel/cobalt/init.c b/kernel/cobalt/init.c
index f94943f2d0..5168b56035 100644
--- a/kernel/cobalt/init.c
+++ b/kernel/cobalt/init.c
@@ -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 */
--
2.26.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-05 10:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-05 10:31 [PATCH] cobalt/init: Fail if CPU 0 is missing from real-time CPU mask Jan Kiszka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.