[PATCH v4 3/3] i386: Port to RTEMS

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Apr 15 07:13:26 UTC 2020


On 09/04/2020 16:10, Jan.Sommer at dlr.de wrote:

>> -----Ursprüngliche Nachricht-----
>> Von: Sommer, Jan
>> Gesendet: Donnerstag, 9. April 2020 15:57
>> An:devel at rtems.org
>> Cc: Sommer, Jan
>> Betreff: [PATCH v4 3/3] i386: Port to RTEMS
>>
>> - Update imported files to compile rtems-libbsd for i386 based BSPs
>> ---
> [...]
>> diff --git a/freebsd/sys/kern/subr_gtaskqueue.c
>> b/freebsd/sys/kern/subr_gtaskqueue.c
>> index c061c6b0..4ef05e0a 100644
>> --- a/freebsd/sys/kern/subr_gtaskqueue.c
>> +++ b/freebsd/sys/kern/subr_gtaskqueue.c
>> @@ -744,7 +744,9 @@ taskqgroup_attach(struct taskqgroup *qgroup, struct
>> grouptask *gtask,
>>   			    __func__, gtask->gt_name, error);
>>   	} else
>>   #else /* __rtems__ */
>> +#ifndef __i386__
>>   	BSD_ASSERT(irq == -1);
>> +#endif /* __i386 */
>>   #endif /* __rtems__ */
>>   		mtx_unlock(&qgroup->tqg_lock);
>>   }
>> @@ -776,7 +778,9 @@ taskqgroup_attach_deferred(struct taskqgroup
>> *qgroup, struct grouptask *gtask)
>>
>>   	}
>>   #else /* __rtems__ */
>> +#ifndef __i386__
>>   	BSD_ASSERT(gtask->gt_irq == -1);
>> +#endif /* __i386 */
>>   #endif /* __rtems__ */
>>   	qgroup->tqg_queue[qid].tgc_cnt++;
>>   	LIST_INSERT_HEAD(&qgroup->tqg_queue[qid].tgc_tasks, gtask,
>> gt_list);
> For example in "iflib_legacy_setup" the function " taskqgroup_attach" is called with an irq value other than -1, which triggers the assert.
> Now, with the assert disabled the driver seems to work and we can, e.g. get an IP with the dhcpcd0x tests.
> We haven't managed to find out what the assert is for exactly, so I don't know if that opens a can of worms.
> Is this safe to do?

It looks like your upper layers request an unsupported feature. I 
disabled several things related to CPU affinity in libbsd since this was 
not properly supported by RTEMS before the EDF SMP scheduler was 
introduced. It may be possible to enable these features now. If you want 
to enable something in this area, please add test cases.

FreeBSD sometimes uses per-CPU data structures. They must be used with care.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200415/dd3f6ddb/attachment.html>


More information about the devel mailing list