accel/habanalabs: Don't build the driver on UML
authorIngo Molnar <mingo@kernel.org>
Wed, 7 May 2025 18:25:59 +0000 (20:25 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 8 May 2025 09:02:46 +0000 (11:02 +0200)
The following commit:

  288a4ff0ad29 ("x86/msr: Move rdtsc{,_ordered}() to <asm/tsc.h>")

removed the <asm/msr.h> include from the accel/habanalabs driver, which broke
the build on UML:

   drivers/accel/habanalabs/common/habanalabs_ioctl.c:326:23: error: call to undeclared function 'rdtsc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

Make the driver depend on 'X86 && X86_64', instead of just 'X86_64',
thus it won't be built on UML.

Suggested-by: Johannes Berg <johannes.berg@intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Ofir Bitton <obitton@habana.ai>
Cc: Oded Gabbay <ogabbay@kernel.org>
Link: https://lore.kernel.org/r/202505080003.0t7ewxGp-lkp@intel.com
drivers/accel/habanalabs/Kconfig

index be85336107f9fad731dfe317a58dc0c449ae2060..1919fbb169c7a95ea5c9e064c001266e5dd5e6b9 100644 (file)
@@ -6,7 +6,7 @@
 config DRM_ACCEL_HABANALABS
        tristate "HabanaLabs AI accelerators"
        depends on DRM_ACCEL
-       depends on X86_64
+       depends on X86 && X86_64
        depends on PCI && HAS_IOMEM
        select GENERIC_ALLOCATOR
        select HWMON