lkml.org 
[lkml]   [2021]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] mm: page_alloc: Add debug log in free_reserved_area for static memory
Hi Faiyaz,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v5.15-rc5]
[cannot apply to hnaz-mm/master next-20211013]
[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/Faiyaz-Mohammed/mm-page_alloc-Add-debug-log-in-free_reserved_area-for-static-memory/20211014-151427
base: 64570fbc14f8d7cb3fe3995f20e26bc25ce4b2cc
config: nios2-defconfig (attached as .config)
compiler: nios2-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://github.com/0day-ci/linux/commit/009729e4f858e64537a4a144369b155f8d69d62f
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Faiyaz-Mohammed/mm-page_alloc-Add-debug-log-in-free_reserved_area-for-static-memory/20211014-151427
git checkout 009729e4f858e64537a4a144369b155f8d69d62f
# 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=nios2 SHELL=/bin/bash

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 >>):

mm/page_alloc.c:3810:15: warning: no previous prototype for 'should_fail_alloc_page' [-Wmissing-prototypes]
3810 | noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/asm-generic/bug.h:22,
from ./arch/nios2/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from mm/page_alloc.c:19:
mm/page_alloc.c: In function 'free_reserved_area':
>> mm/page_alloc.c:8134:33: error: '__RET_IP_' undeclared (first use in this function)
8134 | (void *)__RET_IP_);
| ^~~~~~~~~
include/linux/printk.h:418:33: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/printk.h:132:17: note: in expansion of macro 'printk'
132 | printk(fmt, ##__VA_ARGS__); \
| ^~~~~~
include/linux/printk.h:576:9: note: in expansion of macro 'no_printk'
576 | no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~
mm/page_alloc.c:8133:17: note: in expansion of macro 'pr_debug'
8133 | pr_debug("[%pa-%pa] %pS\n", &pstart, &pend,
| ^~~~~~~~
mm/page_alloc.c:8134:33: note: each undeclared identifier is reported only once for each function it appears in
8134 | (void *)__RET_IP_);
| ^~~~~~~~~
include/linux/printk.h:418:33: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/printk.h:132:17: note: in expansion of macro 'printk'
132 | printk(fmt, ##__VA_ARGS__); \
| ^~~~~~
include/linux/printk.h:576:9: note: in expansion of macro 'no_printk'
576 | no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~
mm/page_alloc.c:8133:17: note: in expansion of macro 'pr_debug'
8133 | pr_debug("[%pa-%pa] %pS\n", &pstart, &pend,
| ^~~~~~~~


vim +/__RET_IP_ +8134 mm/page_alloc.c

8097
8098 unsigned long free_reserved_area(void *start, void *end, int poison, const char *s)
8099 {
8100 const phys_addr_t pstart = __pa(start);
8101 const phys_addr_t pend = __pa(end);
8102 void *pos;
8103 unsigned long pages = 0;
8104
8105 start = (void *)PAGE_ALIGN((unsigned long)start);
8106 end = (void *)((unsigned long)end & PAGE_MASK);
8107 for (pos = start; pos < end; pos += PAGE_SIZE, pages++) {
8108 struct page *page = virt_to_page(pos);
8109 void *direct_map_addr;
8110
8111 /*
8112 * 'direct_map_addr' might be different from 'pos'
8113 * because some architectures' virt_to_page()
8114 * work with aliases. Getting the direct map
8115 * address ensures that we get a _writeable_
8116 * alias for the memset().
8117 */
8118 direct_map_addr = page_address(page);
8119 /*
8120 * Perform a kasan-unchecked memset() since this memory
8121 * has not been initialized.
8122 */
8123 direct_map_addr = kasan_reset_tag(direct_map_addr);
8124 if ((unsigned int)poison <= 0xFF)
8125 memset(direct_map_addr, poison, PAGE_SIZE);
8126
8127 free_reserved_page(page);
8128 }
8129
8130 if (pages && s) {
8131 pr_info("Freeing %s memory: %ldK\n",
8132 s, pages << (PAGE_SHIFT - 10));
8133 pr_debug("[%pa-%pa] %pS\n", &pstart, &pend,
> 8134 (void *)__RET_IP_);
8135 }
8136
8137 return pages;
8138 }
8139

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-10-14 14:24    [W:0.131 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site