Error while running the AMDGPU unit tests with ARCH=um
How to reproduce?
➜ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/gpu/drm/amd/display/amdgpu_dm/tests/ --kconfig_add CONFIG_VIRTIO_UML=y --kconfig_add CONFIG_UML_PCI_OVER_VIRTIO=y
Error
ERROR:root:In file included from ../arch/x86/um/asm/processor.h:41, from ../include/linux/spinlock_up.h:8, from ../include/linux/spinlock.h:95, from ../include/linux/mmzone.h:8, from ../include/linux/gfp.h:6, from ../include/linux/slab.h:15, from ../drivers/gpu/drm/amd/amdgpu/../pm/powerplay/inc/pp_debug.h:35, from ../drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:23:../drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c: In function ‘intel_core_rkl_chk’:../arch/um/include/asm/processor-generic.h:103:19: error: called object is not a function or function pointer 103 | #define cpu_data (&boot_cpu_data) | ~^~~~~~~~~~~~~~~../drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1742:34: note: in expansion of macro ‘cpu_data’ 1742 | struct cpuinfo_x86 *c = &cpu_data(0); | ^~~~~~~~../drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1744:18: error: invalid use of undefined type ‘struct cpuinfo_x86’ 1744 | return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ROCKETLAKE); | ^~../drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1744:33: error: invalid use of undefined type ‘struct cpuinfo_x86’ 1744 | return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ROCKETLAKE); | ^~../drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1748:1: error: control reaches end of non-void function [-Werror=return-type] 1748 | } | ^cc1: some warnings being treated as errors