lkml.org 
[lkml]   [2020]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC PATCH v1] power: don't manage floating point regs when no FPU
Date


Le 11/08/2020 à 14:07, Michael Ellerman a écrit :
> Christophe Leroy <christophe.leroy@csgroup.eu> writes:
>> 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?

Looking at it once more, looks like more or less the same level of
#ifdefs as things like CONFIG_ALTIVEC for instance. I can't really see
much opportunities to clean it up.

>
>> diff --git a/arch/powerpc/kernel/ptrace/ptrace-novsx.c b/arch/powerpc/kernel/ptrace/ptrace-novsx.c
>> index b2dc4e92d11a..8f87a11f3f8c 100644
>> --- a/arch/powerpc/kernel/ptrace/ptrace-novsx.c
>> +++ b/arch/powerpc/kernel/ptrace/ptrace-novsx.c
>> @@ -28,6 +29,9 @@ int fpr_get(struct task_struct *target, const struct user_regset *regset,
>>
>> return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
>> &target->thread.fp_state, 0, -1);
>> +#else
>> + return 0;
>> +#endif
>
> Should we return -ENODEV/EIO here? Wonder if another arch can give us a clue.
>

Looks like we have to do another way ... another #ifdef ... in the
definition of native_regsets[] in ptrace-view.c . And then we should be
able to not build ptrace-novsx.c at all. Will try that.

Christophe

\
 
 \ /
  Last update: 2020-08-11 16:07    [W:0.197 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site