Linux IOMMU Development
 help / color / mirror / Atom feed
* [iommu:x86/vt-d 41/59] drivers/iommu/io-pgtable-arm-v7s.c:703:43: error: 'struct iommu_iotlb_gather' has no member named 'queued'
@ 2021-08-20  9:02 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-20  9:02 UTC (permalink / raw)
  To: Robin Murphy; +Cc: iommu, Joerg Roedel, kbuild-all

[-- Attachment #1: Type: text/plain, Size: 7076 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git x86/vt-d
head:   423d39d8518c1bba12e0889a92beeddbb1502392
commit: a8e5f04458c4e496eada2b029ce96713bb6c388d [41/59] iommu/io-pgtable: Remove non-strict quirk
config: nds32-buildonly-randconfig-r001-20210820 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git/commit/?id=a8e5f04458c4e496eada2b029ce96713bb6c388d
        git remote add iommu https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
        git fetch --no-tags iommu x86/vt-d
        git checkout a8e5f04458c4e496eada2b029ce96713bb6c388d
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash drivers/iommu/

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

All errors (new ones prefixed by >>):

   In file included from include/linux/init.h:5,
                    from arch/nds32/include/asm/nds32.h:11,
                    from arch/nds32/include/asm/irqflags.h:4,
                    from include/linux/irqflags.h:16,
                    from include/asm-generic/cmpxchg.h:15,
                    from ./arch/nds32/include/generated/asm/cmpxchg.h:1,
                    from include/asm-generic/atomic.h:12,
                    from ./arch/nds32/include/generated/asm/atomic.h:1,
                    from include/linux/atomic.h:7,
                    from drivers/iommu/io-pgtable-arm-v7s.c:24:
   drivers/iommu/io-pgtable-arm-v7s.c: In function '__arm_v7s_unmap':
>> drivers/iommu/io-pgtable-arm-v7s.c:703:43: error: 'struct iommu_iotlb_gather' has no member named 'queued'
     703 |                         } else if (!gather->queued) {
         |                                           ^~
   include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
      58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
         |                                                    ^~~~
   drivers/iommu/io-pgtable-arm-v7s.c:703:32: note: in expansion of macro 'if'
     703 |                         } else if (!gather->queued) {
         |                                ^~
>> drivers/iommu/io-pgtable-arm-v7s.c:703:43: error: 'struct iommu_iotlb_gather' has no member named 'queued'
     703 |                         } else if (!gather->queued) {
         |                                           ^~
   include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
      58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
         |                                                             ^~~~
   drivers/iommu/io-pgtable-arm-v7s.c:703:32: note: in expansion of macro 'if'
     703 |                         } else if (!gather->queued) {
         |                                ^~
>> drivers/iommu/io-pgtable-arm-v7s.c:703:43: error: 'struct iommu_iotlb_gather' has no member named 'queued'
     703 |                         } else if (!gather->queued) {
         |                                           ^~
   include/linux/compiler.h:69:10: note: in definition of macro '__trace_if_value'
      69 |         (cond) ?                                        \
         |          ^~~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
      56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
         |                            ^~~~~~~~~~~~~~
   drivers/iommu/io-pgtable-arm-v7s.c:703:32: note: in expansion of macro 'if'
     703 |                         } else if (!gather->queued) {
         |                                ^~


vim +703 drivers/iommu/io-pgtable-arm-v7s.c

   650	
   651	static size_t __arm_v7s_unmap(struct arm_v7s_io_pgtable *data,
   652				      struct iommu_iotlb_gather *gather,
   653				      unsigned long iova, size_t size, int lvl,
   654				      arm_v7s_iopte *ptep)
   655	{
   656		arm_v7s_iopte pte[ARM_V7S_CONT_PAGES];
   657		struct io_pgtable *iop = &data->iop;
   658		int idx, i = 0, num_entries = size >> ARM_V7S_LVL_SHIFT(lvl);
   659	
   660		/* Something went horribly wrong and we ran out of page table */
   661		if (WARN_ON(lvl > 2))
   662			return 0;
   663	
   664		idx = ARM_V7S_LVL_IDX(iova, lvl, &iop->cfg);
   665		ptep += idx;
   666		do {
   667			pte[i] = READ_ONCE(ptep[i]);
   668			if (WARN_ON(!ARM_V7S_PTE_IS_VALID(pte[i])))
   669				return 0;
   670		} while (++i < num_entries);
   671	
   672		/*
   673		 * If we've hit a contiguous 'large page' entry at this level, it
   674		 * needs splitting first, unless we're unmapping the whole lot.
   675		 *
   676		 * For splitting, we can't rewrite 16 PTEs atomically, and since we
   677		 * can't necessarily assume TEX remap we don't have a software bit to
   678		 * mark live entries being split. In practice (i.e. DMA API code), we
   679		 * will never be splitting large pages anyway, so just wrap this edge
   680		 * case in a lock for the sake of correctness and be done with it.
   681		 */
   682		if (num_entries <= 1 && arm_v7s_pte_is_cont(pte[0], lvl)) {
   683			unsigned long flags;
   684	
   685			spin_lock_irqsave(&data->split_lock, flags);
   686			pte[0] = arm_v7s_split_cont(data, iova, idx, lvl, ptep);
   687			spin_unlock_irqrestore(&data->split_lock, flags);
   688		}
   689	
   690		/* If the size matches this level, we're in the right place */
   691		if (num_entries) {
   692			size_t blk_size = ARM_V7S_BLOCK_SIZE(lvl);
   693	
   694			__arm_v7s_set_pte(ptep, 0, num_entries, &iop->cfg);
   695	
   696			for (i = 0; i < num_entries; i++) {
   697				if (ARM_V7S_PTE_IS_TABLE(pte[i], lvl)) {
   698					/* Also flush any partial walks */
   699					io_pgtable_tlb_flush_walk(iop, iova, blk_size,
   700							ARM_V7S_BLOCK_SIZE(lvl + 1));
   701					ptep = iopte_deref(pte[i], lvl, data);
   702					__arm_v7s_free_table(ptep, lvl + 1, data);
 > 703				} else if (!gather->queued) {
   704					io_pgtable_tlb_add_page(iop, gather, iova, blk_size);
   705				}
   706				iova += blk_size;
   707			}
   708			return size;
   709		} else if (lvl == 1 && !ARM_V7S_PTE_IS_TABLE(pte[0], lvl)) {
   710			/*
   711			 * Insert a table at the next level to map the old region,
   712			 * minus the part we want to unmap
   713			 */
   714			return arm_v7s_split_blk_unmap(data, gather, iova, size, pte[0],
   715						       ptep);
   716		}
   717	
   718		/* Keep on walkin' */
   719		ptep = iopte_deref(pte[0], lvl, data);
   720		return __arm_v7s_unmap(data, gather, iova, size, lvl + 1, ptep);
   721	}
   722	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30209 bytes --]

[-- Attachment #3: Type: text/plain, Size: 156 bytes --]

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-20  9:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-20  9:02 [iommu:x86/vt-d 41/59] drivers/iommu/io-pgtable-arm-v7s.c:703:43: error: 'struct iommu_iotlb_gather' has no member named 'queued' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox