[linux-next:master 5393/6975] drivers/accel/habanalabs/common/habanalabs_ioctl.c:323:30: error: implicit declaration of function 'rdtsc'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   940fcc189c51032dd0282cbee4497542c982ac59
commit: 809a1971ce613ec22314ecfeb3ebccc7ee3a97c3 [5393/6975] accel/habanalabs: add tsc clock sampling to clock sync info
config: um-randconfig-r005-20230815 (https://download.01.org/0day-ci/archive/20230921/202309211608.K2NtoA7e-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230921/202309211608.K2NtoA7e-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309211608.K2NtoA7e-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/accel/habanalabs/common/habanalabs_ioctl.c: In function 'time_sync_info':
>> drivers/accel/habanalabs/common/habanalabs_ioctl.c:323:30: error: implicit declaration of function 'rdtsc' [-Werror=implicit-function-declaration]
     323 |         time_sync.tsc_time = rdtsc();
         |                              ^~~~~
   cc1: some warnings being treated as errors


vim +/rdtsc +323 drivers/accel/habanalabs/common/habanalabs_ioctl.c

   311	
   312	static int time_sync_info(struct hl_device *hdev, struct hl_info_args *args)
   313	{
   314		struct hl_info_time_sync time_sync = {0};
   315		u32 max_size = args->return_size;
   316		void __user *out = (void __user *) (uintptr_t) args->return_pointer;
   317	
   318		if ((!max_size) || (!out))
   319			return -EINVAL;
   320	
   321		time_sync.device_time = hdev->asic_funcs->get_device_time(hdev);
   322		time_sync.host_time = ktime_get_raw_ns();
 > 323		time_sync.tsc_time = rdtsc();
   324	
   325		return copy_to_user(out, &time_sync,
   326			min((size_t) max_size, sizeof(time_sync))) ? -EFAULT : 0;
   327	}
   328	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux