[PATCH 1/2] accel/qaic: Add support for periodic timesync
kernel test robot
lkp at intel.com
Tue Oct 10 13:08:15 UTC 2023
Hi Jeffrey,
kernel test robot noticed the following build errors:
[auto build test ERROR on drm-misc/drm-misc-next]
[also build test ERROR on next-20231010]
[cannot apply to linus/master v6.6-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jeffrey-Hugo/accel-qaic-Add-support-for-periodic-timesync/20231007-003324
base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link: https://lore.kernel.org/r/20231006163210.21319-2-quic_jhugo%40quicinc.com
patch subject: [PATCH 1/2] accel/qaic: Add support for periodic timesync
config: powerpc-randconfig-003-20231010 (https://download.01.org/0day-ci/archive/20231010/202310102021.xKVfIhRT-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231010/202310102021.xKVfIhRT-lkp@intel.com/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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310102021.xKVfIhRT-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/accel/qaic/qaic_timesync.c: In function 'qaic_timesync_timer':
>> drivers/accel/qaic/qaic_timesync.c:125:25: error: implicit declaration of function 'readq'; did you mean 'readl'? [-Werror=implicit-function-declaration]
125 | device_qtimer = readq(mqtsdev->qtimer_addr);
| ^~~~~
| readl
cc1: some warnings being treated as errors
vim +125 drivers/accel/qaic/qaic_timesync.c
102
103 static void qaic_timesync_timer(struct timer_list *t)
104 {
105 struct mqts_dev *mqtsdev = from_timer(mqtsdev, t, timer);
106 struct qts_host_time_sync_msg_data *sync_msg;
107 u64 device_qtimer_us;
108 u64 device_qtimer;
109 u64 host_time_us;
110 u64 offset_us;
111 u64 host_sec;
112 int ret;
113
114 if (atomic_read(&mqtsdev->buff_in_use)) {
115 dev_dbg(mqtsdev->dev, "%s buffer not free, schedule next cycle\n", __func__);
116 goto mod_timer;
117 }
118 atomic_set(&mqtsdev->buff_in_use, 1);
119
120 sync_msg = mqtsdev->sync_msg;
121 sync_msg->header.signature = cpu_to_le16(QAIC_TIMESYNC_SIGNATURE);
122 sync_msg->header.msg_type = QAIC_TS_SYNC_REQ;
123 /* Read host UTC time and convert to uS*/
124 host_time_us = div_u64(ktime_get_real_ns(), NSEC_PER_USEC);
> 125 device_qtimer = readq(mqtsdev->qtimer_addr);
126 device_qtimer_us = QAIC_CONV_QTIMER_TO_US(device_qtimer);
127 /* Offset between host UTC and device time */
128 offset_us = host_time_us - device_qtimer_us;
129
130 host_sec = div_u64(offset_us, USEC_PER_SEC);
131 sync_msg->data.tv_usec = cpu_to_le64(offset_us - host_sec * USEC_PER_SEC);
132 sync_msg->data.tv_sec = cpu_to_le64(host_sec);
133 ret = mhi_queue_buf(mqtsdev->mhi_dev, DMA_TO_DEVICE, sync_msg, sizeof(*sync_msg), MHI_EOT);
134 if (ret && (ret != -EAGAIN)) {
135 dev_err(mqtsdev->dev, "%s unable to queue to mhi:%d\n", __func__, ret);
136 return;
137 } else if (ret == -EAGAIN) {
138 atomic_set(&mqtsdev->buff_in_use, 0);
139 }
140
141 mod_timer:
142 ret = mod_timer(t, jiffies + msecs_to_jiffies(timesync_delay_ms));
143 if (ret)
144 dev_err(mqtsdev->dev, "%s mod_timer error:%d\n", __func__, ret);
145 }
146
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the dri-devel
mailing list