All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: kbuild-all@lists.01.org
Subject: Re: undefined reference to `node_data'
Date: Wed, 23 Mar 2022 15:53:30 +0100	[thread overview]
Message-ID: <Yjs0ausRy6/mLUFD@dhcp22.suse.cz> (raw)
In-Reply-To: <202203232042.AS9SV1zv-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2094 bytes --]

On Wed 23-03-22 20:58:10, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
> commit: 09f49dca570a917a8c6bccd7e8c61f5141534e3a mm: handle uninitialized numa nodes gracefully
> date:   14 hours ago
> config: mips-buildonly-randconfig-r004-20220323 (https://download.01.org/0day-ci/archive/20220323/202203232042.AS9SV1zv-lkp(a)intel.com/config)
> compiler: mips64-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=09f49dca570a917a8c6bccd7e8c61f5141534e3a
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout 09f49dca570a917a8c6bccd7e8c61f5141534e3a
>         # save the config file to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash

Didn't work for me
> 
> 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 >>):
> 
>    mips64-linux-ld: mm/page_alloc.o: in function `free_area_init':
> >> (.init.text+0x1680): undefined reference to `node_data'
>    mips64-linux-ld: (.init.text+0x1690): undefined reference to `node_data'

OK, I can see what is going here. The page allocator normally
uses NODE_DATA but arch_refresh_nodedata refers to node_data directly.
This is a problem with
arch/mips/include/asm/mach-loongson64/mmzone.h:
extern struct pglist_data *__node_data[];

#define NODE_DATA(n)            (__node_data[n])

Unfortunately we cannot use NODE_DATA there because of header inclusion
ordering. I will think about a solution.

Thanks for the report
-- 
Michal Hocko
SUSE Labs

WARNING: multiple messages have this Message-ID (diff)
From: Michal Hocko <mhocko@suse.com>
To: kernel test robot <lkp@intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Oscar Salvador <osalvador@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: undefined reference to `node_data'
Date: Wed, 23 Mar 2022 15:53:30 +0100	[thread overview]
Message-ID: <Yjs0ausRy6/mLUFD@dhcp22.suse.cz> (raw)
In-Reply-To: <202203232042.AS9SV1zv-lkp@intel.com>

On Wed 23-03-22 20:58:10, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
> commit: 09f49dca570a917a8c6bccd7e8c61f5141534e3a mm: handle uninitialized numa nodes gracefully
> date:   14 hours ago
> config: mips-buildonly-randconfig-r004-20220323 (https://download.01.org/0day-ci/archive/20220323/202203232042.AS9SV1zv-lkp@intel.com/config)
> compiler: mips64-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=09f49dca570a917a8c6bccd7e8c61f5141534e3a
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout 09f49dca570a917a8c6bccd7e8c61f5141534e3a
>         # save the config file to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash

Didn't work for me
> 
> 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 >>):
> 
>    mips64-linux-ld: mm/page_alloc.o: in function `free_area_init':
> >> (.init.text+0x1680): undefined reference to `node_data'
>    mips64-linux-ld: (.init.text+0x1690): undefined reference to `node_data'

OK, I can see what is going here. The page allocator normally
uses NODE_DATA but arch_refresh_nodedata refers to node_data directly.
This is a problem with
arch/mips/include/asm/mach-loongson64/mmzone.h:
extern struct pglist_data *__node_data[];

#define NODE_DATA(n)            (__node_data[n])

Unfortunately we cannot use NODE_DATA there because of header inclusion
ordering. I will think about a solution.

Thanks for the report
-- 
Michal Hocko
SUSE Labs


  reply	other threads:[~2022-03-23 14:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-23 12:58 undefined reference to `node_data' kernel test robot
2022-03-23 14:53 ` Michal Hocko [this message]
2022-03-23 14:53   ` Michal Hocko
2022-03-23 16:46   ` Michal Hocko
2022-03-23 16:46     ` Michal Hocko
2022-03-24  9:04     ` Thomas Bogendoerfer
2022-03-24  9:04       ` Thomas Bogendoerfer
2022-03-24 12:40       ` Michal Hocko
2022-03-24 12:40         ` Michal Hocko
2022-03-25  1:16         ` [kbuild-all] " Chen, Rong A
2022-03-25  3:40           ` Tiezhu Yang
2022-03-25  3:40             ` Tiezhu Yang
2022-03-25  7:46             ` [kbuild-all] " Michal Hocko
2022-03-25  7:46               ` Michal Hocko

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=Yjs0ausRy6/mLUFD@dhcp22.suse.cz \
    --to=mhocko@suse.com \
    --cc=kbuild-all@lists.01.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.