tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: d2901c3f0ff7d121adf97d64bd2cc3789821600d commit: 9b6c51cd780588813c5d327e2a6d677d010a2b6f [19126/22626] mm: fix zoneref mapping problem in memory reliable config: arm64-randconfig-r122-20240531 (https://download.01.org/0day-ci/archive/20240531/202405312200.hITrtAoH-lkp@i...) compiler: aarch64-linux-gcc (GCC) 13.2.0 reproduce: (https://download.01.org/0day-ci/archive/20240531/202405312200.hITrtAoH-lkp@i...)
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/202405312200.hITrtAoH-lkp@intel.com/
sparse warnings: (new ones prefixed by >>) mm/page_alloc.c:140:1: sparse: sparse: symbol 'pcpu_drain_mutex' was not declared. Should it be static? mm/page_alloc.c:141:1: sparse: sparse: symbol '__pcpu_scope_pcpu_drain' was not declared. Should it be static? mm/page_alloc.c: note: in included file (through include/linux/mm.h): include/linux/mem_reliable.h:68:15: sparse: sparse: restricted gfp_t degrades to integer mm/page_alloc.c:4656:13: sparse: sparse: restricted gfp_t degrades to integer mm/page_alloc.c:4661:35: sparse: sparse: invalid assignment: |= mm/page_alloc.c:4661:35: sparse: left side has type restricted gfp_t mm/page_alloc.c:4661:35: sparse: right side has type unsigned int mm/page_alloc.c:4677:35: sparse: sparse: invalid assignment: |= mm/page_alloc.c:4677:35: sparse: left side has type restricted gfp_t mm/page_alloc.c:4677:35: sparse: right side has type unsigned int mm/page_alloc.c:4683:35: sparse: sparse: invalid assignment: |= mm/page_alloc.c:4683:35: sparse: left side has type restricted gfp_t mm/page_alloc.c:4683:35: sparse: right side has type unsigned int mm/page_alloc.c:4698:35: sparse: sparse: invalid assignment: |= mm/page_alloc.c:4698:35: sparse: left side has type restricted gfp_t mm/page_alloc.c:4698:35: sparse: right side has type unsigned int mm/page_alloc.c: note: in included file (through include/linux/mm.h): include/linux/gfp.h:457:34: sparse: sparse: restricted gfp_t degrades to integer include/linux/gfp.h:324:27: sparse: sparse: restricted gfp_t degrades to integer mm/page_alloc.c:3683:14: sparse: sparse: restricted gfp_t degrades to integer mm/page_alloc.c:3684:45: sparse: sparse: restricted gfp_t degrades to integer
mm/page_alloc.c:3684:54: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted gfp_t [usertype] flags @@ got unsigned int @@
mm/page_alloc.c:3684:54: sparse: expected restricted gfp_t [usertype] flags mm/page_alloc.c:3684:54: sparse: got unsigned int include/linux/gfp.h:457:34: sparse: sparse: restricted gfp_t degrades to integer mm/page_alloc.c:3701:14: sparse: sparse: restricted gfp_t degrades to integer include/linux/gfp.h:457:34: sparse: sparse: restricted gfp_t degrades to integer include/linux/gfp.h:457:34: sparse: sparse: restricted gfp_t degrades to integer mm/page_alloc.c:1489:6: warning: no previous prototype for 'set_zone_contiguous' [-Wmissing-prototypes] 1489 | void set_zone_contiguous(struct zone *zone) | ^~~~~~~~~~~~~~~~~~~ mm/page_alloc.c:1511:6: warning: no previous prototype for 'clear_zone_contiguous' [-Wmissing-prototypes] 1511 | void clear_zone_contiguous(struct zone *zone) | ^~~~~~~~~~~~~~~~~~~~~ In file included from mm/page_alloc.c:70: mm/page_alloc.c: In function 'deferred_init_memmap': include/linux/ktask.h:123:35: warning: cast between incompatible function types from 'int (*)(long unsigned int, long unsigned int, struct deferred_args *)' to 'int (*)(void *, void *, void *)' [-Wcast-function-type] 123 | .kc_thread_func = (ktask_thread_func)(thread_func), 44- | ^ include/linux/ktask.h:139:17: note: in expansion of macro 'KTASK_CTL_INITIALIZER' 139 | KTASK_CTL_INITIALIZER(thread_func, func_arg, min_chunk_size) 47- | ^~~~~~~~~~~~~~~~~~~~~ mm/page_alloc.c:1730:17: note: in expansion of macro 'DEFINE_KTASK_CTL' 1730 | DEFINE_KTASK_CTL(ctl, deferred_init_chunk, &args, | ^~~~~~~~~~~~~~~~ include/linux/ktask.h:123:35: warning: cast between incompatible function types from 'int (*)(long unsigned int, long unsigned int, struct deferred_args *)' to 'int (*)(void *, void *, void *)' [-Wcast-function-type] 123 | .kc_thread_func = (ktask_thread_func)(thread_func), 53- | ^ include/linux/ktask.h:139:17: note: in expansion of macro 'KTASK_CTL_INITIALIZER' 139 | KTASK_CTL_INITIALIZER(thread_func, func_arg, min_chunk_size) 56- | ^~~~~~~~~~~~~~~~~~~~~ mm/page_alloc.c:1746:17: note: in expansion of macro 'DEFINE_KTASK_CTL' 1746 | DEFINE_KTASK_CTL(ctl, deferred_free_chunk, &args, | ^~~~~~~~~~~~~~~~ mm/page_alloc.c: In function 'mem_init_print_info': mm/page_alloc.c:7512:27: warning: comparison between two arrays [-Warray-compare] 7512 | if (start <= pos && pos < end && size > adj) 63- | ^~ mm/page_alloc.c:7516:9: note: in expansion of macro 'adj_init_size' 7516 | adj_init_size(__init_begin, __init_end, init_data_size, | ^~~~~~~~~~~~~ mm/page_alloc.c:7512:27: note: use '&__init_begin[0] <= &_sinittext[0]' to compare the addresses 7512 | if (start <= pos && pos < end && size > adj) 69- | ^~ mm/page_alloc.c:7516:9: note: in expansion of macro 'adj_init_size' 7516 | adj_init_size(__init_begin, __init_end, init_data_size, | ^~~~~~~~~~~~~ mm/page_alloc.c:7512:41: warning: comparison between two arrays [-Warray-compare] 7512 | if (start <= pos && pos < end && size > adj) 75- | ^ mm/page_alloc.c:7516:9: note: in expansion of macro 'adj_init_size' 7516 | adj_init_size(__init_begin, __init_end, init_data_size, | ^~~~~~~~~~~~~ mm/page_alloc.c:7512:41: note: use '&_sinittext[0] < &__init_end[0]' to compare the addresses 7512 | if (start <= pos && pos < end && size > adj) 81- | ^ mm/page_alloc.c:7516:9: note: in expansion of macro 'adj_init_size' 7516 | adj_init_size(__init_begin, __init_end, init_data_size, | ^~~~~~~~~~~~~ mm/page_alloc.c:7512:27: warning: comparison between two arrays [-Warray-compare] 7512 | if (start <= pos && pos < end && size > adj) 87- | ^~ mm/page_alloc.c:7518:9: note: in expansion of macro 'adj_init_size' 7518 | adj_init_size(_stext, _etext, codesize, _sinittext, init_code_size); | ^~~~~~~~~~~~~ mm/page_alloc.c:7512:27: note: use '&_stext[0] <= &_sinittext[0]' to compare the addresses 7512 | if (start <= pos && pos < end && size > adj) 93- | ^~ mm/page_alloc.c:7518:9: note: in expansion of macro 'adj_init_size' 7518 | adj_init_size(_stext, _etext, codesize, _sinittext, init_code_size); | ^~~~~~~~~~~~~ mm/page_alloc.c:7512:41: warning: comparison between two arrays [-Warray-compare] 7512 | if (start <= pos && pos < end && size > adj) 99- | ^ mm/page_alloc.c:7518:9: note: in expansion of macro 'adj_init_size' 7518 | adj_init_size(_stext, _etext, codesize, _sinittext, init_code_size); | ^~~~~~~~~~~~~ mm/page_alloc.c:7512:41: note: use '&_sinittext[0] < &_etext[0]' to compare the addresses 7512 | if (start <= pos && pos < end && size > adj) 105- | ^ mm/page_alloc.c:7518:9: note: in expansion of macro 'adj_init_size' 7518 | adj_init_size(_stext, _etext, codesize, _sinittext, init_code_size); | ^~~~~~~~~~~~~ mm/page_alloc.c:7512:27: warning: comparison between two arrays [-Warray-compare] 7512 | if (start <= pos && pos < end && size > adj) 111- | ^~ mm/page_alloc.c:7519:9: note: in expansion of macro 'adj_init_size' 7519 | adj_init_size(_sdata, _edata, datasize, __init_begin, init_data_size); | ^~~~~~~~~~~~~ mm/page_alloc.c:7512:27: note: use '&_sdata[0] <= &__init_begin[0]' to compare the addresses 7512 | if (start <= pos && pos < end && size > adj) 117- | ^~ mm/page_alloc.c:7519:9: note: in expansion of macro 'adj_init_size' 7519 | adj_init_size(_sdata, _edata, datasize, __init_begin, init_data_size); | ^~~~~~~~~~~~~ mm/page_alloc.c:7512:41: warning: comparison between two arrays [-Warray-compare] 7512 | if (start <= pos && pos < end && size > adj) 123- | ^ mm/page_alloc.c:7519:9: note: in expansion of macro 'adj_init_size' 7519 | adj_init_size(_sdata, _edata, datasize, __init_begin, init_data_size); | ^~~~~~~~~~~~~ mm/page_alloc.c:7512:41: note: use '&__init_begin[0] < &_edata[0]' to compare the addresses
vim +3684 mm/page_alloc.c
3673 3674 #ifdef CONFIG_MEMORY_RELIABLE 3675 static inline void reliable_fb_find_zone(gfp_t gfp_mask, 3676 struct alloc_context *ac) 3677 { 3678 if (!reliable_allow_fb_enabled()) 3679 return; 3680 3681 /* dst node don't have zone we want, fallback here */ 3682 if ((gfp_mask & __GFP_THISNODE) && (ac->high_zoneidx == ZONE_NORMAL) && 3683 (gfp_mask & ___GFP_RELIABILITY)) {
3684 ac->high_zoneidx = gfp_zone(gfp_mask & ~___GFP_RELIABILITY);
3685 ac->preferred_zoneref = first_zones_zonelist( 3686 ac->zonelist, ac->high_zoneidx, ac->nodemask); 3687 } 3688 3689 return; 3690 } 3691