Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/amdgpu: Fix asm/hypervisor.h build error.

Add CONFIG_X86 check to fix the build error.

Fixes: 49aa98ca30cd18 ("drm/amd/amdgpu: Only reserve vram for firmware with vega9 MS_HYPERV host.")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Yongqiang Sun and committed by
Alex Deucher
d9e50239 edd11922

+4
+4
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
··· 25 25 */ 26 26 27 27 #include <linux/io-64-nonatomic-lo-hi.h> 28 + #ifdef CONFIG_X86 28 29 #include <asm/hypervisor.h> 30 + #endif 29 31 30 32 #include "amdgpu.h" 31 33 #include "amdgpu_gmc.h" ··· 652 650 /* 653 651 * VEGA10 SRIOV VF with MS_HYPERV host needs some firmware reserved area. 654 652 */ 653 + #ifdef CONFIG_X86 655 654 if (amdgpu_sriov_vf(adev) && hypervisor_is_type(X86_HYPER_MS_HYPERV)) { 656 655 adev->mman.stolen_reserved_offset = 0x500000; 657 656 adev->mman.stolen_reserved_size = 0x200000; 658 657 } 658 + #endif 659 659 break; 660 660 case CHIP_RAVEN: 661 661 case CHIP_RENOIR: