Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [PATCH 1/5] iommu: Enhance domain allocation code to take additional flags
       [not found] <20240821133554.7405-2-vasant.hegde@amd.com>
@ 2024-08-22  2:10 ` kernel test robot
  2024-08-22  3:03 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-08-22  2:10 UTC (permalink / raw)
  To: Vasant Hegde, iommu, joro
  Cc: llvm, oe-kbuild-all, will, robin.murphy, suravee.suthikulpanit,
	jgg, yi.l.liu, baolu.lu, kevin.tian, Vasant Hegde

Hi Vasant,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.11-rc4 next-20240821]
[cannot apply to joro-iommu/next]
[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/Vasant-Hegde/iommu-Enhance-domain-allocation-code-to-take-additional-flags/20240821-214124
base:   linus/master
patch link:    https://lore.kernel.org/r/20240821133554.7405-2-vasant.hegde%40amd.com
patch subject: [PATCH 1/5] iommu: Enhance domain allocation code to take additional flags
config: arm-footbridge_defconfig (https://download.01.org/0day-ci/archive/20240822/202408220940.YjSy3Avg-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 26670e7fa4f032a019d23d56c6a02926e854e8af)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240822/202408220940.YjSy3Avg-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408220940.YjSy3Avg-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/pci/pci-driver.c:7:
   In file included from include/linux/pci.h:1646:
   In file included from include/linux/dmapool.h:14:
   In file included from include/linux/scatterlist.h:8:
   In file included from include/linux/mm.h:2228:
   include/linux/vmstat.h:517:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     517 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   In file included from drivers/pci/pci-driver.c:23:
   include/linux/iommu.h:1103:1: error: declaration of anonymous struct must be a definition
    1103 | struct inline iommu_domain *iommu_paging_domain_alloc_flags(struct device *dev,
         | ^
   include/linux/iommu.h:1103:1: warning: declaration does not declare anything [-Wmissing-declarations]
>> drivers/pci/pci-driver.c:1657:9: error: call to undeclared function 'iommu_device_use_default_domain'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1657 |                 ret = iommu_device_use_default_domain(dev);
         |                       ^
>> drivers/pci/pci-driver.c:1670:3: error: call to undeclared function 'iommu_device_unuse_default_domain'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1670 |                 iommu_device_unuse_default_domain(dev);
         |                 ^
   2 warnings and 3 errors generated.


vim +/iommu_device_use_default_domain +1657 drivers/pci/pci-driver.c

02e0bea6c83c657 Phil Sutter       2017-01-18  1629  
07397df29e57cde Nipun Gupta       2018-04-28  1630  /**
07397df29e57cde Nipun Gupta       2018-04-28  1631   * pci_dma_configure - Setup DMA configuration
07397df29e57cde Nipun Gupta       2018-04-28  1632   * @dev: ptr to dev structure
07397df29e57cde Nipun Gupta       2018-04-28  1633   *
07397df29e57cde Nipun Gupta       2018-04-28  1634   * Function to update PCI devices's DMA configuration using the same
07397df29e57cde Nipun Gupta       2018-04-28  1635   * info from the OF node or ACPI node of host bridge's parent (if any).
07397df29e57cde Nipun Gupta       2018-04-28  1636   */
07397df29e57cde Nipun Gupta       2018-04-28  1637  static int pci_dma_configure(struct device *dev)
07397df29e57cde Nipun Gupta       2018-04-28  1638  {
512881eacfa72c2 Lu Baolu          2022-04-18  1639  	struct pci_driver *driver = to_pci_driver(dev->driver);
07397df29e57cde Nipun Gupta       2018-04-28  1640  	struct device *bridge;
07397df29e57cde Nipun Gupta       2018-04-28  1641  	int ret = 0;
07397df29e57cde Nipun Gupta       2018-04-28  1642  
07397df29e57cde Nipun Gupta       2018-04-28  1643  	bridge = pci_get_host_bridge_device(to_pci_dev(dev));
07397df29e57cde Nipun Gupta       2018-04-28  1644  
07397df29e57cde Nipun Gupta       2018-04-28  1645  	if (IS_ENABLED(CONFIG_OF) && bridge->parent &&
07397df29e57cde Nipun Gupta       2018-04-28  1646  	    bridge->parent->of_node) {
3d6ce86ee79465e Christoph Hellwig 2018-05-03  1647  		ret = of_dma_configure(dev, bridge->parent->of_node, true);
07397df29e57cde Nipun Gupta       2018-04-28  1648  	} else if (has_acpi_companion(bridge)) {
07397df29e57cde Nipun Gupta       2018-04-28  1649  		struct acpi_device *adev = to_acpi_device_node(bridge->fwnode);
07397df29e57cde Nipun Gupta       2018-04-28  1650  
e5361ca29f2fea3 Robin Murphy      2018-12-06  1651  		ret = acpi_dma_configure(dev, acpi_get_dma_attr(adev));
07397df29e57cde Nipun Gupta       2018-04-28  1652  	}
07397df29e57cde Nipun Gupta       2018-04-28  1653  
07397df29e57cde Nipun Gupta       2018-04-28  1654  	pci_put_host_bridge_device(bridge);
512881eacfa72c2 Lu Baolu          2022-04-18  1655  
512881eacfa72c2 Lu Baolu          2022-04-18  1656  	if (!ret && !driver->driver_managed_dma) {
512881eacfa72c2 Lu Baolu          2022-04-18 @1657  		ret = iommu_device_use_default_domain(dev);
512881eacfa72c2 Lu Baolu          2022-04-18  1658  		if (ret)
512881eacfa72c2 Lu Baolu          2022-04-18  1659  			arch_teardown_dma_ops(dev);
512881eacfa72c2 Lu Baolu          2022-04-18  1660  	}
512881eacfa72c2 Lu Baolu          2022-04-18  1661  
07397df29e57cde Nipun Gupta       2018-04-28  1662  	return ret;
07397df29e57cde Nipun Gupta       2018-04-28  1663  }
07397df29e57cde Nipun Gupta       2018-04-28  1664  
512881eacfa72c2 Lu Baolu          2022-04-18  1665  static void pci_dma_cleanup(struct device *dev)
512881eacfa72c2 Lu Baolu          2022-04-18  1666  {
512881eacfa72c2 Lu Baolu          2022-04-18  1667  	struct pci_driver *driver = to_pci_driver(dev->driver);
512881eacfa72c2 Lu Baolu          2022-04-18  1668  
512881eacfa72c2 Lu Baolu          2022-04-18  1669  	if (!driver->driver_managed_dma)
512881eacfa72c2 Lu Baolu          2022-04-18 @1670  		iommu_device_unuse_default_domain(dev);
512881eacfa72c2 Lu Baolu          2022-04-18  1671  }
512881eacfa72c2 Lu Baolu          2022-04-18  1672  

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/5] iommu: Enhance domain allocation code to take additional flags
       [not found] <20240821133554.7405-2-vasant.hegde@amd.com>
  2024-08-22  2:10 ` [PATCH 1/5] iommu: Enhance domain allocation code to take additional flags kernel test robot
