AW: [PATCH v3 3/3] i386: Port to RTEMS

Jan.Sommer at dlr.de Jan.Sommer at dlr.de
Mon Mar 23 12:50:27 UTC 2020



> -----Ursprüngliche Nachricht-----
> Von: Sebastian Huber [mailto:sebastian.huber at embedded-brains.de]
> Gesendet: Montag, 23. März 2020 10:59
> An: Sommer, Jan; devel at rtems.org
> Betreff: Re: [PATCH v3 3/3] i386: Port to RTEMS
> 
> On 23/03/2020 09:06, Jan Sommer wrote:
> 
> > @@ -4597,7 +4599,12 @@ iflib_device_register(device_t dev, void *sc,
> if_shared_ctx_t sctx, if_ctx_t *ct
> >   	/* 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);
> 
> What is the reason for this change?
> 

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.

> Could you please move the changes in non-x86 specific files to a
> separate commit. Especially the <sys/callout.h> is an important header
> file used across all architectures.

Ok, will do. Should I then also do a separate commit for iflib.c as well, since it is compiled for all archtectures as well (not sure if is also used)?



More information about the devel mailing list