drm/amdgpu: fix compile error on architecture s390 (v2)
authorOak Zeng <Oak.Zeng@amd.com>
Wed, 10 Mar 2021 19:09:42 +0000 (13:09 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 Mar 2021 03:29:21 +0000 (23:29 -0400)
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 <Oak.Zeng@amd.com>
Reported-by: Kernel test robot <lkp@intel.com>
Reviewed-by: Christian Konig <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

index feed820091f6fb6710bc961768fb9f774802f769..3533d21680f03244c970e31978cc296e58acb0aa 100644 (file)
@@ -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