On Thu, Apr 09, 2020 at 08:15:57PM +0200, Christian KÃnig wrote:
Am 09.04.20 um 19:09 schrieb Peter Zijlstra:Well, if it's a human, can this human respect the kernel coding style a
On Thu, Apr 09, 2020 at 05:59:56PM +0200, Peter Zijlstra wrote:Well that "generator" is still a human being :)
[SNIP]
I'll need another approach, let me consider.Christian; it says these files are generated, does that generator know
which functions are wholly in FPU context and which are not?
It's just that the formulae for the calculation come from the hardware team
and we are not able to easily transcript them to fixed point calculations.
bit more :-) Some of that stuff is atrocious.
We are currently in the process of moving all the stuff which requiresCan you make the build system stick all those .o files in a single
floating point into a single C file(s) and then make sure that we only call
those within kernel_fpu_begin()/end() blocks.
archive? That's the only way I can do call validation; external
relocatoin records do not contain the section.
Annotating those function with __fpu or even saying to gcc that all code ofGuess what the __fpu attribute does ;-)
those files should go into a special text.fpu segment shouldn't be much of a
problem.
With the below patch (which is on to of newer versions of the objtool
patches send earlier, let me know if you want a full set
) that only
converts a few files, but fully converts:
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c
But building it (and this is an absolute pain; when you're reworking
this, can you pretty please also fix the Makefiles?), we get:
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.o: warning: objtool: dcn_validate_bandwidth()+0x34fa: FPU instruction outside of kernel_fpu_{begin,end}()
$ ./scripts/faddr2line defconfig-build/drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.o dcn_validate_bandwidth+0x34fa
dcn_validate_bandwidth+0x34fa/0x57ce:
dcn_validate_bandwidth at /usr/src/linux-2.6/defconfig-build/../drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:1293 (discriminator 5)
# ./objdump-func.sh defconfig-build/drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.o dcn_validate_bandwidth | grep 34fa
34fa 50fa: f2 0f 10 b5 60 ff ff movsd -0xa0(%rbp),%xmm6
Which seems to indicate there's still problms with the current code.