From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [android-common:android15-6.6 43/60] drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:1260:5: warning: no previous prototype for function 'smmu_map_pages'
Date: Fri, 24 May 2024 07:39:59 +0800 [thread overview]
Message-ID: <202405240758.pXucQcYM-lkp@intel.com> (raw)
tree: https://android.googlesource.com/kernel/common android15-6.6
head: 43cb2bafebd1e2e6ef5c7b72b1d0bcebe0497678
commit: a737b7d0e7214b258b75010404de3de09d2d5c0d [43/60] ANDROID: KVM: arm64: iommu: Reduce the logic in generic code
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20240524/202405240758.pXucQcYM-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project fa9b1be45088dce1e4b602d451f118128b94237b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240524/202405240758.pXucQcYM-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/202405240758.pXucQcYM-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:7:
In file included from drivers/iommu/arm/arm-smmu-v3/pkvm/arm_smmu_v3.h:5:
In file included from arch/arm64/include/asm/kvm_asm.h:52:
In file included from include/linux/mm.h:2224:
include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
508 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
509 | item];
| ~~~~
include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
515 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
516 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
527 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
528 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
536 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
537 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:768:5: warning: no previous prototype for function 'smmu_domain_config_s2' [-Wmissing-prototypes]
768 | int smmu_domain_config_s2(struct kvm_hyp_iommu_domain *domain, u64 *ent)
| ^
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:768:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
768 | int smmu_domain_config_s2(struct kvm_hyp_iommu_domain *domain, u64 *ent)
| ^
| static
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:800:5: warning: no previous prototype for function 'smmu_domain_config_s1' [-Wmissing-prototypes]
800 | int smmu_domain_config_s1(struct hyp_arm_smmu_v3_device *smmu,
| ^
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:800:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
800 | int smmu_domain_config_s1(struct hyp_arm_smmu_v3_device *smmu,
| ^
| static
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:874:5: warning: no previous prototype for function 'smmu_domain_finalise' [-Wmissing-prototypes]
874 | int smmu_domain_finalise(struct hyp_arm_smmu_v3_device *smmu,
| ^
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:874:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
874 | int smmu_domain_finalise(struct hyp_arm_smmu_v3_device *smmu,
| ^
| static
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:1149:5: warning: no previous prototype for function 'smmu_alloc_domain' [-Wmissing-prototypes]
1149 | int smmu_alloc_domain(struct kvm_hyp_iommu_domain *domain, u32 type)
| ^
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:1149:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1149 | int smmu_alloc_domain(struct kvm_hyp_iommu_domain *domain, u32 type)
| ^
| static
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:1168:6: warning: no previous prototype for function 'smmu_free_domain' [-Wmissing-prototypes]
1168 | void smmu_free_domain(struct kvm_hyp_iommu_domain *domain)
| ^
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:1168:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1168 | void smmu_free_domain(struct kvm_hyp_iommu_domain *domain)
| ^
| static
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:1180:6: warning: no previous prototype for function 'smmu_dabt_device' [-Wmissing-prototypes]
1180 | bool smmu_dabt_device(struct hyp_arm_smmu_v3_device *smmu,
| ^
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:1180:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1180 | bool smmu_dabt_device(struct hyp_arm_smmu_v3_device *smmu,
| ^
| static
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:1223:6: warning: no previous prototype for function 'smmu_dabt_handler' [-Wmissing-prototypes]
1223 | bool smmu_dabt_handler(struct kvm_cpu_context *host_ctxt, u64 esr, u64 addr)
| ^
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:1223:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1223 | bool smmu_dabt_handler(struct kvm_cpu_context *host_ctxt, u64 esr, u64 addr)
| ^
| static
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:1235:5: warning: no previous prototype for function 'smmu_suspend' [-Wmissing-prototypes]
1235 | int smmu_suspend(struct kvm_hyp_iommu *iommu)
| ^
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:1235:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1235 | int smmu_suspend(struct kvm_hyp_iommu *iommu)
| ^
| static
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:1248:5: warning: no previous prototype for function 'smmu_resume' [-Wmissing-prototypes]
1248 | int smmu_resume(struct kvm_hyp_iommu *iommu)
| ^
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:1248:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1248 | int smmu_resume(struct kvm_hyp_iommu *iommu)
| ^
| static
>> drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:1260:5: warning: no previous prototype for function 'smmu_map_pages' [-Wmissing-prototypes]
1260 | int smmu_map_pages(struct kvm_hyp_iommu_domain *domain, unsigned long iova,
| ^
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:1260:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1260 | int smmu_map_pages(struct kvm_hyp_iommu_domain *domain, unsigned long iova,
| ^
| static
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:1410:5: warning: no previous prototype for function 'smmu_init_hyp_module' [-Wmissing-prototypes]
1410 | int smmu_init_hyp_module(const struct pkvm_module_ops *ops)
| ^
drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c:1410:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1410 | int smmu_init_hyp_module(const struct pkvm_module_ops *ops)
| ^
| static
16 warnings generated.
vim +/smmu_map_pages +1260 drivers/iommu/arm/arm-smmu-v3/pkvm/arm-smmu-v3.c
1259
> 1260 int smmu_map_pages(struct kvm_hyp_iommu_domain *domain, unsigned long iova,
1261 phys_addr_t paddr, size_t pgsize,
1262 size_t pgcount, int prot, size_t *total_mapped)
1263 {
1264 size_t mapped;
1265 size_t granule;
1266 int ret;
1267 struct hyp_arm_smmu_v3_domain *smmu_domain = domain->priv;
1268
1269 granule = 1UL << __ffs(domain->pgtable->cfg.pgsize_bitmap);
1270 if (!IS_ALIGNED(iova | paddr | pgsize, granule))
1271 return -EINVAL;
1272
1273 hyp_spin_lock(&smmu_domain->pgt_lock);
1274 while (pgcount && !ret) {
1275 mapped = 0;
1276 ret = domain->pgtable->ops.map_pages(&domain->pgtable->ops, iova, paddr, pgsize,
1277 pgcount, prot, 0, &mapped);
1278 if (ret)
1279 break;
1280 WARN_ON(!IS_ALIGNED(mapped, pgsize));
1281 WARN_ON(mapped > pgcount * pgsize);
1282
1283 pgcount -= mapped / pgsize;
1284 *total_mapped += mapped;
1285 iova += mapped;
1286 paddr += mapped;
1287 }
1288 hyp_spin_unlock(&smmu_domain->pgt_lock);
1289
1290 return 0;
1291 }
1292
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-05-23 23:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202405240758.pXucQcYM-lkp@intel.com \
--to=lkp@intel.com \
--cc=cros-kernel-buildreports@googlegroups.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.