Skip to contentSkip to conversation

amdgpu: Avoid building on UML

PATCH Applied Peter Foley 3 participants 3 messages Jan 13, 2023 – Mar 7, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 amdgpu: Avoid building on UML

The amdgpu driver tries to use fields not supported by UML's cpuinfo struct. Disable the driver when targeting UML to avoid tripping up allyesconfig.

e.g.
../drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c: In function ‘intel_core_rkl_chk’:
../drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1742:33: error: initialization of ‘struct cpuinfo_x86 *’ from incompatible pointer type ‘struct cpuinfo_um *’ [-Werror=incompatible-pointer-types ]
../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c: In function ‘kfd_cpumask_to_apic_id’:
../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:2157:48: error: ‘struct cpuinfo_um’ has no member named ‘apicid’

---
 drivers/gpu/drm/amd/amdgpu/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/Kconfig +1 -0
index 5fcd510f1abb..aa0008ff8712 100644
@@ -3,6 +3,7 @@
 config DRM_AMDGPU
 	tristate "AMD GPU"
 	depends on DRM && PCI && MMU
+	depends on !UML
 	select FW_LOADER
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDMI_HELPER

---
base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
change-id: 20230112-amduml-565935d34bfb

Best regards,

Signature · 1 line
Peter Foley <[email protected]>
Acked-by on v1 1/1
#1 lore raw

Looks like this patch got lost over the holidays. Alex, are you OK with applying this patch? Or are people looking for a more general solution to not build HW drivers for UML? FWIW:

Am 2023-01-12 um 23:30 schrieb Peter Foley:

Quoted 34 lines

The amdgpu driver tries to use fields not supported by UML's cpuinfo struct. Disable the driver when targeting UML to avoid tripping up allyesconfig.

e.g.
../drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c: In function ‘intel_core_rkl_chk’:
../drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1742:33: error: initialization of ‘struct cpuinfo_x86 *’ from incompatible pointer type ‘struct cpuinfo_um *’ [-Werror=incompatible-pointer-types ]
../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c: In function ‘kfd_cpumask_to_apic_id’:
../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:2157:48: error: ‘struct cpuinfo_um’ has no member named ‘apicid’

---
  drivers/gpu/drm/amd/amdgpu/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/Kconfig +1 -1
index 5fcd510f1abb..aa0008ff8712 100644
@@ -3,6 +3,7 @@
  config DRM_AMDGPU
  	tristate "AMD GPU"
  	depends on DRM && PCI && MMU
+	depends on !UML
  	select FW_LOADER
  	select DRM_DISPLAY_DP_HELPER
  	select DRM_DISPLAY_HDMI_HELPER
 
---

base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
change-id: 20230112-amduml-565935d34bfb

Best regards,

Applied
#2 lore raw

Applied. Thanks.

Alex

Quoted 43 lines · Felix Kuehling

Looks like this patch got lost over the holidays. Alex, are you OK with applying this patch? Or are people looking for a more general solution to not build HW drivers for UML? FWIW:

Am 2023-01-12 um 23:30 schrieb Peter Foley:

Quoted 34 lines

The amdgpu driver tries to use fields not supported by UML's cpuinfo struct. Disable the driver when targeting UML to avoid tripping up allyesconfig.

e.g.
../drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c: In function ‘intel_core_rkl_chk’:
../drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1742:33: error: initialization of ‘struct cpuinfo_x86 *’ from incompatible pointer type ‘struct cpuinfo_um *’ [-Werror=incompatible-pointer-types ]
../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c: In function ‘kfd_cpumask_to_apic_id’:
../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:2157:48: error: ‘struct cpuinfo_um’ has no member named ‘apicid’

---
  drivers/gpu/drm/amd/amdgpu/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/Kconfig +1 -1
index 5fcd510f1abb..aa0008ff8712 100644
@@ -3,6 +3,7 @@
  config DRM_AMDGPU
      tristate "AMD GPU"
      depends on DRM && PCI && MMU
+     depends on !UML
      select FW_LOADER
      select DRM_DISPLAY_DP_HELPER
      select DRM_DISPLAY_HDMI_HELPER
 
---

base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
change-id: 20230112-amduml-565935d34bfb

Best regards,