lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2bf7bb25-9a6b-42d5-b095-978f7bb81f35@nvidia.com>
Date: Wed, 10 Dec 2025 10:49:12 +0530
From: Ashish Mhetre <amhetre@...dia.com>
To: robin.murphy@....com, Nicolin Chen <nicolinc@...dia.com>
Cc: oe-kbuild-all@...ts.linux.dev, thierry.reding@...il.com,
 jonathanh@...dia.com, vdumpa@...dia.com, jgg@...pe.ca,
 linux-arm-kernel@...ts.infradead.org, iommu@...ts.linux.dev,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-tegra@...r.kernel.org, joro@...tes.org, robh@...nel.org,
 krzk+dt@...nel.org, conor+dt@...nel.org, kernel test robot <lkp@...el.com>,
 will@...nel.org
Subject: Re: [PATCH V4 1/3] iommu/arm-smmu-v3: Add device-tree support for
 CMDQV driver


On 12/9/2025 1:13 AM, kernel test robot wrote:
> External email: Use caution opening links or attachments
>
>
> Hi Ashish,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on next-20251204]
> [also build test WARNING on v6.18]
> [cannot apply to robh/for-next linus/master v6.18 v6.18-rc7 v6.18-rc6]
> [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/Ashish-Mhetre/iommu-arm-smmu-v3-Add-device-tree-support-for-CMDQV-driver/20251205-151258
> base:   next-20251204
> patch link:    https://lore.kernel.org/r/20251205065850.3841834-2-amhetre%40nvidia.com
> patch subject: [PATCH V4 1/3] iommu/arm-smmu-v3: Add device-tree support for CMDQV driver
> config: arm64-randconfig-004-20251209 (https://download.01.org/0day-ci/archive/20251209/202512090331.QAFgb6vQ-lkp@intel.com/config)
> compiler: aarch64-linux-gcc (GCC) 11.5.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251209/202512090331.QAFgb6vQ-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@...el.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202512090331.QAFgb6vQ-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
>     drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c: In function 'tegra241_cmdqv_acpi_is_memory':
>     drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:863:17: error: implicit declaration of function 'acpi_dev_resource_address_space' [-Werror=implicit-function-declaration]
>       863 |         return !acpi_dev_resource_address_space(res, &win);
>           |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c: In function 'tegra241_cmdqv_acpi_get_irqs':
>     drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:871:26: error: implicit declaration of function 'acpi_dev_resource_interrupt' [-Werror=implicit-function-declaration]
>       871 |         if (*irq <= 0 && acpi_dev_resource_interrupt(ares, 0, &r))
>           |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>     drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c: In function 'tegra241_cmdqv_find_acpi_resource':
>     drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:879:36: error: implicit declaration of function 'to_acpi_device'; did you mean 'to_acpi_device_node'? [-Werror=implicit-function-declaration]
>       879 |         struct acpi_device *adev = to_acpi_device(dev);
>           |                                    ^~~~~~~~~~~~~~
>           |                                    to_acpi_device_node
>>> drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:879:36: warning: initialization of 'struct acpi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
>     drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:886:15: error: implicit declaration of function 'acpi_dev_get_resources'; did you mean 'acpi_get_event_resources'? [-Werror=implicit-function-declaration]
>       886 |         ret = acpi_dev_get_resources(adev, &resource_list,
>           |               ^~~~~~~~~~~~~~~~~~~~~~
>           |               acpi_get_event_resources
>     drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:907:9: error: implicit declaration of function 'acpi_dev_free_resource_list' [-Werror=implicit-function-declaration]
>       907 |         acpi_dev_free_resource_list(&resource_list);
>           |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>     cc1: some warnings being treated as errors

Hi Robin, Nic,
We removed ACPI dependency in Kconfig but driver still depends
on ACPI for these functions. I will be protecting ACPIspecific
tegra241-cmdqv code under CONFIG_ACPI similar to what is done
in arm-smmu-v3 driver. Is this the correct thing to do or do you
have any other suggestions?

> vim +879 drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c
>
> 918eb5c856f6ce Nate Watterson 2024-08-29  875
> 918eb5c856f6ce Nate Watterson 2024-08-29  876  static struct resource *
> 918eb5c856f6ce Nate Watterson 2024-08-29  877  tegra241_cmdqv_find_acpi_resource(struct device *dev, int *irq)
> 918eb5c856f6ce Nate Watterson 2024-08-29  878  {
> 918eb5c856f6ce Nate Watterson 2024-08-29 @879   struct acpi_device *adev = to_acpi_device(dev);
> 918eb5c856f6ce Nate Watterson 2024-08-29  880   struct list_head resource_list;
> 918eb5c856f6ce Nate Watterson 2024-08-29  881   struct resource_entry *rentry;
> 918eb5c856f6ce Nate Watterson 2024-08-29  882   struct resource *res = NULL;
> 918eb5c856f6ce Nate Watterson 2024-08-29  883   int ret;
> 918eb5c856f6ce Nate Watterson 2024-08-29  884
> 918eb5c856f6ce Nate Watterson 2024-08-29  885   INIT_LIST_HEAD(&resource_list);
> 918eb5c856f6ce Nate Watterson 2024-08-29  886   ret = acpi_dev_get_resources(adev, &resource_list,
> 918eb5c856f6ce Nate Watterson 2024-08-29  887                                tegra241_cmdqv_acpi_is_memory, NULL);
> 918eb5c856f6ce Nate Watterson 2024-08-29  888   if (ret < 0) {
> 918eb5c856f6ce Nate Watterson 2024-08-29  889           dev_err(dev, "failed to get memory resource: %d\n", ret);
> 918eb5c856f6ce Nate Watterson 2024-08-29  890           return NULL;
> 918eb5c856f6ce Nate Watterson 2024-08-29  891   }
> 918eb5c856f6ce Nate Watterson 2024-08-29  892
> 918eb5c856f6ce Nate Watterson 2024-08-29  893   rentry = list_first_entry_or_null(&resource_list,
> 918eb5c856f6ce Nate Watterson 2024-08-29  894                                     struct resource_entry, node);
> 918eb5c856f6ce Nate Watterson 2024-08-29  895   if (!rentry) {
> 918eb5c856f6ce Nate Watterson 2024-08-29  896           dev_err(dev, "failed to get memory resource entry\n");
> 918eb5c856f6ce Nate Watterson 2024-08-29  897           goto free_list;
> 918eb5c856f6ce Nate Watterson 2024-08-29  898   }
> 918eb5c856f6ce Nate Watterson 2024-08-29  899
> 918eb5c856f6ce Nate Watterson 2024-08-29  900   /* Caller must free the res */
> 918eb5c856f6ce Nate Watterson 2024-08-29  901   res = kzalloc(sizeof(*res), GFP_KERNEL);
> 918eb5c856f6ce Nate Watterson 2024-08-29  902   if (!res)
> 918eb5c856f6ce Nate Watterson 2024-08-29  903           goto free_list;
> 918eb5c856f6ce Nate Watterson 2024-08-29  904
> 918eb5c856f6ce Nate Watterson 2024-08-29  905   *res = *rentry->res;
> 918eb5c856f6ce Nate Watterson 2024-08-29  906
> 918eb5c856f6ce Nate Watterson 2024-08-29  907   acpi_dev_free_resource_list(&resource_list);
> 918eb5c856f6ce Nate Watterson 2024-08-29  908
> 918eb5c856f6ce Nate Watterson 2024-08-29  909   INIT_LIST_HEAD(&resource_list);
> 918eb5c856f6ce Nate Watterson 2024-08-29  910
> 918eb5c856f6ce Nate Watterson 2024-08-29  911   if (irq)
> 918eb5c856f6ce Nate Watterson 2024-08-29  912           ret = acpi_dev_get_resources(adev, &resource_list,
> 918eb5c856f6ce Nate Watterson 2024-08-29  913                                        tegra241_cmdqv_acpi_get_irqs, irq);
> 918eb5c856f6ce Nate Watterson 2024-08-29  914   if (ret < 0 || !irq || *irq <= 0)
> 918eb5c856f6ce Nate Watterson 2024-08-29  915           dev_warn(dev, "no interrupt. errors will not be reported\n");
> 918eb5c856f6ce Nate Watterson 2024-08-29  916
> 918eb5c856f6ce Nate Watterson 2024-08-29  917  free_list:
> 918eb5c856f6ce Nate Watterson 2024-08-29  918   acpi_dev_free_resource_list(&resource_list);
> 918eb5c856f6ce Nate Watterson 2024-08-29  919   return res;
> 918eb5c856f6ce Nate Watterson 2024-08-29  920  }
> 918eb5c856f6ce Nate Watterson 2024-08-29  921
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