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 7/8] drivers/iommu/io-pgtable-arm-common.c:471:8: warning: no previous prototype for '__arm_lpae_unmap_pages'
Date: Tue, 5 Mar 2024 13:00:19 +0800 [thread overview]
Message-ID: <202403051202.tyUcCLpm-lkp@intel.com> (raw)
tree: https://android.googlesource.com/kernel/common android15-6.6
head: a7294be0eb7058de592c1713af10741e17c4158f
commit: 528a0fb681c600db04e9700fac40c21cc208773e [7/8] ANDROID: iommu/io-pgtable: Add unmap_pages_walk() operation
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240305/202403051202.tyUcCLpm-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240305/202403051202.tyUcCLpm-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/202403051202.tyUcCLpm-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/iommu/io-pgtable-arm-common.c:143:5: warning: no previous prototype for '__arm_lpae_map' [-Wmissing-prototypes]
143 | int __arm_lpae_map(struct arm_lpae_io_pgtable *data, unsigned long iova,
| ^~~~~~~~~~~~~~
drivers/iommu/io-pgtable-arm-common.c:264:5: warning: no previous prototype for 'arm_lpae_map_pages' [-Wmissing-prototypes]
264 | int arm_lpae_map_pages(struct io_pgtable_ops *ops, unsigned long iova,
| ^~~~~~~~~~~~~~~~~~
>> drivers/iommu/io-pgtable-arm-common.c:471:8: warning: no previous prototype for '__arm_lpae_unmap_pages' [-Wmissing-prototypes]
471 | size_t __arm_lpae_unmap_pages(struct io_pgtable_ops *ops, unsigned long iova,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/io-pgtable-arm-common.c:493:13: warning: no previous prototype for 'arm_lpae_iova_to_phys' [-Wmissing-prototypes]
493 | phys_addr_t arm_lpae_iova_to_phys(struct io_pgtable_ops *ops,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/iommu/io-pgtable-arm-common.c:529:8: warning: no previous prototype for 'arm_lpae_unmap_pages' [-Wmissing-prototypes]
529 | size_t arm_lpae_unmap_pages(struct io_pgtable_ops *ops, unsigned long iova,
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/iommu/io-pgtable-arm-common.c:536:8: warning: no previous prototype for 'arm_lpae_unmap_pages_walk' [-Wmissing-prototypes]
536 | size_t arm_lpae_unmap_pages_walk(struct io_pgtable_ops *ops, unsigned long iova,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/__arm_lpae_unmap_pages +471 drivers/iommu/io-pgtable-arm-common.c
469
470
> 471 size_t __arm_lpae_unmap_pages(struct io_pgtable_ops *ops, unsigned long iova,
472 size_t pgsize, size_t pgcount,
473 struct iommu_iotlb_gather *gather,
474 struct io_pgtable_walker *walker)
475 {
476 struct arm_lpae_io_pgtable *data = io_pgtable_ops_to_data(ops);
477 struct io_pgtable_cfg *cfg = &data->iop.cfg;
478 arm_lpae_iopte *ptep = data->pgd;
479 long iaext = (s64)iova >> cfg->ias;
480
481 if (WARN_ON(!pgsize || (pgsize & cfg->pgsize_bitmap) != pgsize || !pgcount))
482 return 0;
483
484 if (cfg->quirks & IO_PGTABLE_QUIRK_ARM_TTBR1)
485 iaext = ~iaext;
486 if (WARN_ON(iaext))
487 return 0;
488
489 return __arm_lpae_unmap(data, gather, iova, pgsize, pgcount,
490 data->start_level, ptep, walker);
491 }
492
493 phys_addr_t arm_lpae_iova_to_phys(struct io_pgtable_ops *ops,
494 unsigned long iova)
495 {
496 struct arm_lpae_io_pgtable *data = io_pgtable_ops_to_data(ops);
497 arm_lpae_iopte pte, *ptep = data->pgd;
498 int lvl = data->start_level;
499
500 do {
501 /* Valid IOPTE pointer? */
502 if (!ptep)
503 return 0;
504
505 /* Grab the IOPTE we're interested in */
506 ptep += ARM_LPAE_LVL_IDX(iova, lvl, data);
507 pte = READ_ONCE(*ptep);
508
509 /* Valid entry? */
510 if (!pte)
511 return 0;
512
513 /* Leaf entry? */
514 if (iopte_leaf(pte, lvl, data->iop.fmt))
515 goto found_translation;
516
517 /* Take it to the next level */
518 ptep = iopte_deref(pte, data);
519 } while (++lvl < ARM_LPAE_MAX_LEVELS);
520
521 /* Ran out of page tables to walk */
522 return 0;
523
524 found_translation:
525 iova &= (ARM_LPAE_BLOCK_SIZE(lvl, data) - 1);
526 return iopte_to_paddr(pte, data) | iova;
527 }
528
529 size_t arm_lpae_unmap_pages(struct io_pgtable_ops *ops, unsigned long iova,
530 size_t pgsize, size_t pgcount,
531 struct iommu_iotlb_gather *gather)
532 {
533 return __arm_lpae_unmap_pages(ops, iova, pgsize, pgcount, gather, NULL);
534 }
535
> 536 size_t arm_lpae_unmap_pages_walk(struct io_pgtable_ops *ops, unsigned long iova,
537 size_t pgsize, size_t pgcount,
538 struct iommu_iotlb_gather *gather,
539 struct io_pgtable_walker *walker)
540 {
541 return __arm_lpae_unmap_pages(ops, iova, pgsize, pgcount, gather, walker);
542 }
543
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-03-05 5:00 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=202403051202.tyUcCLpm-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.