Message ID | 154998295338.8783.14384429687417240826.stgit@firesoul (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fix page_pool API and dma address storage | expand |
Hi Jesper, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Jesper-Dangaard-Brouer/mm-add-dma_addr_t-to-struct-page/20190213-002150 config: ia64-allyesconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 8.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree GCC_VERSION=8.2.0 make.cross ARCH=ia64 All errors (new ones prefixed by >>): net/core/page_pool.c: In function '__page_pool_clean_page': >> net/core/page_pool.c:187:2: error: implicit declaration of function 'dma_unmap_page_attr'; did you mean 'dma_unmap_page_attrs'? [-Werror=implicit-function-declaration] dma_unmap_page_attr(pool->p.dev, dma, ^~~~~~~~~~~~~~~~~~~ dma_unmap_page_attrs cc1: some warnings being treated as errors vim +187 net/core/page_pool.c 175 176 /* Cleanup page_pool state from page */ 177 static void __page_pool_clean_page(struct page_pool *pool, 178 struct page *page) 179 { 180 dma_addr_t dma; 181 182 if (!(pool->p.flags & PP_FLAG_DMA_MAP)) 183 return; 184 185 dma = page->dma_addr; 186 /* DMA unmap */ > 187 dma_unmap_page_attr(pool->p.dev, dma, 188 PAGE_SIZE << pool->p.order, pool->p.dma_dir, 189 DMA_ATTR_SKIP_CPU_SYNC); 190 page->dma_addr = 0; 191 } 192 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
On Wed, 13 Feb 2019 01:12:59 +0800 kbuild test robot <lkp@intel.com> wrote: > net/core/page_pool.c: In function '__page_pool_clean_page': > >> net/core/page_pool.c:187:2: error: implicit declaration of function 'dma_unmap_page_attr'; did you mean 'dma_unmap_page_attrs'? [-Werror=implicit-function-declaration] > dma_unmap_page_attr(pool->p.dev, dma, > ^~~~~~~~~~~~~~~~~~~ > dma_unmap_page_attrs > cc1: some warnings being treated as errors Ups, in my compile test I didn't have CONFIG_PAGE_POOL defined. Will respin a V3.
diff --git a/net/core/page_pool.c b/net/core/page_pool.c index 897a69a1477e..7e624c2cd709 100644 --- a/net/core/page_pool.c +++ b/net/core/page_pool.c @@ -141,9 +141,9 @@ static struct page *__page_pool_alloc_pages_slow(struct page_pool *pool, * into page private data (i.e 32bit cpu with 64bit DMA caps) * This mapping is kept for lifetime of page, until leaving pool. */ - dma = dma_map_page(pool->p.dev, page, 0, - (PAGE_SIZE << pool->p.order), - pool->p.dma_dir); + dma = dma_map_page_attrs(pool->p.dev, page, 0, + (PAGE_SIZE << pool->p.order), + pool->p.dma_dir, DMA_ATTR_SKIP_CPU_SYNC); if (dma_mapping_error(pool->p.dev, dma)) { put_page(page); return NULL; @@ -184,8 +184,9 @@ static void __page_pool_clean_page(struct page_pool *pool, dma = page->dma_addr; /* DMA unmap */ - dma_unmap_page(pool->p.dev, dma, - PAGE_SIZE << pool->p.order, pool->p.dma_dir); + dma_unmap_page_attr(pool->p.dev, dma, + PAGE_SIZE << pool->p.order, pool->p.dma_dir, + DMA_ATTR_SKIP_CPU_SYNC); page->dma_addr = 0; }