All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 9813/10267] kernel//dma/direct.c:49:21: error: implicit declaration of function '__phys_to_pfn'; did you mean '__phys_to_dma'?
@ 2019-11-11  5:16 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-11-11  5:16 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   5591cf003452dc3cb5047dc774151ff36c8d9cf7
commit: 5960b46969c37d594abe79d9c67a1f0df6e49822 [9813/10267] dma-direct: provide mmap and get_sgtable method overrides
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 5960b46969c37d594abe79d9c67a1f0df6e49822
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=ia64 

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

All errors (new ones prefixed by >>):

   In file included from arch/ia64/include/asm/ptrace.h:46:0,
                    from arch/ia64/include/asm/processor.h:20,
                    from arch/ia64/include/asm/thread_info.h:12,
                    from include/linux/thread_info.h:38,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/ia64/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/mm.h:10,
                    from include/linux/memblock.h:13,
                    from kernel//dma/direct.c:7:
   kernel//dma/direct.c: In function 'dma_direct_to_page':
>> kernel//dma/direct.c:49:21: error: implicit declaration of function '__phys_to_pfn'; did you mean '__phys_to_dma'? [-Werror=implicit-function-declaration]
     return pfn_to_page(__phys_to_pfn(dma_to_phys(dev, dma_addr)));
                        ^
   arch/ia64/include/asm/page.h:108:40: note: in definition of macro 'pfn_to_page'
    # define pfn_to_page(pfn) (vmem_map + (pfn))
                                           ^~~
   cc1: some warnings being treated as errors

vim +49 kernel//dma/direct.c

   > 7	#include <linux/memblock.h> /* for max_pfn */
     8	#include <linux/export.h>
     9	#include <linux/mm.h>
    10	#include <linux/dma-direct.h>
    11	#include <linux/scatterlist.h>
    12	#include <linux/dma-contiguous.h>
    13	#include <linux/dma-noncoherent.h>
    14	#include <linux/pfn.h>
    15	#include <linux/set_memory.h>
    16	#include <linux/swiotlb.h>
    17	
    18	/*
    19	 * Most architectures use ZONE_DMA for the first 16 Megabytes, but
    20	 * some use it for entirely different regions:
    21	 */
    22	#ifndef ARCH_ZONE_DMA_BITS
    23	#define ARCH_ZONE_DMA_BITS 24
    24	#endif
    25	
    26	static void report_addr(struct device *dev, dma_addr_t dma_addr, size_t size)
    27	{
    28		if (!dev->dma_mask) {
    29			dev_err_once(dev, "DMA map on device without dma_mask\n");
    30		} else if (*dev->dma_mask >= DMA_BIT_MASK(32) || dev->bus_dma_mask) {
    31			dev_err_once(dev,
    32				"overflow %pad+%zu of DMA mask %llx bus mask %llx\n",
    33				&dma_addr, size, *dev->dma_mask, dev->bus_dma_mask);
    34		}
    35		WARN_ON_ONCE(1);
    36	}
    37	
    38	static inline dma_addr_t phys_to_dma_direct(struct device *dev,
    39			phys_addr_t phys)
    40	{
    41		if (force_dma_unencrypted(dev))
    42			return __phys_to_dma(dev, phys);
    43		return phys_to_dma(dev, phys);
    44	}
    45	
    46	static inline struct page *dma_direct_to_page(struct device *dev,
    47			dma_addr_t dma_addr)
    48	{
  > 49		return pfn_to_page(__phys_to_pfn(dma_to_phys(dev, dma_addr)));
    50	}
    51	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

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

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

only message in thread, other threads:[~2019-11-11  5:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11  5:16 [linux-next:master 9813/10267] kernel//dma/direct.c:49:21: error: implicit declaration of function '__phys_to_pfn'; did you mean '__phys_to_dma'? kbuild test robot

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.