lkml.org 
[lkml]   [2022]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 3/3] thermal: qcom: tsens: Implement re-initialization workaround quirk
Hi,

On Fri, 8 Jul 2022 at 17:10, kernel test robot <lkp@intel.com> wrote:
>
> Hi Bhupesh,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on rafael-pm/thermal]
> [also build test ERROR on linus/master v5.19-rc5 next-20220707]
> [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/Bhupesh-Sharma/Add-support-for-tsens-controller-reinit-via-trustzone/20220701-230113
> base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git thermal
> config: arm64-randconfig-r015-20220707 (https://download.01.org/0day-ci/archive/20220708/202207081955.SXcfKpLo-lkp@intel.com/config)
> compiler: aarch64-linux-gcc (GCC) 11.3.0
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://github.com/intel-lab-lkp/linux/commit/32929e13eb338e76b714bb8b4805899e2857734f
> git remote add linux-review https://github.com/intel-lab-lkp/linux
> git fetch --no-tags linux-review Bhupesh-Sharma/Add-support-for-tsens-controller-reinit-via-trustzone/20220701-230113
> git checkout 32929e13eb338e76b714bb8b4805899e2857734f
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> aarch64-linux-ld: Unexpected GOT/PLT entries detected!
> aarch64-linux-ld: Unexpected run-time procedure linkages detected!
> aarch64-linux-ld: ID map text too big or misaligned
> aarch64-linux-ld: drivers/thermal/qcom/tsens.o: in function `tsens_probe':
> >> drivers/thermal/qcom/tsens.c:1337: undefined reference to `qcom_scm_is_available'
> aarch64-linux-ld: drivers/thermal/qcom/tsens.o: in function `get_temp_tsens_valid':
> >> drivers/thermal/qcom/tsens.c:714: undefined reference to `qcom_scm_tsens_reinit'
>
>
> vim +1337 drivers/thermal/qcom/tsens.c
>
> 1293
> 1294 static int tsens_probe(struct platform_device *pdev)
> 1295 {
> 1296 int ret, i;
> 1297 struct device *dev;
> 1298 struct device_node *np;
> 1299 struct tsens_priv *priv;
> 1300 const struct tsens_plat_data *data;
> 1301 const struct of_device_id *id;
> 1302 u32 num_sensors;
> 1303
> 1304 if (pdev->dev.of_node)
> 1305 dev = &pdev->dev;
> 1306 else
> 1307 dev = pdev->dev.parent;
> 1308
> 1309 np = dev->of_node;
> 1310
> 1311 id = of_match_node(tsens_table, np);
> 1312 if (id)
> 1313 data = id->data;
> 1314 else
> 1315 data = &data_8960;
> 1316
> 1317 num_sensors = data->num_sensors;
> 1318
> 1319 if (np)
> 1320 of_property_read_u32(np, "#qcom,sensors", &num_sensors);
> 1321
> 1322 if (num_sensors <= 0) {
> 1323 dev_err(dev, "%s: invalid number of sensors\n", __func__);
> 1324 return -EINVAL;
> 1325 }
> 1326
> 1327 priv = devm_kzalloc(dev,
> 1328 struct_size(priv, sensor, num_sensors),
> 1329 GFP_KERNEL);
> 1330 if (!priv)
> 1331 return -ENOMEM;
> 1332
> 1333 priv->dev = dev;
> 1334 priv->num_sensors = num_sensors;
> 1335 priv->needs_reinit_wa = data->needs_reinit_wa;
> 1336
> > 1337 if (priv->needs_reinit_wa && !qcom_scm_is_available())
> 1338 return -EPROBE_DEFER;
> 1339
> 1340 if (priv->needs_reinit_wa) {
> 1341 priv->reinit_wa_worker = alloc_workqueue("tsens_reinit_work",
> 1342 WQ_HIGHPRI, 0);
> 1343 if (!priv->reinit_wa_worker)
> 1344 return -ENOMEM;
> 1345
> 1346 INIT_WORK(&priv->reinit_wa_notify, tsens_reinit_worker_notify);
> 1347 }
> 1348
> 1349 priv->ops = data->ops;
> 1350 for (i = 0; i < priv->num_sensors; i++) {
> 1351 if (data->hw_ids)
> 1352 priv->sensor[i].hw_id = data->hw_ids[i];
> 1353 else
> 1354 priv->sensor[i].hw_id = i;
> 1355 }
> 1356 priv->feat = data->feat;
> 1357 priv->fields = data->fields;
> 1358
> 1359 platform_set_drvdata(pdev, priv);
> 1360
> 1361 if (!priv->ops || !priv->ops->init || !priv->ops->get_temp) {
> 1362 ret = -EINVAL;
> 1363 goto free_wq;
> 1364 }
> 1365
> 1366 ret = priv->ops->init(priv);
> 1367 if (ret < 0) {
> 1368 dev_err(dev, "%s: init failed\n", __func__);
> 1369 goto free_wq;
> 1370 }
> 1371
> 1372 if (priv->ops->calibrate) {
> 1373 ret = priv->ops->calibrate(priv);
> 1374 if (ret < 0) {
> 1375 if (ret != -EPROBE_DEFER)
> 1376 dev_err(dev, "%s: calibration failed\n", __func__);
> 1377
> 1378 goto free_wq;
> 1379 }
> 1380 }
> 1381
> 1382 ret = tsens_register(priv);
> 1383 if (ret < 0) {
> 1384 dev_err(dev, "%s: registration failed\n", __func__);
> 1385 goto free_wq;
> 1386 }
> 1387
> 1388 list_add_tail(&priv->list, &tsens_device_list);
> 1389 return 0;
> 1390
> 1391 free_wq:
> 1392 destroy_workqueue(priv->reinit_wa_worker);
> 1393 return ret;
> 1394 }
> 1395

Thanks, I will fix this in v2.

Regards,
Bhupesh

\
 
 \ /
  Last update: 2022-07-12 13:05    [W:0.111 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site