mcst-linux-kernel/patches-2024.06.26/numactl-2.0.13/0002-maxconfiguredcpus.patch

22 lines
534 B
Diff

--- a/libnuma.c 2019-08-30 02:27:06.000000000 +0300
+++ b/libnuma.c 2019-12-25 16:39:50.378018553 +0300
@@ -582,9 +582,18 @@
static void
set_configured_cpus(void)
{
+#ifndef __e2k__
maxconfiguredcpu = sysconf(_SC_NPROCESSORS_CONF) - 1;
if (maxconfiguredcpu == -1)
numa_error("sysconf(NPROCESSORS_CONF) failed");
+#else /* __e2k__ */
+ /*
+ * cpus enumeration on e2k arch is not consistent, so set
+ * maxconfiguredcpu to max number of cpus
+ */
+ maxconfiguredcpu = 63;
+#endif /* !__e2k__ */
+
}
/*