From: Oak Zeng Date: Wed, 10 Mar 2021 19:09:42 +0000 (-0600) Subject: drm/amdgpu: fix compile error on architecture s390 (v2) X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f10083703c4ebcdad67143124c8bafa46013c04c;p=linux.git drm/amdgpu: fix compile error on architecture s390 (v2) ioremap_cache is not supported on some architecture such as s390. Put the codes into a #ifdef to fix some compile error reported by test robot. v2: squash in non-x86 fix Signed-off-by: Oak Zeng Reported-by: Kernel test robot Reviewed-by: Christian Konig Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index feed820091f6f..3533d21680f03 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -1818,11 +1818,13 @@ int amdgpu_ttm_init(struct amdgpu_device *adev) /* Change the size here instead of the init above so only lpfn is affected */ amdgpu_ttm_set_buffer_funcs_status(adev, false); #ifdef CONFIG_64BIT +#ifdef CONFIG_X86 if (adev->gmc.xgmi.connected_to_cpu) adev->mman.aper_base_kaddr = ioremap_cache(adev->gmc.aper_base, adev->gmc.visible_vram_size); else +#endif adev->mman.aper_base_kaddr = ioremap_wc(adev->gmc.aper_base, adev->gmc.visible_vram_size); #endif