* Re: linux-next: build failure after merge of the nvdimm tree [not found] ` <CAOSf1CHToZ5+k90n_sgh_9ezJjXpx21E5-K66TWkdU7t7kUiEw@mail.gmail.com> @ 2018-04-09 7:34 ` Oliver 2018-04-09 17:11 ` Dan Williams 0 siblings, 1 reply; 3+ messages in thread From: Oliver @ 2018-04-09 7:34 UTC (permalink / raw) To: Stephen Rothwell Cc: Dan Williams, Linux-Next Mailing List, Linux Kernel Mailing List, Device Tree, Rob Herring 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: linux-next: build failure after merge of the nvdimm tree 2018-04-09 7:34 ` linux-next: build failure after merge of the nvdimm tree Oliver @ 2018-04-09 17:11 ` Dan Williams 2018-04-09 18:14 ` Dan Williams 0 siblings, 1 reply; 3+ messages in thread From: Dan Williams @ 2018-04-09 17:11 UTC (permalink / raw) To: Oliver Cc: Stephen Rothwell, Linux-Next Mailing List, Linux Kernel Mailing List, Device Tree, Rob Herring On Mon, Apr 9, 2018 at 12:34 AM, Oliver <oohall@gmail.com> wrote: > 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. How about just marking OF_PMEM as bool for the time being until all of these other reworks land upstream? ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: linux-next: build failure after merge of the nvdimm tree 2018-04-09 17:11 ` Dan Williams @ 2018-04-09 18:14 ` Dan Williams 0 siblings, 0 replies; 3+ messages in thread From: Dan Williams @ 2018-04-09 18:14 UTC (permalink / raw) To: Oliver Cc: Stephen Rothwell, Linux-Next Mailing List, Linux Kernel Mailing List, Device Tree, Rob Herring On Mon, Apr 9, 2018 at 10:11 AM, Dan Williams <dan.j.williams@intel.com> wrote: > On Mon, Apr 9, 2018 at 12:34 AM, Oliver <oohall@gmail.com> wrote: >> 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. > > How about just marking OF_PMEM as bool for the time being until all of > these other reworks land upstream? I went ahead and just pushed this workaround for now: https://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git/commit/?h=libnvdimm-for-next&id=291717b6fbdb175da88ae2144fc58d63a490128d ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-04-09 18:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180409131619.0bc5fb45@canb.auug.org.au>
[not found] ` <CAOSf1CHToZ5+k90n_sgh_9ezJjXpx21E5-K66TWkdU7t7kUiEw@mail.gmail.com>
2018-04-09 7:34 ` linux-next: build failure after merge of the nvdimm tree Oliver
2018-04-09 17:11 ` Dan Williams
2018-04-09 18:14 ` Dan Williams
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).