From: Richard C. <ric...@gm...> - 2013-04-23 06:00:43
|
On Mon, Apr 22, 2013 at 05:18:30PM -0400, Chris LaRocque wrote: > > Could one of you kind folks point me toward the files where the gianfar > timer functionality could or would be implemented? - kernel/time/posix-clock.c - drivers/net/ethernet/freescale/gianfar_ptp.c > Was / is there an example or two which would show me the light? You can see the original version at https://lists.ozlabs.org/pipermail/linuxppc-dev/2010-May/082433.html but this was before the posix clock idea came along. > I need to know the magnitude of the task before I take this info to > management. Maybe you can just use normal timers using CLOCK_REALTIME or CLOCK_MONOTONIC? This what I recommend. PHC timer support has been designed into the API, but it has not been implemented. There are two reasons why it is still missing. First, adding the logic would be a non-trivial exercise (see how the hrtimer stuff works, to get an idea). Second, it is doubtful whether having direct PHC timers would perform much better than just synchronizing the system clock to the PHC, and using normal timers. I did a whole paper on that second point, and I am convinced that it just isn't worth the effort to implement PHC timers. However, I would support the addition of the code, if you or someone else wants to develop it. HTH, Richard |