@landley You need to be able to put code in userspace that's capable of reading hw clock registers and computing time. This is going to be highly model specific. It probably needs to be conditioned on the dt nodes for jcore pit if you're talking about doing jcore one. I don't know what sh4 would look like or if it's possible.
Conversation
Notices
-
Embed this notice
Rich Felker (dalias@hachyderm.io)'s status on Wednesday, 18-Dec-2024 17:45:20 JST Rich Felker -
Embed this notice
Rob Landley (landley@mstdn.jp)'s status on Wednesday, 18-Dec-2024 17:45:24 JST Rob Landley Thought about adding VDSO versions of clock_gettime() and gettimeofday64() to linux/arch/sh after seeing https://git.musl-libc.org/cgit/musl/commit/?id=f2375aacac13 and checking https://man7.org/linux/man-pages/man7/vdso.7.html
Adding two new functions to https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/sh/kernel/vsyscall/vsyscall.lds.S#n75 seems easy enough but where to add the function? https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/sh/kernel/vsyscall/vsyscall-sigreturn.S is assembly salad and there's bits of it in arch/sh/kernel/signal_32.c too.
The downside of not having a simple example to copy. The architecture's current examples are giant swiss army knives of complexity.
-
Embed this notice