linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Yuquan Wang <wangyuquan1236@phytium.com.cn>,
	Dan Williams <dan.j.williams@intel.com>
Cc: kernel test robot <lkp@intel.com>, <Jonathan.Cameron@huawei.com>,
	<rppt@kernel.org>, <rafael@kernel.org>, <lenb@kernel.org>,
	<akpm@linux-foundation.org>, <alison.schofield@intel.com>,
	<rrichter@amd.com>, <bfaccini@nvidia.com>, <haibo1.xu@intel.com>,
	<david@redhat.com>, <oe-kbuild-all@lists.linux.dev>,
	<linux-acpi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-mm@kvack.org>, <chenbaozi@phytium.com.cn>,
	<linux-cxl@vger.kernel.org>, <loongarch@lists.linux.dev>,
	<chenhuacai@kernel.org>, <kernel@xen0n.name>
Subject: Re: [PATCH v2] mm: numa_memblks: introduce numa_add_reserved_memblk
Date: Tue, 8 Apr 2025 21:14:18 -0700	[thread overview]
Message-ID: <67f5f41ae7a87_720529463@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <54b74f06.68e1.19618bc860e.Coremail.wangyuquan1236@phytium.com.cn>

Yuquan Wang wrote:
> 
> > [add loongarch folks, cc linux-cxl ]
> > 
> > kernel test robot wrote:
> > > Hi Yuquan,
> > > 
> > > 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/Yuquan-Wang/mm-numa_memblks-introduce-numa_add_reserved_memblk/20250328-172428
> > > base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
> > > patch link:    https://lore.kernel.org/r/20250328092132.2695299-1-wangyuquan1236%40phytium.com.cn
> > > patch subject: [PATCH v2] mm: numa_memblks: introduce numa_add_reserved_memblk
> > > config: loongarch-randconfig-002-20250328 (https://download.01.org/0day-ci/archive/20250328/202503282026.QNaOAK79-lkp@intel.com/config)
> > > compiler: loongarch64-linux-gcc (GCC) 14.2.0
> > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250328/202503282026.QNaOAK79-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/202503282026.QNaOAK79-lkp@intel.com/
> > > 
> > > All errors (new ones prefixed by >>):
> > > 
> > >    In file included from include/linux/build_bug.h:5,
> > >                     from include/linux/container_of.h:5,
> > >                     from include/linux/list.h:5,
> > >                     from include/linux/module.h:12,
> > >                     from drivers/acpi/numa/srat.c:10:
> > >    drivers/acpi/numa/srat.c: In function 'acpi_parse_cfmws':
> > > >> drivers/acpi/numa/srat.c:461:13: error: implicit declaration of function 'numa_add_reserved_memblk' [-Wimplicit-function-declaration]
> > >      461 |         if (numa_add_reserved_memblk(node, start, end) < 0) {
> > >          |             ^~~~~~~~~~~~~~~~~~~~~~~~
> > 
> > So it looks like loongarch was left out of the numa_memblks conversion:
> > 87482708210f ("mm: introduce numa_memblks")
> > 
> > I think the update needed is something like this (untested):
> > 
> > diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
> > index 2b8bd27a852f..cac16c827159 100644
> > --- a/arch/loongarch/Kconfig
> > +++ b/arch/loongarch/Kconfig
> > @@ -183,6 +183,7 @@ config LOONGARCH
> >   select MODULES_USE_ELF_RELA if MODULES
> >   select NEED_PER_CPU_EMBED_FIRST_CHUNK
> >   select NEED_PER_CPU_PAGE_FIRST_CHUNK
> > + select NUMA_MEMBLKS
> >   select OF
> >   select OF_EARLY_FLATTREE
> >   select PCI
> > diff --git a/arch/loongarch/include/asm/numa.h b/arch/loongarch/include/asm/numa.h
> > index b5f9de9f102e..bbf9f70bd25f 100644
> > --- a/arch/loongarch/include/asm/numa.h
> > +++ b/arch/loongarch/include/asm/numa.h
> > @@ -22,20 +22,6 @@ extern int numa_off;
> >  extern s16 __cpuid_to_node[CONFIG_NR_CPUS];
> >  extern nodemask_t numa_nodes_parsed __initdata;
> >  
> > -struct numa_memblk {
> > - u64 start;
> > - u64 end;
> > - int nid;
> > -};
> > -
> > -#define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
> > -struct numa_meminfo {
> > - int nr_blks;
> > - struct numa_memblk blk[NR_NODE_MEMBLKS];
> > -};
> > -
> > -extern int __init numa_add_memblk(int nodeid, u64 start, u64 end);
> > -
> >  extern void __init early_numa_add_cpu(int cpuid, s16 node);
> >  extern void numa_add_cpu(unsigned int cpu);
> >  extern void numa_remove_cpu(unsigned int cpu);
> > diff --git a/arch/loongarch/kernel/numa.c b/arch/loongarch/kernel/numa.c
> > index 84fe7f854820..57b21082e893 100644
> > --- a/arch/loongarch/kernel/numa.c
> > +++ b/arch/loongarch/kernel/numa.c
> > @@ -18,6 +18,7 @@
> >  #include <linux/efi.h>
> >  #include <linux/irq.h>
> >  #include <linux/pci.h>
> > +#include <linux/numa_memblks.h>
> >  #include <asm/bootinfo.h>
> >  #include <asm/loongson.h>
> >  #include <asm/numa.h>
> > 
> > Could someone from the loongarch side propose the fixups needed here so
> > Yuquan can land this patch?
> 
> Hi, Dan
> 
> Should I wait for Loongarch folks's replies or draft a new patch for Loongarch
> to introduce numa_memblks according to your suggested code?

I would say go ahead and introduce the suggested changes. I think the
risk is low that copying what is done for numa_add_memblk() will break
something, and they can always jump in to fix that up if the worst case
happens.


  reply	other threads:[~2025-04-09  4:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-28  9:21 Yuquan Wang
2025-03-28 13:15 ` kernel test robot
2025-04-03 21:01   ` Dan Williams
2025-04-09  4:08     ` Yuquan Wang
2025-04-09  4:14       ` Dan Williams [this message]
2025-03-28 22:53 ` Mike Rapoport
2025-04-03 12:16 ` Jonathan Cameron
2025-04-03 18:37 ` Alison Schofield
2025-04-04  6:29 ` Anshuman Khandual
2025-04-09  4:01 Yuquan Wang
2025-04-09  9:43 ` Mike Rapoport
2025-05-06  6:22 Yuquan Wang
2025-05-07  1:55 ` Andrew Morton
2025-05-07 15:21   ` Mike Rapoport
2025-05-07 15:20 ` Mike Rapoport
2025-05-07 16:24 ` Jonathan Cameron
2025-05-08  1:47   ` Yuquan Wang
2025-05-08  1:54     ` Huacai Chen

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=67f5f41ae7a87_720529463@dwillia2-xfh.jf.intel.com.notmuch \
    --to=dan.j.williams@intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=alison.schofield@intel.com \
    --cc=bfaccini@nvidia.com \
    --cc=chenbaozi@phytium.com.cn \
    --cc=chenhuacai@kernel.org \
    --cc=david@redhat.com \
    --cc=haibo1.xu@intel.com \
    --cc=kernel@xen0n.name \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=loongarch@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rafael@kernel.org \
    --cc=rppt@kernel.org \
    --cc=rrichter@amd.com \
    --cc=wangyuquan1236@phytium.com.cn \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox