Re: user tc for alpha

2020-07-08 Thread Scott Cheloha
On Wed, Jul 08, 2020 at 09:09:53AM -0600, Theo de Raadt wrote: > Scott Cheloha wrote: > > > > - __asm volatile("rd %%sys_tick, %0" : "=r" (tick) :); > > > + __asm volatile("rd %%sys_tick, %0" : "=r" (tick)); > > > > > > return (tick & ~0u); > > > } > > > > The only thing that gives me

Re: user tc for alpha

2020-07-08 Thread Theo de Raadt
Scott Cheloha wrote: > > - __asm volatile("rd %%sys_tick, %0" : "=r" (tick) :); > > + __asm volatile("rd %%sys_tick, %0" : "=r" (tick)); > > > > return (tick & ~0u); > > } > > The only thing that gives me pause is the inline assembly. > > I know it isn't a lot of assembly, but would

Re: user tc for alpha

2020-07-08 Thread Scott Cheloha
On Wed, Jul 08, 2020 at 01:35:30AM +0200, Mark Kettenis wrote: > > Date: Tue, 7 Jul 2020 23:46:00 +0200 (CEST) > > From: Mark Kettenis > > > > > Date: Tue, 7 Jul 2020 23:13:06 +0200 > > > From: Christian Weisgerber > > > > > > Mark Kettenis: > > > > > > > > ---

Re: user tc for alpha

2020-07-08 Thread Christian Weisgerber
Paul Irofti: > > Userland gettime support for alpha. > > Alas, completely untested since I don't have access to that arch. > > Never had an alpha. Reads OK to me (if you make the function static like > kettenis@ said). For the archives, here's a version that looks like kettenis@'s style.

Re: user tc for alpha

2020-07-08 Thread Paul Irofti
On 2020-07-07 23:49, Christian Weisgerber wrote: Userland gettime support for alpha. Alas, completely untested since I don't have access to that arch. Never had an alpha. Reads OK to me (if you make the function static like kettenis@ said). Index: lib/libc/arch/alpha/gen/usertc.c

Re: user tc for alpha

2020-07-08 Thread Paul Irofti
So here is a diff that cleans things up and implements sparc64 support. Showing both together since some of the amd64 changes were inspired by the sparc64 code. * TC_LAST can be removed; it really doesn't serve any purpose * the functions in usertc.c need to be static to avoid namespace

Re: user tc for alpha

2020-07-07 Thread Mark Kettenis
> Date: Tue, 7 Jul 2020 23:46:00 +0200 (CEST) > From: Mark Kettenis > > > Date: Tue, 7 Jul 2020 23:13:06 +0200 > > From: Christian Weisgerber > > > > Mark Kettenis: > > > > > > --- lib/libc/arch/alpha/gen/usertc.c6 Jul 2020 13:33:05 - > > > > 1.1 > > > > +++

Re: user tc for alpha

2020-07-07 Thread Mark Kettenis
> Date: Tue, 7 Jul 2020 23:13:06 +0200 > From: Christian Weisgerber > > Mark Kettenis: > > > > --- lib/libc/arch/alpha/gen/usertc.c 6 Jul 2020 13:33:05 - > > > 1.1 > > > +++ lib/libc/arch/alpha/gen/usertc.c 7 Jul 2020 20:40:37 - > > > > +int > > >

Re: user tc for alpha

2020-07-07 Thread Christian Weisgerber
Mark Kettenis: > > --- lib/libc/arch/alpha/gen/usertc.c6 Jul 2020 13:33:05 - > > 1.1 > > +++ lib/libc/arch/alpha/gen/usertc.c7 Jul 2020 20:40:37 - > > +int > > +tc_get_timecount(struct timekeep *tk, u_int *tc) > > Need to make this function static to avoid

Re: user tc for alpha

2020-07-07 Thread Mark Kettenis
> Date: Tue, 7 Jul 2020 22:49:31 +0200 > From: Christian Weisgerber > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > > Userland gettime support for alpha. > > Alas, completely untested since I don't have access to that arch. > > Index:

user tc for alpha

2020-07-07 Thread Christian Weisgerber
Userland gettime support for alpha. Alas, completely untested since I don't have access to that arch. Index: lib/libc/arch/alpha/gen/usertc.c === RCS file: /cvs/src/lib/libc/arch/alpha/gen/usertc.c,v retrieving revision 1.1 diff -u