Re: [RFC PATCH v1] power: don't manage floating point regs when no FPU

From: Christophe Leroy
Date: Tue Aug 11 2020 - 09:48:22 EST




Le 11/08/2020 à 14:07, Michael Ellerman a écrit :
Christophe Leroy <christophe.leroy@xxxxxxxxxx> writes:
There is no point in copying floating point regs when there
is no FPU and MATH_EMULATION is not selected.

Yeah I guess you're right. I've never touched a system with neither, but
if such a thing exists then it does seem silly to copy regs around that
can't be used.

Yes that exists, because glibc implements floating point emulation and it is definitely more efficient to rely of glibc emulation than kernel one.

10 files changed, 44 insertions(+), 1 deletion(-)

In general this looks fine.

It's a bit #ifdef heavy. Maybe some of those can be cleaned up a bit
with some wrapper inlines?


Yes I'll try and respin, as part of a series I'm preparing to switch the 32 bits signal code to using user_access_begin() logic and unsafe_put_user() and friends to reduce KUAP unlock/lock.

Christophe