The following commit has been merged into the x86/msr branch of tip:
Commit-ID: b1d1720321a0fb90c918fcbb3aa15649c116130a
Gitweb: https://git.kernel.org/tip/b1d1720321a0fb90c918fcbb3aa15649c116130a
Author: Ingo Molnar <mingo@kernel.org>
AuthorDate: Wed, 07 May 2025 20:25:59 +02:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Wed, 07 May 2025 20:30:53 +02:00
accel/habanalabs: Add explicit include of <asm/tsc.h> to pick up the rdtsc() definition
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]
Add an explicit <asm/tsc.h> include, now that it works on UML too.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Johannes Berg <johannes.berg@intel.com>
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/common/habanalabs_ioctl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/accel/habanalabs/common/habanalabs_ioctl.c b/drivers/accel/habanalabs/common/habanalabs_ioctl.c
index dc80ca9..af23001 100644
--- a/drivers/accel/habanalabs/common/habanalabs_ioctl.c
+++ b/drivers/accel/habanalabs/common/habanalabs_ioctl.c
@@ -17,6 +17,8 @@
#include <linux/uaccess.h>
#include <linux/vmalloc.h>
+#include <asm/tsc.h>
+
/* make sure there is space for all the signed info */
static_assert(sizeof(struct cpucp_info) <= SEC_DEV_INFO_BUF_SZ);