<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>On 23/03/2020 13:50, <a class="moz-txt-link-abbreviated" href="mailto:Jan.Sommer@dlr.de">Jan.Sommer@dlr.de</a> wrote:<br>
</p>
<blockquote type="cite"
cite="mid:16c8438dae3045ac8af70dad6102b589@dlr.de">
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite" style="color: #000000;">
<pre class="moz-quote-pre" wrap="">-----Ursprüngliche Nachricht-----
Von: Sebastian Huber [<a class="moz-txt-link-freetext" href="mailto:sebastian.huber@embedded-brains.de" moz-do-not-send="true">mailto:sebastian.huber@embedded-brains.de</a>]
Gesendet: Montag, 23. März 2020 10:59
An: Sommer, Jan; <a class="moz-txt-link-abbreviated" href="mailto:devel@rtems.org" moz-do-not-send="true">devel@rtems.org</a>
Betreff: Re: [PATCH v3 3/3] i386: Port to RTEMS
On 23/03/2020 09:06, Jan Sommer wrote:
</pre>
<blockquote type="cite" style="color: #000000;">
<pre class="moz-quote-pre" wrap="">@@ -4597,7 +4599,12 @@ iflib_device_register(device_t dev, void *sc,
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">if_shared_ctx_t sctx, if_ctx_t *ct
</pre>
<blockquote type="cite" style="color: #000000;">
<pre class="moz-quote-pre" wrap=""> /* Set up cpu set. If it fails, use the set of all CPUs. */
if (bus_get_cpus(dev, INTR_CPUS, sizeof(ctx->ifc_cpus), &ctx-
ifc_cpus) != 0) {
device_printf(dev, "Unable to fetch CPU list\n");
+#ifndef __rtems__
CPU_COPY(&all_cpus, &ctx->ifc_cpus);
+#else /* __rtems__ */
+ cpuset_t cpus = {all_cpus};
+ CPU_COPY(&cpus, &ctx->ifc_cpus);
+#endif /* __rtems__ */
}
MPASS(CPU_COUNT(&ctx->ifc_cpus) > 0);
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">What is the reason for this change?
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">For RTEMS the all_cpus variable has been replaced in freebsd/sys/sys/smp.h to " #define all_cpus 1U".
The additional variable is there because CPU_COPY requires an address.
</pre>
</blockquote>
Ok, problems like this are an indication that you try to use a
feature which is not really supported. I would first try to
understand what the purpose of the ifc_cpus is. Maybe this stuff
could be disabled completely.<br>
</body>
</html>