Message ID | 2b21e47e43bdfb90c035b76e8a2f245e991a1718.1563321715.git.alistair.francis@wdc.com |
---|---|
State | New |
Headers | show |
Series | [RFC,v3,01/23] sysdeps/nanosleep: Use clock_nanosleep_time64 if avaliable | expand |
On Wed, Jul 17, 2019 at 2:12 AM Alistair Francis <alistair.francis@wdc.com> wrote: > > Signed-off-by: Alistair Francis <alistair.francis@wdc.com> > --- > sysdeps/unix/sysv/linux/riscv/sysdep.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h > index e66e9f032a..ea47b9b82c 100644 > --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h > +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h > @@ -171,6 +171,10 @@ > # ifndef __vdso_clock_getres > # define __vdso_clock_getres __vdso_clock_getres_time64 > # endif > + > +# ifndef __vdso_clock_gettime > +# define __vdso_clock_gettime __vdso_clock_gettime64 > +# endif > #endif /* __riscv_xlen == 32 */ I had not noticed this when commenting on the other patches. What is the purpose of doing this? As mentioned, I don't think we should have __vdso_clock_getres_time64() at all (no caller cares about this being fast). The "#define__vdso_clock_gettime __vdso_clock_gettime64" should be harmless but leads to confusion because other architectures that have both cannot do this. Arnd
On Wed, Jul 17, 2019 at 1:16 AM Arnd Bergmann <arnd@arndb.de> wrote: > > On Wed, Jul 17, 2019 at 2:12 AM Alistair Francis > <alistair.francis@wdc.com> wrote: > > > > Signed-off-by: Alistair Francis <alistair.francis@wdc.com> > > --- > > sysdeps/unix/sysv/linux/riscv/sysdep.h | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h > > index e66e9f032a..ea47b9b82c 100644 > > --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h > > +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h > > @@ -171,6 +171,10 @@ > > # ifndef __vdso_clock_getres > > # define __vdso_clock_getres __vdso_clock_getres_time64 > > # endif > > + > > +# ifndef __vdso_clock_gettime > > +# define __vdso_clock_gettime __vdso_clock_gettime64 > > +# endif > > #endif /* __riscv_xlen == 32 */ > > > I had not noticed this when commenting on the other patches. What is > the purpose of doing this? > > As mentioned, I don't think we should have __vdso_clock_getres_time64() > at all (no caller cares about this being fast). > The "#define__vdso_clock_gettime __vdso_clock_gettime64" should > be harmless but leads to confusion because other architectures that > have both cannot do this. These were required to avoid build failures, but I think I have a better solution and have removed these patches. Alistair > > Arnd
diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h index e66e9f032a..ea47b9b82c 100644 --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h @@ -171,6 +171,10 @@ # ifndef __vdso_clock_getres # define __vdso_clock_getres __vdso_clock_getres_time64 # endif + +# ifndef __vdso_clock_gettime +# define __vdso_clock_gettime __vdso_clock_gettime64 +# endif #endif /* __riscv_xlen == 32 */ #undef SYS_ify
Signed-off-by: Alistair Francis <alistair.francis@wdc.com> --- sysdeps/unix/sysv/linux/riscv/sysdep.h | 4 ++++ 1 file changed, 4 insertions(+)