mainline build failure due to 6fdd2077ec03 ("drm/amd/amdgpu: add memory training support for PSP_V13")
Hi All,
The latest mainline kernel branch fails to build for alpha and mips allmodconfig with the error:
drivers/gpu/drm/amd/amdgpu/psp_v13_0.c: In function 'psp_v13_0_memory_training':drivers/gpu/drm/amd/amdgpu/psp_v13_0.c:534:23: error: implicit declaration of function 'vmalloc'; did you mean 'kvmalloc'? [-Werror=implicit-function-declaration]
534 | buf = vmalloc(sz);
| ^~~~~~~
| kvmallocdrivers/gpu/drm/amd/amdgpu/psp_v13_0.c:534:21: error: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
534 | buf = vmalloc(sz);
| ^drivers/gpu/drm/amd/amdgpu/psp_v13_0.c:545:33: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
545 | vfree(buf);
| ^~~~~
| kvfreegit bisect pointed to 6fdd2077ec03 ("drm/amd/amdgpu: add memory training support for PSP_V13").
And, reverting that commit has fixed the build failure.
I will be happy to test any patch or provide any extra log if needed.
--
Regards
Sudip
Quoted 2 lines · Sudip Mukherjee (Codethink)
I will be happy to test any patch or provide any extra log if needed.
It sounds like that file just needs to get a
#include <linux/vmalloc.h>
there, and for some reason architectures other than alpha and mips end up getting it accidentally through other headers.
Mind testing just adding that header file, and perhaps even sending a patch if (when) that works for you?
Linus
Quoted 8 lines · Linus Torvalds
Quoted 2 lines · Sudip Mukherjee (Codethink)
I will be happy to test any patch or provide any extra log if needed.
It sounds like that file just needs to get a
Quoted 7 lines
#include <linux/vmalloc.h>there, and for some reason architectures other than alpha and mips end up getting it accidentally through other headers.
Mind testing just adding that header file, and perhaps even sending a patch if (when) that works for you?
Tested on alpha allmodconfig, that worked.
And also sent the patch.
--
Regards
Sudip