Skip to contentSkip to conversation

fbdev: geode: don't build on UML

PATCH Applied Randy Dunlap 2 participants 2 messages Nov 30, 2022 – Dec 1, 2022

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

PATCH 1/2 fbdev: geode: don't build on UML

The geode fbdev driver uses struct cpuinfo fields that are not present on ARCH=um, so don't allow this driver to be built on UML.

Prevents these build errors:

In file included from ../arch/x86/include/asm/olpc.h:7:0,

                 from ../drivers/mfd/cs5535-mfd.c:17:

../arch/x86/include/asm/geode.h: In function ‘is_geode_gx’:
../arch/x86/include/asm/geode.h:16:24: error: ‘struct cpuinfo_um’ has no member named ‘x86_vendor’
return ((boot_cpu_data.x86_vendor == X86_VENDOR_NSC) &&
../arch/x86/include/asm/geode.h:16:39: error: ‘X86_VENDOR_NSC’ undeclared (first use in this function); did you mean ‘X86_VENDOR_ANY’?
return ((boot_cpu_data.x86_vendor == X86_VENDOR_NSC) &&
../arch/x86/include/asm/geode.h:17:17: error: ‘struct cpuinfo_um’ has no member named ‘x86’
(boot_cpu_data.x86 == 5) &&
../arch/x86/include/asm/geode.h:18:17: error: ‘struct cpuinfo_um’ has no member named ‘x86_model’
(boot_cpu_data.x86_model == 5));
../arch/x86/include/asm/geode.h: In function ‘is_geode_lx’:
../arch/x86/include/asm/geode.h:23:24: error: ‘struct cpuinfo_um’ has no member named ‘x86_vendor’
return ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) &&
../arch/x86/include/asm/geode.h:23:39: error: ‘X86_VENDOR_AMD’ undeclared (first use in this function); did you mean ‘X86_VENDOR_ANY’?
return ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) &&
../arch/x86/include/asm/geode.h:24:17: error: ‘struct cpuinfo_um’ has no member named ‘x86’
(boot_cpu_data.x86 == 5) &&
../arch/x86/include/asm/geode.h:25:17: error: ‘struct cpuinfo_um’ has no member named ‘x86_model’
(boot_cpu_data.x86_model == 10));

Fixes 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
Cc Johannes Berg <[email protected]>
Cc Richard Weinberger <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Helge Deller <[email protected]>
Cc Andres Salomon <[email protected]>
---
 drivers/video/fbdev/geode/Kconfig |    1 +
 1 file changed, 1 insertion(+)
drivers/video/fbdev/geode/Kconfig +1 -0
diff -- a/drivers/video/fbdev/geode/Kconfig b/drivers/video/fbdev/geode/Kconfig
@@ -5,6 +5,7 @@
 config FB_GEODE
 	bool "AMD Geode family framebuffer support"
 	depends on FB && PCI && (X86_32 || (X86 && COMPILE_TEST))
+	depends on !UML
 	help
 	  Say 'Y' here to allow you to select framebuffer drivers for
 	  the AMD Geode family of processors.

_______________________________________________
linux-um mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-um

maintainer Applied
#1 lore raw
Quoted 26 lines · Randy Dunlap

The geode fbdev driver uses struct cpuinfo fields that are not present on ARCH=um, so don't allow this driver to be built on UML.

Prevents these build errors:

In file included from ../arch/x86/include/asm/olpc.h:7:0,

                  from ../drivers/mfd/cs5535-mfd.c:17:

../arch/x86/include/asm/geode.h: In function ‘is_geode_gx’:
../arch/x86/include/asm/geode.h:16:24: error: ‘struct cpuinfo_um’ has no member named ‘x86_vendor’
return ((boot_cpu_data.x86_vendor == X86_VENDOR_NSC) &&
../arch/x86/include/asm/geode.h:16:39: error: ‘X86_VENDOR_NSC’ undeclared (first use in this function); did you mean ‘X86_VENDOR_ANY’?
return ((boot_cpu_data.x86_vendor == X86_VENDOR_NSC) &&
../arch/x86/include/asm/geode.h:17:17: error: ‘struct cpuinfo_um’ has no member named ‘x86’

    (boot_cpu_data.x86 == 5) &&
../arch/x86/include/asm/geode.h:18:17: error: ‘struct cpuinfo_um’ has no member named ‘x86_model’
    (boot_cpu_data.x86_model == 5));

../arch/x86/include/asm/geode.h: In function ‘is_geode_lx’:
../arch/x86/include/asm/geode.h:23:24: error: ‘struct cpuinfo_um’ has no member named ‘x86_vendor’
return ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) &&
../arch/x86/include/asm/geode.h:23:39: error: ‘X86_VENDOR_AMD’ undeclared (first use in this function); did you mean ‘X86_VENDOR_ANY’?
return ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) &&
../arch/x86/include/asm/geode.h:24:17: error: ‘struct cpuinfo_um’ has no member named ‘x86’

    (boot_cpu_data.x86 == 5) &&
../arch/x86/include/asm/geode.h:25:17: error: ‘struct cpuinfo_um’ has no member named ‘x86_model’
    (boot_cpu_data.x86_model == 10));
Quoted 11 lines
Fixes 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
Cc Johannes Berg <[email protected]>
Cc Richard Weinberger <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Helge Deller <[email protected]>
Cc Andres Salomon <[email protected]>

applied.
Thanks!

Helge

Quoted 15 lines
---
  drivers/video/fbdev/geode/Kconfig |    1 +
  1 file changed, 1 insertion(+)

diff -- a/drivers/video/fbdev/geode/Kconfig b/drivers/video/fbdev/geode/Kconfig

drivers/video/fbdev/geode/Kconfig +1 -0
@@ -5,6 +5,7 @@
  config FB_GEODE
  	bool "AMD Geode family framebuffer support"
  	depends on FB && PCI && (X86_32 || (X86 && COMPILE_TEST))
+	depends on !UML
  	help
  	  Say 'Y' here to allow you to select framebuffer drivers for
  	  the AMD Geode family of processors.