All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Baoquan He <bhe@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH 1/7] mm/mm_init.c: remove the useless dma_reserve
Date: Tue, 26 Mar 2024 17:01:21 +0800	[thread overview]
Message-ID: <202403261645.M4PkWdmb-lkp@intel.com> (raw)
In-Reply-To: <20240325150459.1045407-2-bhe@redhat.com>

Hi Baoquan,

kernel test robot noticed the following build errors:

[auto build test ERROR on powerpc/next]
[also build test ERROR on powerpc/fixes linus/master v6.9-rc1]
[cannot apply to akpm-mm/mm-everything next-20240326]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Baoquan-He/mm-mm_init-c-remove-the-useless-dma_reserve/20240325-230756
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
patch link:    https://lore.kernel.org/r/20240325150459.1045407-2-bhe%40redhat.com
patch subject: [PATCH 1/7] mm/mm_init.c: remove the useless dma_reserve
config: x86_64-rhel-8.3 (https://download.01.org/0day-ci/archive/20240326/202403261645.M4PkWdmb-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240326/202403261645.M4PkWdmb-lkp@intel.com/reproduce)

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/202403261645.M4PkWdmb-lkp@intel.com/

All errors (new ones prefixed by >>):

   arch/x86/mm/init.c: In function 'memblock_find_dma_reserve':
>> arch/x86/mm/init.c:1036:9: error: implicit declaration of function 'set_dma_reserve'; did you mean 'get_dma_residue'? [-Werror=implicit-function-declaration]
    1036 |         set_dma_reserve(nr_pages - nr_free_pages);
         |         ^~~~~~~~~~~~~~~
         |         get_dma_residue
   cc1: some warnings being treated as errors


vim +1036 arch/x86/mm/init.c

176239153049a0 Pekka Enberg 2011-11-01   992  
4270fd8b4c27f0 Ingo Molnar  2017-01-28   993  /*
4270fd8b4c27f0 Ingo Molnar  2017-01-28   994   * Calculate the precise size of the DMA zone (first 16 MB of RAM),
4270fd8b4c27f0 Ingo Molnar  2017-01-28   995   * and pass it to the MM layer - to help it set zone watermarks more
4270fd8b4c27f0 Ingo Molnar  2017-01-28   996   * accurately.
4270fd8b4c27f0 Ingo Molnar  2017-01-28   997   *
4270fd8b4c27f0 Ingo Molnar  2017-01-28   998   * Done on 64-bit systems only for the time being, although 32-bit systems
4270fd8b4c27f0 Ingo Molnar  2017-01-28   999   * might benefit from this as well.
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1000   */
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1001  void __init memblock_find_dma_reserve(void)
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1002  {
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1003  #ifdef CONFIG_X86_64
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1004  	u64 nr_pages = 0, nr_free_pages = 0;
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1005  	unsigned long start_pfn, end_pfn;
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1006  	phys_addr_t start_addr, end_addr;
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1007  	int i;
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1008  	u64 u;
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1009  
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1010  	/*
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1011  	 * Iterate over all memory ranges (free and reserved ones alike),
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1012  	 * to calculate the total number of pages in the first 16 MB of RAM:
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1013  	 */
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1014  	nr_pages = 0;
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1015  	for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, NULL) {
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1016  		start_pfn = min(start_pfn, MAX_DMA_PFN);
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1017  		end_pfn   = min(end_pfn,   MAX_DMA_PFN);
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1018  
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1019  		nr_pages += end_pfn - start_pfn;
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1020  	}
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1021  
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1022  	/*
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1023  	 * Iterate over free memory ranges to calculate the number of free
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1024  	 * pages in the DMA zone, while not counting potential partial
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1025  	 * pages at the beginning or the end of the range:
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1026  	 */
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1027  	nr_free_pages = 0;
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1028  	for_each_free_mem_range(u, NUMA_NO_NODE, MEMBLOCK_NONE, &start_addr, &end_addr, NULL) {
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1029  		start_pfn = min_t(unsigned long, PFN_UP(start_addr), MAX_DMA_PFN);
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1030  		end_pfn   = min_t(unsigned long, PFN_DOWN(end_addr), MAX_DMA_PFN);
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1031  
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1032  		if (start_pfn < end_pfn)
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1033  			nr_free_pages += end_pfn - start_pfn;
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1034  	}
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1035  
4270fd8b4c27f0 Ingo Molnar  2017-01-28 @1036  	set_dma_reserve(nr_pages - nr_free_pages);
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1037  #endif
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1038  }
4270fd8b4c27f0 Ingo Molnar  2017-01-28  1039  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2024-03-26  9:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25 15:04 [PATCH 0/7] mm: minor clean up and improvement Baoquan He
2024-03-25 15:04 ` [PATCH 1/7] mm/mm_init.c: remove the useless dma_reserve Baoquan He
2024-03-26  8:27   ` kernel test robot
2024-03-26  9:01   ` kernel test robot [this message]
2024-03-26 11:01     ` Baoquan He
2024-03-25 15:04 ` [PATCH 2/7] mm/mm_init.c: add new function calc_nr_all_pages() Baoquan He
2024-03-25 15:04 ` [PATCH 3/7] mm/mm_init.c: remove meaningless calculation of zone->managed_pages in free_area_init_core() Baoquan He
2024-03-25 15:04 ` [PATCH 4/7] mm/mm_init.c: remove unneeded calc_memmap_size() Baoquan He
2024-03-25 15:04 ` [PATCH 5/7] mm/mm_init.c: remove arch_reserved_kernel_pages() Baoquan He
2024-03-25 15:04 ` [PATCH 6/7] mm: move array mem_section init code out of memory_present() Baoquan He
2024-03-25 15:04 ` [PATCH 7/7] mm/init: remove the unnecessary special treatment for memory-less node Baoquan He
2024-03-25 15:08 ` [PATCH 0/7] mm: minor clean up and improvement Baoquan He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202403261645.M4PkWdmb-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bhe@redhat.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.