Re: [PATCH v5 -next 14/16] sh: vdso: move the sysctl to arch/sh/kernel/vsyscall/vsyscall.c

Rob Landley <[email protected]>
Newsgroups gmane.linux.ports.sh.devel
Message-ID <[email protected]>
On 1/11/25 01:07, Kaixiong Yu wrote:
> When CONFIG_SUPERH and CONFIG_VSYSCALL are defined,
> vdso_enabled belongs to arch/sh/kernel/vsyscall/vsyscall.c.
> So, move it into its own file. To avoid failure when registering
> the vdso_table, move the call to register_sysctl_init() into
> its own fs_initcall().
> 
> Signed-off-by: Kaixiong Yu <[email protected]>
> Reviewed-by: Kees Cook <[email protected]>
> ---
> v5:
>   - fix the error discovered by Geert Uytterhoeven.
>     Move the call to register_sysctl_init() into
>     its own fs_initcall() as Geert Uytterhoeven's patch does.
>   - take the advice of Joel Granados, separating path14 in V4
>     into patch14 and patch15 in V5. This patch just moves the
>     vdso_enabled table. The next patch removes the vm_table.
>   - modify the change log

Speaking of, what would it take to add gettimeofday() and 
clock_gettime() vdso functions on superh? I looked into it a few weeks 
ago but found the subsystem hard to parse.

Rob

P.S. On j-core we have three memory mapped registers any process can 
read, the rtc_nsec, rtc_seclo, and rtc_sechi fields in the AIC structure 
at 
https://github.com/j-core/jcore-soc/blob/master/targets/boards/turtle_1v1/board.h#L29 
(volatile unsigned *hlc = (void *)0xabcd0220, or just x = *(volatile 
unsigned *)0xabcd0228; if you're checking before/after nanoseconds for 
quick and dirty profiling), which has let us be really lazy but ideally 
there would be a proper vdso wrapper, and the with-mmu version is going 
to want a little more kernel participation...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.