Re: [PATCH] media: intel/ipu6: optimize the IPU6 MMU mapping and unmapping flow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on media-tree/master]
[also build test WARNING on sailus-media-tree/master linuxtv-media-stage/master linus/master v6.11-rc3 next-20240815]
[cannot apply to sailus-media-tree/streams]
[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/bingbu-cao-intel-com/media-intel-ipu6-optimize-the-IPU6-MMU-mapping-and-unmapping-flow/20240815-111022
base:   git://linuxtv.org/media_tree.git master
patch link:    https://lore.kernel.org/r/20240815030829.1608953-1-bingbu.cao%40intel.com
patch subject: [PATCH] media: intel/ipu6: optimize the IPU6 MMU mapping and unmapping flow
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240815/202408152355.Qx4KRzRh-lkp@xxxxxxxxx/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/20240815/202408152355.Qx4KRzRh-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408152355.Qx4KRzRh-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/media/pci/intel/ipu6/ipu6-mmu.c:261:9: warning: variable 'unmapped' set but not used [-Wunused-but-set-variable]
     261 |         size_t unmapped = 0;
         |                ^
   1 warning generated.


vim +/unmapped +261 drivers/media/pci/intel/ipu6/ipu6-mmu.c

   254	
   255	static void l2_unmap(struct ipu6_mmu_info *mmu_info, unsigned long iova,
   256			     phys_addr_t dummy, size_t size)
   257	{
   258		unsigned int l2_entries;
   259		unsigned int l2_idx;
   260		unsigned long flags;
 > 261		size_t unmapped = 0;
   262		u32 l1_idx;
   263		u32 *l2_pt;
   264	
   265		spin_lock_irqsave(&mmu_info->lock, flags);
   266		for (l1_idx = iova >> ISP_L1PT_SHIFT;
   267		     size > 0 && l1_idx < ISP_L1PT_PTES; l1_idx++) {
   268			dev_dbg(mmu_info->dev,
   269				"unmapping l2 pgtable (l1 index %u (iova 0x%8.8lx))\n",
   270				l1_idx, iova);
   271	
   272			if (mmu_info->l1_pt[l1_idx] == mmu_info->dummy_l2_pteval) {
   273				dev_err(mmu_info->dev,
   274					"unmap not mapped iova 0x%8.8lx l1 index %u\n",
   275					iova, l1_idx);
   276				continue;
   277			}
   278			l2_pt = mmu_info->l2_pts[l1_idx];
   279	
   280			l2_entries = 0;
   281			for (l2_idx = (iova & ISP_L2PT_MASK) >> ISP_L2PT_SHIFT;
   282			     size > 0 && l2_idx < ISP_L2PT_PTES; l2_idx++) {
   283				dev_dbg(mmu_info->dev,
   284					"unmap l2 index %u with pteval 0x%10.10llx\n",
   285					l2_idx, TBL_PHYS_ADDR(l2_pt[l2_idx]));
   286				l2_pt[l2_idx] = mmu_info->dummy_page_pteval;
   287	
   288				iova += ISP_PAGE_SIZE;
   289				unmapped += ISP_PAGE_SIZE;
   290				size -= ISP_PAGE_SIZE;
   291	
   292				l2_entries++;
   293			}
   294	
   295			WARN_ON_ONCE(!l2_entries);
   296			clflush_cache_range(&l2_pt[l2_idx - l2_entries],
   297					    sizeof(l2_pt[0]) * l2_entries);
   298		}
   299	
   300		WARN_ON_ONCE(size);
   301		spin_unlock_irqrestore(&mmu_info->lock, flags);
   302	}
   303	

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




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux