[PATCH v2] mm: introduce reference pages

kernel test robot lkp at intel.com
Thu Aug 13 21:00:14 EDT 2020


Hi Peter,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to mmotm/master hnaz-linux-mm/master arm64/for-next/core tip/x86/asm v5.8 next-20200813]
[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]

url:    https://github.com/0day-ci/linux/commits/Peter-Collingbourne/mm-introduce-reference-pages/20200814-061235
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git dddcbc139e96bd18d8c65ef7b7e440f0d32457c2
config: m68k-randconfig-r035-20200813 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

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

All errors (new ones prefixed by >>):

   In file included from arch/m68k/include/asm/page.h:60,
                    from arch/m68k/include/asm/thread_info.h:6,
                    from include/linux/thread_info.h:38,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/m68k/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 drivers/char/mem.c:12:
   include/linux/pgtable.h: In function 'is_zero_or_refpage_pfn':
>> arch/m68k/include/asm/page_mm.h:165:23: error: implicit declaration of function 'page_to_nid'; did you mean 'zone_to_nid'? [-Werror=implicit-function-declaration]
     165 |  pgdat = &pg_data_map[page_to_nid(__p)];    \
         |                       ^~~~~~~~~~~
   include/linux/pgtable.h:1063:17: note: in expansion of macro 'page_to_pfn'
    1063 |   return pfn == page_to_pfn((struct page *)vma->vm_private_data);
         |                 ^~~~~~~~~~~
   In file included from drivers/char/mem.c:12:
   include/linux/mm.h: At top level:
   include/linux/mm.h:1283:19: error: static declaration of 'page_to_nid' follows non-static declaration
    1283 | static inline int page_to_nid(const struct page *page)
         |                   ^~~~~~~~~~~
   In file included from arch/m68k/include/asm/page.h:60,
                    from arch/m68k/include/asm/thread_info.h:6,
                    from include/linux/thread_info.h:38,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/m68k/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 drivers/char/mem.c:12:
   arch/m68k/include/asm/page_mm.h:165:23: note: previous implicit declaration of 'page_to_nid' was here
     165 |  pgdat = &pg_data_map[page_to_nid(__p)];    \
         |                       ^~~~~~~~~~~
   include/linux/pgtable.h:1063:17: note: in expansion of macro 'page_to_pfn'
    1063 |   return pfn == page_to_pfn((struct page *)vma->vm_private_data);
         |                 ^~~~~~~~~~~
   In file included from include/asm-generic/bug.h:5,
                    from arch/m68k/include/asm/bug.h:32,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/mm.h:9,
                    from drivers/char/mem.c:12:
   include/linux/scatterlist.h: In function 'sg_set_buf':
   arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
     169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
         |                                                 ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |  ^~~~~~
   include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |          ^~~~~~~~~~~~~~~
   In file included from arch/m68k/include/asm/page.h:60,
                    from arch/m68k/include/asm/thread_info.h:6,
                    from include/linux/thread_info.h:38,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/m68k/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 drivers/char/mem.c:12:
   drivers/char/mem.c: In function 'mmap_kmem':
   arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
     169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
         |                                                 ^~
   arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
     170 | #define pfn_valid(pfn)  virt_addr_valid(pfn_to_virt(pfn))
         |                         ^~~~~~~~~~~~~~~
   drivers/char/mem.c:430:7: note: in expansion of macro 'pfn_valid'
     430 |  if (!pfn_valid(pfn))
         |       ^~~~~~~~~
   drivers/char/mem.c: In function 'read_kmem':
   arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
     169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
         |                                                 ^~
   drivers/char/mem.c:476:9: note: in expansion of macro 'virt_addr_valid'
     476 |    if (!virt_addr_valid(kbuf))
         |         ^~~~~~~~~~~~~~~
   drivers/char/mem.c: In function 'do_write_kmem':
   arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
     169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
         |                                                 ^~
   drivers/char/mem.c:554:8: note: in expansion of macro 'virt_addr_valid'
     554 |   if (!virt_addr_valid(ptr))
         |        ^~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   In file included from arch/m68k/include/asm/page.h:60,
                    from arch/m68k/include/asm/thread_info.h:6,
                    from include/linux/thread_info.h:38,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/m68k/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from arch/m68k/include/asm/irqflags.h:6,
                    from include/linux/irqflags.h:16,
                    from arch/m68k/include/asm/atomic.h:6,
                    from include/linux/atomic.h:7,
                    from include/linux/rcupdate.h:25,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/utsname.h:6,
                    from drivers/char/random.c:312:
   include/linux/pgtable.h: In function 'is_zero_or_refpage_pfn':
>> arch/m68k/include/asm/page_mm.h:165:23: error: implicit declaration of function 'page_to_nid'; did you mean 'zone_to_nid'? [-Werror=implicit-function-declaration]
     165 |  pgdat = &pg_data_map[page_to_nid(__p)];    \
         |                       ^~~~~~~~~~~
   include/linux/pgtable.h:1063:17: note: in expansion of macro 'page_to_pfn'
    1063 |   return pfn == page_to_pfn((struct page *)vma->vm_private_data);
         |                 ^~~~~~~~~~~
   In file included from include/linux/bvec.h:13,
                    from include/linux/blk_types.h:10,
                    from include/linux/genhd.h:19,
                    from drivers/char/random.c:323:
   include/linux/mm.h: At top level:
   include/linux/mm.h:1283:19: error: static declaration of 'page_to_nid' follows non-static declaration
    1283 | static inline int page_to_nid(const struct page *page)
         |                   ^~~~~~~~~~~
   In file included from arch/m68k/include/asm/page.h:60,
                    from arch/m68k/include/asm/thread_info.h:6,
                    from include/linux/thread_info.h:38,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/m68k/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from arch/m68k/include/asm/irqflags.h:6,
                    from include/linux/irqflags.h:16,
                    from arch/m68k/include/asm/atomic.h:6,
                    from include/linux/atomic.h:7,
                    from include/linux/rcupdate.h:25,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/utsname.h:6,
                    from drivers/char/random.c:312:
   arch/m68k/include/asm/page_mm.h:165:23: note: previous implicit declaration of 'page_to_nid' was here
     165 |  pgdat = &pg_data_map[page_to_nid(__p)];    \
         |                       ^~~~~~~~~~~
   include/linux/pgtable.h:1063:17: note: in expansion of macro 'page_to_pfn'
    1063 |   return pfn == page_to_pfn((struct page *)vma->vm_private_data);
         |                 ^~~~~~~~~~~
   In file included from include/linux/kernel.h:11,
                    from include/linux/list.h:9,
                    from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/utsname.h:6,
                    from drivers/char/random.c:312:
   include/linux/scatterlist.h: In function 'sg_set_buf':
   arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
     169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
         |                                                 ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |  ^~~~~~
   include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |          ^~~~~~~~~~~~~~~
   drivers/char/random.c: At top level:
   drivers/char/random.c:2297:6: warning: no previous prototype for 'add_hwgenerator_randomness' [-Wmissing-prototypes]
    2297 | void add_hwgenerator_randomness(const char *buffer, size_t count,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   In file included from arch/m68k/include/asm/page.h:60,
                    from arch/m68k/include/asm/thread_info.h:6,
                    from include/linux/thread_info.h:38,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/m68k/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/wait.h:9,
                    from include/linux/poll.h:8,
                    from drivers/char/tpm/tpm-chip.c:18:
   include/linux/pgtable.h: In function 'is_zero_or_refpage_pfn':
>> arch/m68k/include/asm/page_mm.h:165:23: error: implicit declaration of function 'page_to_nid'; did you mean 'zone_to_nid'? [-Werror=implicit-function-declaration]
     165 |  pgdat = &pg_data_map[page_to_nid(__p)];    \
         |                       ^~~~~~~~~~~
   include/linux/pgtable.h:1063:17: note: in expansion of macro 'page_to_pfn'
    1063 |   return pfn == page_to_pfn((struct page *)vma->vm_private_data);
         |                 ^~~~~~~~~~~
   In file included from include/linux/highmem.h:8,
                    from include/linux/tpm.h:24,
                    from include/linux/tpm_eventlog.h:6,
                    from drivers/char/tpm/tpm-chip.c:24:
   include/linux/mm.h: At top level:
   include/linux/mm.h:1283:19: error: static declaration of 'page_to_nid' follows non-static declaration
    1283 | static inline int page_to_nid(const struct page *page)
         |                   ^~~~~~~~~~~
   In file included from arch/m68k/include/asm/page.h:60,
                    from arch/m68k/include/asm/thread_info.h:6,
                    from include/linux/thread_info.h:38,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/m68k/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/wait.h:9,
                    from include/linux/poll.h:8,
                    from drivers/char/tpm/tpm-chip.c:18:
   arch/m68k/include/asm/page_mm.h:165:23: note: previous implicit declaration of 'page_to_nid' was here
     165 |  pgdat = &pg_data_map[page_to_nid(__p)];    \
         |                       ^~~~~~~~~~~
   include/linux/pgtable.h:1063:17: note: in expansion of macro 'page_to_pfn'
    1063 |   return pfn == page_to_pfn((struct page *)vma->vm_private_data);
         |                 ^~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   In file included from arch/m68k/include/asm/page.h:60,
                    from arch/m68k/include/asm/thread_info.h:6,
                    from include/linux/thread_info.h:38,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/m68k/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/wait.h:9,
                    from include/linux/poll.h:8,
                    from drivers/char/tpm/tpm-interface.c:22:
   include/linux/pgtable.h: In function 'is_zero_or_refpage_pfn':
>> arch/m68k/include/asm/page_mm.h:165:23: error: implicit declaration of function 'page_to_nid'; did you mean 'zone_to_nid'? [-Werror=implicit-function-declaration]
     165 |  pgdat = &pg_data_map[page_to_nid(__p)];    \
         |                       ^~~~~~~~~~~
   include/linux/pgtable.h:1063:17: note: in expansion of macro 'page_to_pfn'
    1063 |   return pfn == page_to_pfn((struct page *)vma->vm_private_data);
         |                 ^~~~~~~~~~~
   In file included from include/linux/kallsyms.h:12,
                    from include/linux/bpf.h:21,
                    from include/linux/bpf-cgroup.h:5,
                    from include/linux/cgroup-defs.h:22,
                    from include/linux/cgroup.h:28,
                    from include/linux/memcontrol.h:13,
                    from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from drivers/char/tpm/tpm-interface.c:26:
   include/linux/mm.h: At top level:
   include/linux/mm.h:1283:19: error: static declaration of 'page_to_nid' follows non-static declaration
    1283 | static inline int page_to_nid(const struct page *page)
         |                   ^~~~~~~~~~~
   In file included from arch/m68k/include/asm/page.h:60,
                    from arch/m68k/include/asm/thread_info.h:6,
                    from include/linux/thread_info.h:38,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/m68k/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/wait.h:9,
                    from include/linux/poll.h:8,
                    from drivers/char/tpm/tpm-interface.c:22:
   arch/m68k/include/asm/page_mm.h:165:23: note: previous implicit declaration of 'page_to_nid' was here
     165 |  pgdat = &pg_data_map[page_to_nid(__p)];    \
         |                       ^~~~~~~~~~~
   include/linux/pgtable.h:1063:17: note: in expansion of macro 'page_to_pfn'
    1063 |   return pfn == page_to_pfn((struct page *)vma->vm_private_data);
         |                 ^~~~~~~~~~~
   In file included from include/linux/poll.h:6,
                    from drivers/char/tpm/tpm-interface.c:22:
   include/linux/scatterlist.h: In function 'sg_set_buf':
   arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
     169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
         |                                                 ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |  ^~~~~~
   include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |          ^~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   In file included from arch/m68k/include/asm/page.h:60,
                    from arch/m68k/include/asm/thread_info.h:6,
                    from include/linux/thread_info.h:38,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/m68k/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/umh.h:4,
                    from include/linux/kmod.h:9,
                    from include/linux/module.h:16,
                    from drivers/char/tpm/st33zp24/i2c.c:7:
   include/linux/pgtable.h: In function 'is_zero_or_refpage_pfn':
>> arch/m68k/include/asm/page_mm.h:165:23: error: implicit declaration of function 'page_to_nid'; did you mean 'zone_to_nid'? [-Werror=implicit-function-declaration]
     165 |  pgdat = &pg_data_map[page_to_nid(__p)];    \
         |                       ^~~~~~~~~~~
   include/linux/pgtable.h:1063:17: note: in expansion of macro 'page_to_pfn'
    1063 |   return pfn == page_to_pfn((struct page *)vma->vm_private_data);
         |                 ^~~~~~~~~~~
   In file included from include/linux/highmem.h:8,
                    from include/linux/tpm.h:24,
                    from drivers/char/tpm/st33zp24/i2c.c:14:
   include/linux/mm.h: At top level:
   include/linux/mm.h:1283:19: error: static declaration of 'page_to_nid' follows non-static declaration
    1283 | static inline int page_to_nid(const struct page *page)
         |                   ^~~~~~~~~~~
   In file included from arch/m68k/include/asm/page.h:60,
                    from arch/m68k/include/asm/thread_info.h:6,
                    from include/linux/thread_info.h:38,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/m68k/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/umh.h:4,
                    from include/linux/kmod.h:9,
                    from include/linux/module.h:16,
                    from drivers/char/tpm/st33zp24/i2c.c:7:
   arch/m68k/include/asm/page_mm.h:165:23: note: previous implicit declaration of 'page_to_nid' was here
     165 |  pgdat = &pg_data_map[page_to_nid(__p)];    \
         |                       ^~~~~~~~~~~
   include/linux/pgtable.h:1063:17: note: in expansion of macro 'page_to_pfn'
    1063 |   return pfn == page_to_pfn((struct page *)vma->vm_private_data);
         |                 ^~~~~~~~~~~
   drivers/char/tpm/st33zp24/i2c.c:291:36: warning: 'st33zp24_i2c_acpi_match' defined but not used [-Wunused-const-variable=]
     291 | static const struct acpi_device_id st33zp24_i2c_acpi_match[] = {
         |                                    ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/char/tpm/st33zp24/i2c.c:285:34: warning: 'of_st33zp24_i2c_match' defined but not used [-Wunused-const-variable=]
     285 | static const struct of_device_id of_st33zp24_i2c_match[] = {
         |                                  ^~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +165 arch/m68k/include/asm/page_mm.h

12d810c1b8c2b91 include/asm-m68k/page.h         Roman Zippel   2007-05-31  155  
12d810c1b8c2b91 include/asm-m68k/page.h         Roman Zippel   2007-05-31  156  #define pfn_to_page(pfn) ({						\
12d810c1b8c2b91 include/asm-m68k/page.h         Roman Zippel   2007-05-31  157  	unsigned long __pfn = (pfn);					\
12d810c1b8c2b91 include/asm-m68k/page.h         Roman Zippel   2007-05-31  158  	struct pglist_data *pgdat;					\
12d810c1b8c2b91 include/asm-m68k/page.h         Roman Zippel   2007-05-31  159  	pgdat = __virt_to_node((unsigned long)pfn_to_virt(__pfn));	\
12d810c1b8c2b91 include/asm-m68k/page.h         Roman Zippel   2007-05-31  160  	pgdat->node_mem_map + (__pfn - pgdat->node_start_pfn);		\
12d810c1b8c2b91 include/asm-m68k/page.h         Roman Zippel   2007-05-31  161  })
12d810c1b8c2b91 include/asm-m68k/page.h         Roman Zippel   2007-05-31  162  #define page_to_pfn(_page) ({						\
ba8f318471f66d5 arch/m68k/include/asm/page_mm.h Ian Campbell   2011-08-18  163  	const struct page *__p = (_page);				\
12d810c1b8c2b91 include/asm-m68k/page.h         Roman Zippel   2007-05-31  164  	struct pglist_data *pgdat;					\
12d810c1b8c2b91 include/asm-m68k/page.h         Roman Zippel   2007-05-31 @165  	pgdat = &pg_data_map[page_to_nid(__p)];				\
12d810c1b8c2b91 include/asm-m68k/page.h         Roman Zippel   2007-05-31  166  	((__p) - pgdat->node_mem_map) + pgdat->node_start_pfn;		\
12d810c1b8c2b91 include/asm-m68k/page.h         Roman Zippel   2007-05-31  167  })
^1da177e4c3f415 include/asm-m68k/page.h         Linus Torvalds 2005-04-16  168  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 22167 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20200814/3cef3d75/attachment-0001.gz>


More information about the linux-arm-kernel mailing list