All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Donet Tom <donettom@linux.ibm.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org,
	David Hildenbrand <david@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mike Rapoport <rppt@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	Ritesh Harjani <ritesh.list@gmail.com>,
	rafael@kernel.org, Danilo Krummrich <dakr@kernel.org>,
	Donet Tom <donettom@linux.ibm.com>
Subject: Re: [PATCH 1/2] mm/memblock: Added a New Memblock Function to Check if the Current Node's Memblock Region Intersects with a Memory Block
Date: Thu, 10 Apr 2025 15:03:52 +0800	[thread overview]
Message-ID: <202504101459.iFHlVGBA-lkp@intel.com> (raw)
In-Reply-To: <50142a29010463f436dc5c4feb540e5de3bb09df.1744175097.git.donettom@linux.ibm.com>

Hi Donet,

kernel test robot noticed the following build errors:

[auto build test ERROR on akpm-mm/mm-everything]

url:    https://github.com/intel-lab-lkp/linux/commits/Donet-Tom/base-node-Use-curr_node_memblock_intersect_memory_block-to-Get-Memory-Block-NID-if-CONFIG_DEFERRED_STRUCT_PAGE_INIT-is-S/20250409-132924
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/50142a29010463f436dc5c4feb540e5de3bb09df.1744175097.git.donettom%40linux.ibm.com
patch subject: [PATCH 1/2] mm/memblock: Added a New Memblock Function to Check if the Current Node's Memblock Region Intersects with a Memory Block
config: csky-randconfig-001-20250410 (https://download.01.org/0day-ci/archive/20250410/202504101459.iFHlVGBA-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250410/202504101459.iFHlVGBA-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/202504101459.iFHlVGBA-lkp@intel.com/

All errors (new ones prefixed by >>):

   mm/memblock.c: In function 'curr_node_memblock_intersect_memory_block':
>> mm/memblock.c:1943:22: error: 'struct memblock_region' has no member named 'nid'
    1943 |                 if (r->nid == curr_nid) {
         |                      ^~


vim +1943 mm/memblock.c

  1913	
  1914	/**
  1915	 * curr_node_memblock_intersect_memory_block:  checks if the current node's memblock
  1916	 * region intersects with the memory block.
  1917	 * @start_pfn: memory block start pfn
  1918	 * @end_pfn: memory block end_pfn
  1919	 * @curr_nid: Current node
  1920	 *
  1921	 * This function takes the start and end PFN of a memory block, as well as the node ID
  1922	 * that is being registered. It then finds the memblock region of the current node and
  1923	 * checks if the passed memory block intersects with the memblock. If there is an
  1924	 * intersection, the function returns true; otherwise, it returns false.
  1925	 *
  1926	 * Return:
  1927	 * If the current node's memblock region intersects with the memory block, it returns
  1928	 * true; otherwise, it returns false.
  1929	 */
  1930	bool __init_memblock curr_node_memblock_intersect_memory_block(unsigned long start_pfn,
  1931							unsigned long end_pfn, int curr_nid)
  1932	{
  1933		struct memblock_region *r;
  1934		unsigned long r_start, r_end;
  1935		unsigned long size = end_pfn - start_pfn;
  1936		unsigned long r_size = 0;
  1937	
  1938		for_each_mem_region(r) {
  1939			r_start = PFN_DOWN(r->base);
  1940			r_end = PFN_DOWN(r->base + r->size);
  1941			r_size = r_end - r_start;
  1942	
> 1943			if (r->nid == curr_nid) {
  1944				if (size > r_size) {
  1945					/*
  1946					 * The memory block size is greater than the memblock
  1947					 * region size, meaning multiple memblocks can be present
  1948					 * within a single memory block. If the memblock's start
  1949					 * or end is within the memory block's start and end, It
  1950					 * indicates that the memblock is part of this memory block.
  1951					 * Therefore, the memory block can be added to the node
  1952					 * where the memblock resides.
  1953					 */
  1954					if (in_range(r_start, start_pfn, size) ||
  1955							in_range(r_end, start_pfn, size))
  1956						return true;
  1957				} else {
  1958					/*
  1959					 * The memory block size is less than or equal to the
  1960					 * memblock size, meaning multiple memory blocks can
  1961					 * be part of a single memblock region. If the memory
  1962					 * block's start or end is within the memblock's start
  1963					 * and end, it indicates that the memory block is part of
  1964					 * the memblock. Therefore, the memory block can be added
  1965					 * to the node where the memblock resides.
  1966					 */
  1967					if (in_range(start_pfn, r_start, r_size) ||
  1968							in_range(end_pfn, r_start, r_size))
  1969						return true;
  1970				}
  1971			}
  1972		}
  1973		return false;
  1974	}
  1975	

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

  parent reply	other threads:[~2025-04-10  7:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-09  5:27 [PATCH 1/2] mm/memblock: Added a New Memblock Function to Check if the Current Node's Memblock Region Intersects with a Memory Block Donet Tom
2025-04-09  5:27 ` [PATCH 2/2] base/node: Use curr_node_memblock_intersect_memory_block to Get Memory Block NID if CONFIG_DEFERRED_STRUCT_PAGE_INIT is Set Donet Tom
2025-04-10  8:07   ` Mike Rapoport
2025-04-10 18:57     ` Donet Tom
2025-04-11 10:59       ` Mike Rapoport
2025-04-11 11:36         ` Donet Tom
2025-04-15  9:46           ` Mike Rapoport
2025-04-15 10:08             ` Donet Tom
2025-04-10  2:20 ` [PATCH 1/2] mm/memblock: Added a New Memblock Function to Check if the Current Node's Memblock Region Intersects with a Memory Block Andrew Morton
2025-04-10  4:35   ` Donet Tom
2025-04-10  7:03 ` kernel test robot [this message]
2025-04-10  7:25 ` kernel test robot
2025-04-10  7:49 ` Mike Rapoport
2025-04-10 19:06   ` Donet Tom

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=202504101459.iFHlVGBA-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=dakr@kernel.org \
    --cc=david@redhat.com \
    --cc=donettom@linux.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rafael@kernel.org \
    --cc=ritesh.list@gmail.com \
    --cc=rppt@kernel.org \
    /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.