[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b5fddcf8-99ff-fc0d-40c0-0eb81ad4e94a@c-s.fr>
Date: Thu, 16 Jan 2020 10:16:18 +0100
From: Christophe Leroy <christophe.leroy@....fr>
To: Thomas Gleixner <tglx@...utronix.de>, 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
Thomas, Andy,
Le 15/01/2020 à 07:15, Christophe Leroy a écrit :
>
>
> Le 15/01/2020 à 00:06, Thomas Gleixner a écrit :
>> Christophe Leroy <christophe.leroy@....fr> writes:
>>> static __maybe_unused int
>>> +#ifdef VDSO_GETS_VD_PTR_FROM_ARCH
>>> +__cvdso_clock_gettime_common(const struct vdso_data *vd, clockid_t
>>> clock,
>>> + struct __kernel_timespec *ts)
>>> +{
>>> +#else
>>> __cvdso_clock_gettime_common(clockid_t clock, struct
>>> __kernel_timespec *ts)
>>> {
>>> const struct vdso_data *vd = __arch_get_vdso_data();
>>> +#endif
>>> u32 msk;
>>
>> If we do that, then there is no point in propagating this to the inner
>> functions. It's perfectly fine to have this distinction at the outermost
>> level.
>
> In v2, I did it at the arch level (see
> https://patchwork.ozlabs.org/patch/1214983/). Andy was concerned about
> it being suboptimal for arches which (unlike powerpc) have PC related
> data addressing mode.
>
> Wouldn't it be the same issue if doing it at the outermost level of
> generic VDSO ?
Any opinion on this ?
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) ?
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) ?
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.
Thanks
Christophe
Powered by blists - more mailing lists