From: Oliver <oohall@gmail.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Dan Williams <dan.j.williams@intel.com>,
Linux-Next Mailing List <linux-next@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Device Tree <devicetree@vger.kernel.org>,
Rob Herring <robh@kernel.org>
Subject: Re: linux-next: build failure after merge of the nvdimm tree
Date: Mon, 9 Apr 2018 17:34:03 +1000 [thread overview]
Message-ID: <CAOSf1CGjFOPPQPYNA=uLFJnVyNXQnsoBb8rm2qFi8uuUHmw8ZA@mail.gmail.com> (raw)
In-Reply-To: <CAOSf1CHToZ5+k90n_sgh_9ezJjXpx21E5-K66TWkdU7t7kUiEw@mail.gmail.com>
On Mon, Apr 9, 2018 at 1:38 PM, Oliver <oohall@gmail.com> wrote:
> On Mon, Apr 9, 2018 at 1:16 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>> Hi Dan,
>>
>> After merging the nvdimm tree, today's linux-next build (x86_64
>> allmodconfig) failed like this:
>>
>> ERROR: "of_node_to_nid" [drivers/nvdimm/of_pmem.ko] undefined!
>>
>> Caused by commit
>>
>> 717197608952 ("libnvdimm: Add device-tree based driver")
>>
>> X86 seems to not have a version of of_node_to_nid() even though CONFIG_OF
>> and CONFIG_NUMA are both 'y' in this build.
>
> It's a side effect of a driver selecting CONFIG_OF accidently. There's
> a patch to fix this in the drm-misc-next tree:
>
> https://lkml.org/lkml/2018/4/3/17
>
>> I have used the nvdimm tree from next-20180406 for today.
>
> That works too.
Hmm, on closer inspection this is actually a bug in the of driver. The
patch above fixes the specific problem that we hit on ia64 due to
CONFIG_OF being selected by accident, but the underlying issue will
affect any platform that doesn't provide an implementation of
of_node_to_nid().
The fundamental problem is that the various actual implementations of
of_node_to_nid (ppc, sparc and the generic one in of_numa.c) export
the symbol. While the fallback implementation does not because it is
defined as a weak symbol. As a result we'll get this build failure iff
there's a call to of_node_to_nid() in a module.
The one-line fix is just to delete the call to of_node_to_nid() in
of_pmem.c. I have a patch that adds a Kconfig options and removes the
weak symbol games. That needs Acks from the ppc, sparc and DT
maintainers though so it'll take longer to organise.
Oliver
next prev parent reply other threads:[~2018-04-09 7:34 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-09 3:16 linux-next: build failure after merge of the nvdimm tree Stephen Rothwell
2018-04-09 3:38 ` Oliver
2018-04-09 7:34 ` Oliver [this message]
2018-04-09 17:11 ` Dan Williams
2018-04-09 18:14 ` Dan Williams
-- strict thread matches above, loose matches on Subject: below --
2022-05-16 9:10 Stephen Rothwell
2022-05-16 18:05 ` Dan Williams
2021-08-30 7:09 Stephen Rothwell
2021-08-30 7:10 ` Christoph Hellwig
2021-08-30 7:15 ` Gao Xiang
2019-07-05 7:20 Stephen Rothwell
2019-07-05 8:45 ` Pankaj Gupta
2019-07-05 11:09 ` Stephen Rothwell
2019-07-05 11:14 ` Pankaj Gupta
2019-07-05 22:32 ` Dan Williams
2019-07-05 23:48 ` Stephen Rothwell
2019-06-20 9:29 Stephen Rothwell
2019-06-20 10:30 ` Pankaj Gupta
2017-11-03 7:19 Stephen Rothwell
2017-11-03 16:04 ` Dan Williams
2017-09-04 7:34 Stephen Rothwell
2017-09-04 18:34 ` Dan Williams
2017-04-24 6:11 Stephen Rothwell
2017-04-24 8:39 ` Al Viro
2017-04-24 23:29 ` Dan Williams
2017-04-25 22:22 ` Dan Williams
2016-07-22 6:13 Stephen Rothwell
2016-07-23 1:04 ` Dan Williams
2016-07-23 3:54 ` Dan Williams
2016-07-21 6:13 Stephen Rothwell
2016-07-21 21:33 ` Dan Williams
2016-03-27 9:50 Stephen Rothwell
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='CAOSf1CGjFOPPQPYNA=uLFJnVyNXQnsoBb8rm2qFi8uuUHmw8ZA@mail.gmail.com' \
--to=oohall@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sfr@canb.auug.org.au \
/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;
as well as URLs for NNTP newsgroup(s).