lkml.org 
[lkml]   [2022]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/6] iommu/qcom: Add support for AArch64 IOMMU pagetables
Hi Konrad,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on joro-iommu/next]
[also build test WARNING on v5.18 next-20220527]
[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]

url: https://github.com/intel-lab-lkp/linux/commits/Konrad-Dybcio/iommu-qcom-Use-the-asid-read-from-device-tree-if-specified/20220528-062952
base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220528/202205280904.vsNCfpph-lkp@intel.com/config)
compiler: arceb-elf-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/0744f7d6ebfff8d6854a24d0f95f8e58885b5212
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Konrad-Dybcio/iommu-qcom-Use-the-asid-read-from-device-tree-if-specified/20220528-062952
git checkout 0744f7d6ebfff8d6854a24d0f95f8e58885b5212
# 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=arc SHELL=/bin/bash drivers/iommu/arm/arm-smmu/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

drivers/iommu/arm/arm-smmu/qcom_iommu.c: In function 'qcom_iommu_tlb_inv_range_nosync':
>> drivers/iommu/arm/arm-smmu/qcom_iommu.c:174:58: warning: left shift count >= width of type [-Wshift-count-overflow]
174 | iova |= (unsigned long)ctx->asid << 48;
| ^~


vim +174 drivers/iommu/arm/arm-smmu/qcom_iommu.c

157
158 static void qcom_iommu_tlb_inv_range_nosync(unsigned long iova, size_t size,
159 size_t granule, bool leaf, void *cookie)
160 {
161 struct qcom_iommu_domain *qcom_domain = cookie;
162 struct iommu_fwspec *fwspec = qcom_domain->fwspec;
163 unsigned i, reg;
164
165 reg = leaf ? ARM_SMMU_CB_S1_TLBIVAL : ARM_SMMU_CB_S1_TLBIVA;
166
167 for (i = 0; i < fwspec->num_ids; i++) {
168 struct qcom_iommu_dev *qcom_iommu = qcom_domain->iommu;
169 struct qcom_iommu_ctx *ctx = to_ctx(qcom_domain, fwspec->ids[i]);
170 size_t s = size;
171
172 if (qcom_iommu->use_aarch64_pt) {
173 iova >>= 12;
> 174 iova |= (unsigned long)ctx->asid << 48;
175 } else {
176 iova &= (1UL << 12) - 1UL;
177 iova |= ctx->asid;
178 }
179 do {
180 iommu_writel(ctx, reg, iova);
181 iova += granule;
182 } while (s -= granule);
183 }
184 }
185

--
0-DAY CI Kernel Test Service
https://01.org/lkp

\
 
 \ /
  Last update: 2022-05-28 04:05    [W:0.041 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site