All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: mhkelley58@gmail.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC 1/1] swiotlb: Reduce calls to swiotlb_find_pool()
Date: Fri, 7 Jun 2024 17:03:15 +0800	[thread overview]
Message-ID: <202406071641.Brak00PZ-lkp@intel.com> (raw)
In-Reply-To: <20240607031421.182589-1-mhklinux@outlook.com>

Hi,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build errors:

[auto build test ERROR on joro-iommu/next]
[also build test ERROR on linus/master v6.10-rc2 next-20240607]
[cannot apply to xen-tip/linux-next]
[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/mhkelley58-gmail-com/swiotlb-Reduce-calls-to-swiotlb_find_pool/20240607-114732
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
patch link:    https://lore.kernel.org/r/20240607031421.182589-1-mhklinux%40outlook.com
patch subject: [RFC 1/1] swiotlb: Reduce calls to swiotlb_find_pool()
config: parisc-allnoconfig (https://download.01.org/0day-ci/archive/20240607/202406071641.Brak00PZ-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240607/202406071641.Brak00PZ-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/202406071641.Brak00PZ-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from kernel/dma/mapping.c:18:
   kernel/dma/direct.h: In function 'dma_direct_sync_single_for_device':
>> kernel/dma/direct.h:64:17: error: implicit declaration of function 'swiotlb_sync_single_for_device'; did you mean 'dma_sync_single_for_device'? [-Werror=implicit-function-declaration]
      64 |                 swiotlb_sync_single_for_device(dev, paddr, size, dir, pool);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                 dma_sync_single_for_device
   kernel/dma/direct.h: In function 'dma_direct_sync_single_for_cpu':
>> kernel/dma/direct.h:83:17: error: implicit declaration of function 'swiotlb_sync_single_for_cpu'; did you mean 'dma_sync_single_for_cpu'? [-Werror=implicit-function-declaration]
      83 |                 swiotlb_sync_single_for_cpu(dev, paddr, size, dir, pool);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                 dma_sync_single_for_cpu
   kernel/dma/direct.h: In function 'dma_direct_map_page':
>> kernel/dma/direct.h:99:24: error: implicit declaration of function 'swiotlb_map'; did you mean 'swiotlb_free'? [-Werror=implicit-function-declaration]
      99 |                 return swiotlb_map(dev, phys, size, dir, attrs);
         |                        ^~~~~~~~~~~
         |                        swiotlb_free
   kernel/dma/direct.h: In function 'dma_direct_unmap_page':
>> kernel/dma/direct.h:131:17: error: implicit declaration of function 'swiotlb_tbl_unmap_single' [-Werror=implicit-function-declaration]
     131 |                 swiotlb_tbl_unmap_single(dev, phys, size, dir,
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +64 kernel/dma/direct.h

    55	
    56	static inline void dma_direct_sync_single_for_device(struct device *dev,
    57			dma_addr_t addr, size_t size, enum dma_data_direction dir)
    58	{
    59		phys_addr_t paddr = dma_to_phys(dev, addr);
    60		struct io_tlb_pool *pool;
    61	
    62		pool = is_swiotlb_buffer(dev, paddr);
    63		if (unlikely(pool))
  > 64			swiotlb_sync_single_for_device(dev, paddr, size, dir, pool);
    65	
    66		if (!dev_is_dma_coherent(dev))
    67			arch_sync_dma_for_device(paddr, size, dir);
    68	}
    69	
    70	static inline void dma_direct_sync_single_for_cpu(struct device *dev,
    71			dma_addr_t addr, size_t size, enum dma_data_direction dir)
    72	{
    73		phys_addr_t paddr = dma_to_phys(dev, addr);
    74		struct io_tlb_pool *pool;
    75	
    76		if (!dev_is_dma_coherent(dev)) {
    77			arch_sync_dma_for_cpu(paddr, size, dir);
    78			arch_sync_dma_for_cpu_all();
    79		}
    80	
    81		pool = is_swiotlb_buffer(dev, paddr);
    82		if (unlikely(pool))
  > 83			swiotlb_sync_single_for_cpu(dev, paddr, size, dir, pool);
    84	
    85		if (dir == DMA_FROM_DEVICE)
    86			arch_dma_mark_clean(paddr, size);
    87	}
    88	
    89	static inline dma_addr_t dma_direct_map_page(struct device *dev,
    90			struct page *page, unsigned long offset, size_t size,
    91			enum dma_data_direction dir, unsigned long attrs)
    92	{
    93		phys_addr_t phys = page_to_phys(page) + offset;
    94		dma_addr_t dma_addr = phys_to_dma(dev, phys);
    95	
    96		if (is_swiotlb_force_bounce(dev)) {
    97			if (is_pci_p2pdma_page(page))
    98				return DMA_MAPPING_ERROR;
  > 99			return swiotlb_map(dev, phys, size, dir, attrs);
   100		}
   101	
   102		if (unlikely(!dma_capable(dev, dma_addr, size, true)) ||
   103		    dma_kmalloc_needs_bounce(dev, size, dir)) {
   104			if (is_pci_p2pdma_page(page))
   105				return DMA_MAPPING_ERROR;
   106			if (is_swiotlb_active(dev))
   107				return swiotlb_map(dev, phys, size, dir, attrs);
   108	
   109			dev_WARN_ONCE(dev, 1,
   110				     "DMA addr %pad+%zu overflow (mask %llx, bus limit %llx).\n",
   111				     &dma_addr, size, *dev->dma_mask, dev->bus_dma_limit);
   112			return DMA_MAPPING_ERROR;
   113		}
   114	
   115		if (!dev_is_dma_coherent(dev) && !(attrs & DMA_ATTR_SKIP_CPU_SYNC))
   116			arch_sync_dma_for_device(phys, size, dir);
   117		return dma_addr;
   118	}
   119	
   120	static inline void dma_direct_unmap_page(struct device *dev, dma_addr_t addr,
   121			size_t size, enum dma_data_direction dir, unsigned long attrs)
   122	{
   123		phys_addr_t phys = dma_to_phys(dev, addr);
   124		struct io_tlb_pool *pool;
   125	
   126		if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC))
   127			dma_direct_sync_single_for_cpu(dev, addr, size, dir);
   128	
   129		pool = is_swiotlb_buffer(dev, phys);
   130		if (unlikely(pool))
 > 131			swiotlb_tbl_unmap_single(dev, phys, size, dir,

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

  parent reply	other threads:[~2024-06-07  9:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-07  3:14 [RFC 1/1] swiotlb: Reduce calls to swiotlb_find_pool() mhkelley58
2024-06-07  8:42 ` kernel test robot
2024-06-07  9:03 ` kernel test robot [this message]
2024-06-07 21:19 ` kernel test robot
2024-06-26 23:58 ` Michael Kelley
2024-06-27  6:02   ` hch
2024-06-27  6:52     ` Petr Tesařík
2024-06-27 14:59       ` Michael Kelley
2024-06-27 15:25         ` hch
2024-06-27 16:02           ` Michael Kelley
2024-06-28  6:01             ` hch
2024-06-28  7:47               ` Petr Tesařík
2024-06-29 15:55                 ` Michael Kelley
2024-06-30  5:55                   ` hch
2024-06-30 14:02                     ` Michael Kelley
2024-07-01  4:36                       ` hch
2024-07-01  5:47                         ` Petr Tesařík
2024-06-27  7:20 ` Petr Tesařík
2024-06-27 15:04   ` Michael Kelley
2024-06-29 15:53     ` Michael Kelley

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=202406071641.Brak00PZ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=mhkelley58@gmail.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.