drm/amdkfd: Fix UML build guards for x86_64-only code
authorAlex Hung <alex.hung@amd.com>
Thu, 14 May 2026 17:01:39 +0000 (11:01 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 27 May 2026 14:21:56 +0000 (10:21 -0400)
commitb0687d047b075b390623962aa3e01fe8c089f6a1
tree6c9487f3df4e1c0ad6246ac4d01abf237b8a2557
parent5838a89515c87c072057c12cf022f958ece1c720
drm/amdkfd: Fix UML build guards for x86_64-only code

cpu_data().topo.apicid and kfd_fill_iolink_info_for_cpu() rely on
x86-specific structs not present on UML. The kfd_topology.c and
kfd_crat.c were guarded by CONFIG_X86_64 alone, causing build
failures when CONFIG_DRM_AMDGPU is selected on UML.

Update guards to '#if defined(CONFIG_X86_64) && !defined(CONFIG_UML)'
to ensure x86_64-only paths are excluded on UML builds.

Fixes: af3f2f5db265 ("drm/amdgpu: Remove UML build exclusion from Kconfig")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202605140506.TI8zPIBG-lkp@intel.com/
Cc: Harry Wentland <harry.wentland@amd.com>
Assisted-by: Copilot:Claude-Sonnet-4.6
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_crat.c
drivers/gpu/drm/amd/amdkfd/kfd_topology.c