Paul Irofti <p...@irofti.net> wrote:

> On 2020-05-31 19:17, Theo de Raadt wrote:
> > Paul Irofti <p...@irofti.net> wrote:
> >
> >> Yeah, I just followed the dlfcn/dlfcn_stubs.c example from libc. Which
> >> I see now it is commented out...
> >>
> >>>>> --- lib/libc/dlfcn/init.c.before        Sat May 30 23:26:35 2020
> >>>>> +++ lib/libc/dlfcn/init.c       Sat May 30 18:00:45 2020
> >>>>> @@ -70,7 +70,7 @@
> >>>>>      /* provide definitions for these */
> >>>>>    const dl_cb *_dl_cb __relro = NULL;
> >>>>> -#if defined(__amd64)
> >>>>> +#if defined(__amd64__) || defined(__powerpc__)
> >>>>>    uint64_t (*const tc_get_timecount)(void) = tc_get_timecount_md;
> >>>>>    #else
> >>>>>    uint64_t (*const tc_get_timecount)(void) = NULL;
> >>>
> >>> 1) I think adding _md to the name is superflous.  There will never
> >>>      be a MI version, so tc_get_timecount() is enough.
> >>
> >> What about pvclock(4)?
> >
> > What about it?  Is it MI?
> 
> It is used by two architectures. There is also glxpcib. Of course we
> can have a copy of each in arch/*/usertc.c

You plan to flip between supporting functions on the fly?

How do you know to flip?

It sounds insane and designing for a problem which doesn't exist.

Obviously on an architecture there must be *one function* that does
the job, using whatever it finds available.

Reply via email to