[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87k15rwuxm.fsf@nanos.tec.linutronix.de>
Date: Thu, 16 Jan 2020 11:35:17 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Christophe Leroy <christophe.leroy@....fr>, luto@...nel.org
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>, arnd@...db.de,
vincenzo.frascino@....com, x86@...nel.org,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-mips@...r.kernel.org
Subject: Re: [RFC PATCH v3 08/12] lib: vdso: allow arches to provide vdso data pointer
Christophe Leroy <christophe.leroy@....fr> writes:
> Le 15/01/2020 à 07:15, Christophe Leroy a écrit :
> From your point of view, what should I do:
> A/ __arch_get_vdso_data() handled entirely at arch level and arches
> handing over the vdso data pointer to generic C VDSO functions all the
> time (as in my v2 series) ?
No. That's again moving the same code to all architectures.
> B/ Data pointer being handed over all the way up for arches wanting to
> do so, no changes at all for others (as in my v3 series) ?
Too much ifdeffery
> C/ __arch_get_vdso_data() being called at the outermost generic level
> for arches not interested in handling data pointer from the caller (as
> suggested by Thomas) ?
>
> Andy, with A/ you were concerned about arches being able to do PC
> related accesses. Would it be an issue for C/ as well ? If not, I guess
> C/ would be cleaner than B/ allthought not as clean as A which doesn't
> add any #ifdefery at all.
You can avoid ifdeffery with C if you do:
static __maybe_unused int
__cvdso_data_clock_gettime(clockid_t clock, struct __kernel_timespec *ts,
const struct vdso_data *vd)
{
.....
}
static __maybe_unused int
__cvdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
{
const struct vdso_data *vd = __arch_get_vdso_data();
return __cvdso_data_clock_gettime(clock, ts, vd);
}
and then use __cvdso_data_clock_gettime on PPC and let the other archs
unmodified.
Thanks,
tglx
Powered by blists - more mailing lists