@ 2024-08-22  3:03 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-08-22  3:03 UTC (permalink / raw)
  To: Vasant Hegde, iommu, joro
  Cc: llvm, oe-kbuild-all, will, robin.murphy, suravee.suthikulpanit,
	jgg, yi.l.liu, baolu.lu, kevin.tian, Vasant Hegde

Hi Vasant,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.11-rc4 next-20240821]
[cannot apply to joro-iommu/next]
[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/Vasant-Hegde/iommu-Enhance-domain-allocation-code-to-take-additional-flags/20240821-214124
base:   linus/master
patch link:    https://lore.kernel.org/r/20240821133554.7405-2-vasant.hegde%40amd.com
patch subject: [PATCH 1/5] iommu: Enhance domain allocation code to take additional flags
config: i386-randconfig-004-20240822 (https://download.01.org/0day-ci/archive/20240822/202408221020.wjaKCVvB-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240822/202408221020.wjaKCVvB-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408221020.wjaKCVvB-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/gpu/drm/arm/display/komeda/komeda_dev.c:8:
   include/linux/iommu.h:1103:1: error: declaration of anonymous struct must be a definition
    1103 | struct inline iommu_domain *iommu_paging_domain_alloc_flags(struct device *dev,
         | ^
   include/linux/iommu.h:1103:1: warning: declaration does not declare anything [-Wmissing-declarations]
   include/linux/iommu.h:1478:48: warning: declaration of 'struct msi_desc' will not be visible outside of this function [-Wvisibility]
    1478 | static inline int iommu_dma_prepare_msi(struct msi_desc *desc, phys_addr_t msi_addr)
         |                                                ^
   include/linux/iommu.h:1483:53: warning: declaration of 'struct msi_desc' will not be visible outside of this function [-Wvisibility]
    1483 | static inline void iommu_dma_compose_msi_msg(struct msi_desc *desc, struct msi_msg *msg)
         |                                                     ^
>> drivers/gpu/drm/arm/display/komeda/komeda_dev.c:250:16: error: call to undeclared function 'iommu_get_domain_for_dev'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     250 |         mdev->iommu = iommu_get_domain_for_dev(mdev->dev);
         |                       ^
>> drivers/gpu/drm/arm/display/komeda/komeda_dev.c:250:14: error: incompatible integer to pointer conversion assigning to 'struct iommu_domain *' from 'int' [-Wint-conversion]
     250 |         mdev->iommu = iommu_get_domain_for_dev(mdev->dev);
         |                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   3 warnings and 3 errors generated.


vim +250 drivers/gpu/drm/arm/display/komeda/komeda_dev.c

b25bc78f8a0750 james qian wang (Arm Technology China  2019-12-10  179) 
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  180) struct komeda_dev *komeda_dev_create(struct device *dev)
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  181) {
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  182) 	struct platform_device *pdev = to_platform_device(dev);
b25bc78f8a0750 james qian wang (Arm Technology China  2019-12-10  183) 	komeda_identify_func komeda_identify;
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  184) 	struct komeda_dev *mdev;
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  185) 	int err = 0;
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  186) 
b25bc78f8a0750 james qian wang (Arm Technology China  2019-12-10  187) 	komeda_identify = of_device_get_match_data(dev);
b25bc78f8a0750 james qian wang (Arm Technology China  2019-12-10  188) 	if (!komeda_identify)
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  189) 		return ERR_PTR(-ENODEV);
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  190) 
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  191) 	mdev = devm_kzalloc(dev, sizeof(*mdev), GFP_KERNEL);
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  192) 	if (!mdev)
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  193) 		return ERR_PTR(-ENOMEM);
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  194) 
20d84aa8417910 james qian wang (Arm Technology China  2019-01-22  195) 	mutex_init(&mdev->lock);
20d84aa8417910 james qian wang (Arm Technology China  2019-01-22  196) 
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  197) 	mdev->dev = dev;
50ec5b563bed04 Markus Elfring                         2019-09-21  198  	mdev->reg_base = devm_platform_ioremap_resource(pdev, 0);
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  199) 	if (IS_ERR(mdev->reg_base)) {
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  200) 		DRM_ERROR("Map register space failed.\n");
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  201) 		err = PTR_ERR(mdev->reg_base);
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  202) 		mdev->reg_base = NULL;
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  203) 		goto err_cleanup;
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  204) 	}
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  205) 
6f84da0c74f12f james qian wang (Arm Technology China  2019-06-05  206) 	mdev->aclk = devm_clk_get(dev, "aclk");
6f84da0c74f12f james qian wang (Arm Technology China  2019-06-05  207) 	if (IS_ERR(mdev->aclk)) {
28be315c9c0c0b james qian wang (Arm Technology China  2019-06-05  208) 		DRM_ERROR("Get engine clk failed.\n");
6f84da0c74f12f james qian wang (Arm Technology China  2019-06-05  209) 		err = PTR_ERR(mdev->aclk);
6f84da0c74f12f james qian wang (Arm Technology China  2019-06-05  210) 		mdev->aclk = NULL;
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  211) 		goto err_cleanup;
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  212) 	}
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  213) 
6f84da0c74f12f james qian wang (Arm Technology China  2019-06-05  214) 	clk_prepare_enable(mdev->aclk);
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  215) 
b25bc78f8a0750 james qian wang (Arm Technology China  2019-12-10  216) 	mdev->funcs = komeda_identify(mdev->reg_base, &mdev->chip);
b25bc78f8a0750 james qian wang (Arm Technology China  2019-12-10  217) 	if (!mdev->funcs) {
b25bc78f8a0750 james qian wang (Arm Technology China  2019-12-10  218) 		DRM_ERROR("Failed to identify the HW.\n");
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  219) 		err = -ENODEV;
2ebb6701654e0d Lowry Li (Arm Technology China         2019-09-23  220) 		goto disable_clk;
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  221) 	}
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  222) 
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  223) 	DRM_INFO("Found ARM Mali-D%x version r%dp%d\n",
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  224) 		 MALIDP_CORE_ID_PRODUCT_ID(mdev->chip.core_id),
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  225) 		 MALIDP_CORE_ID_MAJOR(mdev->chip.core_id),
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  226) 		 MALIDP_CORE_ID_MINOR(mdev->chip.core_id));
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  227) 
981d29d2db7c96 james qian wang (Arm Technology China  2019-01-03  228) 	mdev->funcs->init_format_table(mdev);
981d29d2db7c96 james qian wang (Arm Technology China  2019-01-03  229) 
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  230) 	err = mdev->funcs->enum_resources(mdev);
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  231) 	if (err) {
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  232) 		DRM_ERROR("enumerate display resource failed.\n");
2ebb6701654e0d Lowry Li (Arm Technology China         2019-09-23  233) 		goto disable_clk;
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  234) 	}
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  235) 
29e56aec911dd7 james qian wang (Arm Technology China  2019-01-03  236) 	err = komeda_parse_dt(dev, mdev);
29e56aec911dd7 james qian wang (Arm Technology China  2019-01-03  237) 	if (err) {
29e56aec911dd7 james qian wang (Arm Technology China  2019-01-03  238) 		DRM_ERROR("parse device tree failed.\n");
2ebb6701654e0d Lowry Li (Arm Technology China         2019-09-23  239) 		goto disable_clk;
29e56aec911dd7 james qian wang (Arm Technology China  2019-01-03  240) 	}
29e56aec911dd7 james qian wang (Arm Technology China  2019-01-03  241) 
321e925c5813c2 james qian wang (Arm Technology China  2019-01-22  242) 	err = komeda_assemble_pipelines(mdev);
321e925c5813c2 james qian wang (Arm Technology China  2019-01-22  243) 	if (err) {
321e925c5813c2 james qian wang (Arm Technology China  2019-01-22  244) 		DRM_ERROR("assemble display pipelines failed.\n");
2ebb6701654e0d Lowry Li (Arm Technology China         2019-09-23  245) 		goto disable_clk;
321e925c5813c2 james qian wang (Arm Technology China  2019-01-22  246) 	}
321e925c5813c2 james qian wang (Arm Technology China  2019-01-22  247) 
1c831ade9f352d Robin Murphy                           2020-09-03  248  	dma_set_max_seg_size(dev, U32_MAX);
a260e0b847f079 Lowry Li (Arm Technology China         2019-04-11  249) 
e87cae37f6006f Lowry Li (Arm Technology China         2019-06-06 @250) 	mdev->iommu = iommu_get_domain_for_dev(mdev->dev);
e87cae37f6006f Lowry Li (Arm Technology China         2019-06-06  251) 	if (!mdev->iommu)
e87cae37f6006f Lowry Li (Arm Technology China         2019-06-06  252) 		DRM_INFO("continue without IOMMU support!\n");
e87cae37f6006f Lowry Li (Arm Technology China         2019-06-06  253) 
2ebb6701654e0d Lowry Li (Arm Technology China         2019-09-23  254) 	clk_disable_unprepare(mdev->aclk);
2ebb6701654e0d Lowry Li (Arm Technology China         2019-09-23  255) 
55223394d56bab james qian wang (Arm Technology China  2019-01-22  256) 	err = sysfs_create_group(&dev->kobj, &komeda_sysfs_attr_group);
55223394d56bab james qian wang (Arm Technology China  2019-01-22  257) 	if (err) {
55223394d56bab james qian wang (Arm Technology China  2019-01-22  258) 		DRM_ERROR("create sysfs group failed.\n");
55223394d56bab james qian wang (Arm Technology China  2019-01-22  259) 		goto err_cleanup;
55223394d56bab james qian wang (Arm Technology China  2019-01-22  260) 	}
55223394d56bab james qian wang (Arm Technology China  2019-01-22  261) 
8894cd5824e500 Mihail Atanassov                       2019-11-07  262  	mdev->err_verbosity = KOMEDA_DEV_PRINT_ERR_EVENTS;
8894cd5824e500 Mihail Atanassov                       2019-11-07  263  
7d3cfb70a604d2 james qian wang (Arm Technology China  2019-01-22  264) 	komeda_debugfs_init(mdev);
7d3cfb70a604d2 james qian wang (Arm Technology China  2019-01-22  265) 
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  266) 	return mdev;
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  267) 
2ebb6701654e0d Lowry Li (Arm Technology China         2019-09-23  268) disable_clk:
2ebb6701654e0d Lowry Li (Arm Technology China         2019-09-23  269) 	clk_disable_unprepare(mdev->aclk);
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  270) err_cleanup:
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  271) 	komeda_dev_destroy(mdev);
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  272) 	return ERR_PTR(err);
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  273) }
bd628c1bed7902 james qian wang (Arm Technology China  2019-01-03  274) 

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-22  3:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20240821133554.7405-2-vasant.hegde@amd.com>
2024-08-22  2:10 ` [PATCH 1/5] iommu: Enhance domain allocation code to take additional flags kernel test robot
2024-08-22  3:03 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox