]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: shut up #warning for compile testing
authorArnd Bergmann <arnd@arndb.de>
Wed, 1 Feb 2017 15:59:21 +0000 (16:59 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 9 Feb 2017 05:23:24 +0000 (00:23 -0500)
commitc032ece9c9442792a30945540b273f244bbf0028
tree442402fcf4fafc26184216f337a54739553aba28
parentd619928ab95478e692d281b8f0d2f9ee1df2af30
drm/amdgpu: shut up #warning for compile testing

My randconfig tests on linux-next showed a newly introduced warning:

drivers/gpu/drm/amd/amdgpu/amdgpu_object.c: In function 'amdgpu_bo_create_restricted':
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:377:2: error: #warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance thanks to write-combining [-Werror=cpp]

Generally speaking, warnings about bad kernel configuration are not particularly
helpful. We could enforce the selection of X86_PAT through Kconfig, so the driver
cannot even be used unless it is enabled, or we could just rely on the runtime
warning that is also there.

In this version, I'm making the warning conditional on CONFIG_COMPILE_TEST, which
shuts it up for me, but not people that may actually want to run the kernel
as a compromize.

Fixes: abd14b008f67 ("drm/amdgpu: Bring bo creation in line with radeon driver (v2)")
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c