AW: AW: [PATCH v2 3/3] i386: Port to RTEMS
Jan.Sommer at dlr.de
Jan.Sommer at dlr.de
Fri Mar 20 16:16:01 UTC 2020
Thank you. That makes sense.
I will prepare a new version.
Von: Sebastian Huber [mailto:sebastian.huber at embedded-brains.de]
Gesendet: Freitag, 20. März 2020 12:54
An: Sommer, Jan; devel at rtems.org
Betreff: Re: AW: [PATCH v2 3/3] i386: Port to RTEMS
On 10/03/2020 09:12, Jan.Sommer at dlr.de<mailto:Jan.Sommer at dlr.de> wrote:
[...]
diff --git a/freebsd/sys/net/iflib.c b/freebsd/sys/net/iflib.c
index 89bc5e79..09282ac7 100644
--- a/freebsd/sys/net/iflib.c
+++ b/freebsd/sys/net/iflib.c
@@ -1031,8 +1031,13 @@ iflib_netmap_txsync(struct netmap_kring *kring, int
flags)
}
if (!(ctx->ifc_flags & IFC_NETMAP_TX_IRQ))
if (kring->nr_hwtail != nm_prev(kring->nr_hwcur, lim)) {
+#ifndef __rtems__
callout_reset_on(&txq->ift_timer, hz < 2000 ? 1 : hz /
1000,
iflib_timer, txq, txq->ift_timer.c_cpu);
+#else /* __rtems__ */
+ callout_reset_curcpu(&txq->ift_timer, hz < 2000 ? 1 : hz
/ 1000,
+ iflib_timer, txq);
I am not completely sure about all the side effects of replacing callout_reset_on with callout_reset_curcpu, but the struct callout has no "c_cpu" member in RTEMS.
If someone has a better idea, please tell me.
I would change the callout_reset_on() macro and don't change the caller.
#ifndef __rtems__
#define callout_reset_on(c, to_ticks, fn, arg, cpu) \
callout_reset_sbt_on((c), tick_sbt * (to_ticks), 0, (fn), (arg), \
(cpu), C_HARDCLOCK)
#else /* __rtems__ */
#define callout_reset_on(c, to_ticks, fn, arg, cpu) \
callout_reset_sbt_on((c), tick_sbt * (to_ticks), 0, (fn), (arg), \
-1, C_HARDCLOCK)
#endif /* __rtems__ */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200320/cc89635d/attachment.html>
More information about the devel
mailing list