All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: "Chen, Rong A" <rong.a.chen@intel.com>,
	Michal Hocko <mhocko@suse.com>, kernel test robot <lkp@intel.com>,
	kbuild-all@lists.01.org,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-kernel@vger.kernel.org, Oscar Salvador <osalvador@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	linux-mips@vger.kernel.org, chenfeiyang@loongson.cn
Subject: Re: [kbuild-all] Re: undefined reference to `node_data'
Date: Fri, 25 Mar 2022 11:40:37 +0800	[thread overview]
Message-ID: <a80b2c1f-cbb9-b320-3e97-0152109d261f@loongson.cn> (raw)
In-Reply-To: <06178ca0-66ad-c7fc-a79c-0ea1873408bd@intel.com>



On 03/25/2022 09:16 AM, Chen, Rong A wrote:
>
>
> On 3/24/2022 8:40 PM, Michal Hocko wrote:
>> On Thu 24-03-22 10:04:43, Thomas Bogendoerfer wrote:
>>> On Wed, Mar 23, 2022 at 05:46:59PM +0100, Michal Hocko wrote:
>>>>>> 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.
>>>>
>>>> Is there any reason why (some?) MIPS arches use __node_data rather than
>>>> node_data as most other architectures? Would it be acceptable to do the
>>>> renaming? It would help to cover the above compilation problem because
>>>> arch_refresh_nodedata could keep using node_data directly.
>>>
>>> I've just checked history and I don't see a reason for __node_data.
>>> So I'm fine with changing it to node_data.
>>
>> Thanks a lot for double checking Thomas! This is a dump&simple sed over
>> mips file. 0-day guys, could you give it a try please?
>
>
> Hi Michal,
>
> It returns another error:

Hi,

I think the following patch should fix the build error
"undefined reference to `node_data'":

https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?id=f8f9f21c7848

Thanks,
Tiezhu


WARNING: multiple messages have this Message-ID (diff)
From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: kbuild-all@lists.01.org
Subject: Re: undefined reference to `node_data'
Date: Fri, 25 Mar 2022 11:40:37 +0800	[thread overview]
Message-ID: <a80b2c1f-cbb9-b320-3e97-0152109d261f@loongson.cn> (raw)
In-Reply-To: <06178ca0-66ad-c7fc-a79c-0ea1873408bd@intel.com>

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



On 03/25/2022 09:16 AM, Chen, Rong A wrote:
>
>
> On 3/24/2022 8:40 PM, Michal Hocko wrote:
>> On Thu 24-03-22 10:04:43, Thomas Bogendoerfer wrote:
>>> On Wed, Mar 23, 2022 at 05:46:59PM +0100, Michal Hocko wrote:
>>>>>> 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.
>>>>
>>>> Is there any reason why (some?) MIPS arches use __node_data rather than
>>>> node_data as most other architectures? Would it be acceptable to do the
>>>> renaming? It would help to cover the above compilation problem because
>>>> arch_refresh_nodedata could keep using node_data directly.
>>>
>>> I've just checked history and I don't see a reason for __node_data.
>>> So I'm fine with changing it to node_data.
>>
>> Thanks a lot for double checking Thomas! This is a dump&simple sed over
>> mips file. 0-day guys, could you give it a try please?
>
>
> Hi Michal,
>
> It returns another error:

Hi,

I think the following patch should fix the build error
"undefined reference to `node_data'":

https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?id=f8f9f21c7848

Thanks,
Tiezhu

  reply	other threads:[~2022-03-25  3:43 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
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 [this message]
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=a80b2c1f-cbb9-b320-3e97-0152109d261f@loongson.cn \
    --to=yangtiezhu@loongson.cn \
    --cc=akpm@linux-foundation.org \
    --cc=chenfeiyang@loongson.cn \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=mhocko@suse.com \
    --cc=osalvador@suse.de \
    --cc=rong.a.chen@intel.com \
    --cc=tsbogend@alpha.franken.de \
    /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.