-
The CPU affinity mask in __base_setup_data.cpu_affinity - which may be set by --cpu-affinity - is conventionally checked by applications for determining which CPUs are usable for real-time duties. Over Cobalt, we need to make sure that such mask reflects the set of CPUs available for running real-time threads as defined by the core (i.e. /proc/xenomai/affinity), in absence of --cpu-affinity setting. Otherwise, some applications like switchest looking at an empty affinity mask may wrongly assume that all CPUs are available for running RT threads, leading to a failure when manually pinning such thread to an invalid (non-RT) CPU. With current Cobalt core and I-pipe releases not fixed for gracefully handling invalid domain migration requests over a non-RT CPU, such a failure may trigger a kernel panic. Signed-off-by: Philippe Gerum <rpm@xenomai.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
bed7acf3