* Re: mdio-thunder.c:undefined reference to `mdiobus_unregister' [not found] <201706121044.hytIipdV%fengguang.wu@intel.com> @ 2017-06-12 16:09 ` Randy Dunlap 2017-06-12 16:17 ` Florian Fainelli 0 siblings, 1 reply; 2+ messages in thread From: Randy Dunlap @ 2017-06-12 16:09 UTC (permalink / raw) To: kbuild test robot, Florian Fainelli Cc: kbuild-all, linux-kernel, netdev@vger.kernel.org, Arnd Bergmann On 06/11/17 19:14, kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: 32c1431eea4881a6b17bd7c639315010aeefa452 > commit: 90eff9096c01ba90cdae504a6b95ee87fe2556a3 net: phy: Allow splitting MDIO bus/device support from PHYs > date: 3 months ago > config: x86_64-randconfig-s2-06120830 (attached as .config) > compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 > reproduce: > git checkout 90eff9096c01ba90cdae504a6b95ee87fe2556a3 > # save the attached .config to linux build tree > make ARCH=x86_64 > > All errors (new ones prefixed by >>): > > drivers/built-in.o: In function `thunder_mdiobus_pci_remove': >>> mdio-thunder.c:(.text+0x2a212f): undefined reference to `mdiobus_unregister' >>> mdio-thunder.c:(.text+0x2a2138): undefined reference to `mdiobus_free' > drivers/built-in.o: In function `thunder_mdiobus_pci_probe': > mdio-thunder.c:(.text+0x2a22e7): undefined reference to `devm_mdiobus_alloc_size' > mdio-thunder.c:(.text+0x2a236f): undefined reference to `of_mdiobus_register' > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > https://lists.01.org/pipermail/kbuild-all Intel Corporation > Ugh. I don't know the solution to this one. CONFIG_MDIO_DEVICE=y CONFIG_MDIO_THUNDER=y CONFIG_PHYLIB=m First 2 lines are OK, but the third line causes the problem... in drivers/net/phy/Makefile: # PHYLIB implies MDIO_DEVICE, in that case, we have a bunch of circular # dependencies that does not make it possible to split mdio-bus objects into a # dedicated loadable module, so we bundle them all together into libphy.ko ifdef CONFIG_PHYLIB libphy-y += $(mdio-bus-y) else obj-$(CONFIG_MDIO_DEVICE) += mdio-bus.o endif libphy-$(CONFIG_SWPHY) += swphy.o libphy-$(CONFIG_LED_TRIGGER_PHY) += phy_led_triggers.o obj-$(CONFIG_PHYLIB) += libphy.o So PHYLIB is built as libphy.ko and the mdiobus functions are there instead of being in mdio-bus.o (so they are not built-in), while the mdio-thunder driver is built-in. -- ~Randy ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: mdio-thunder.c:undefined reference to `mdiobus_unregister' 2017-06-12 16:09 ` mdio-thunder.c:undefined reference to `mdiobus_unregister' Randy Dunlap @ 2017-06-12 16:17 ` Florian Fainelli 0 siblings, 0 replies; 2+ messages in thread From: Florian Fainelli @ 2017-06-12 16:17 UTC (permalink / raw) To: Randy Dunlap, kbuild test robot Cc: kbuild-all, linux-kernel, netdev@vger.kernel.org, Arnd Bergmann On 06/12/2017 09:09 AM, Randy Dunlap wrote: > On 06/11/17 19:14, kbuild test robot wrote: >> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master >> head: 32c1431eea4881a6b17bd7c639315010aeefa452 >> commit: 90eff9096c01ba90cdae504a6b95ee87fe2556a3 net: phy: Allow splitting MDIO bus/device support from PHYs >> date: 3 months ago >> config: x86_64-randconfig-s2-06120830 (attached as .config) >> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 >> reproduce: >> git checkout 90eff9096c01ba90cdae504a6b95ee87fe2556a3 >> # save the attached .config to linux build tree >> make ARCH=x86_64 >> >> All errors (new ones prefixed by >>): >> >> drivers/built-in.o: In function `thunder_mdiobus_pci_remove': >>>> mdio-thunder.c:(.text+0x2a212f): undefined reference to `mdiobus_unregister' >>>> mdio-thunder.c:(.text+0x2a2138): undefined reference to `mdiobus_free' >> drivers/built-in.o: In function `thunder_mdiobus_pci_probe': >> mdio-thunder.c:(.text+0x2a22e7): undefined reference to `devm_mdiobus_alloc_size' >> mdio-thunder.c:(.text+0x2a236f): undefined reference to `of_mdiobus_register' >> >> --- >> 0-DAY kernel test infrastructure Open Source Technology Center >> https://lists.01.org/pipermail/kbuild-all Intel Corporation >> > > Ugh. I don't know the solution to this one. > > CONFIG_MDIO_DEVICE=y > CONFIG_MDIO_THUNDER=y > CONFIG_PHYLIB=m > > First 2 lines are OK, but the third line causes the problem... > in drivers/net/phy/Makefile: > > # PHYLIB implies MDIO_DEVICE, in that case, we have a bunch of circular > # dependencies that does not make it possible to split mdio-bus objects into a > # dedicated loadable module, so we bundle them all together into libphy.ko > ifdef CONFIG_PHYLIB > libphy-y += $(mdio-bus-y) > else > obj-$(CONFIG_MDIO_DEVICE) += mdio-bus.o > endif > libphy-$(CONFIG_SWPHY) += swphy.o > libphy-$(CONFIG_LED_TRIGGER_PHY) += phy_led_triggers.o > > obj-$(CONFIG_PHYLIB) += libphy.o > > > So PHYLIB is built as libphy.ko and the mdiobus functions are there > instead of being in mdio-bus.o (so they are not built-in), while the > mdio-thunder driver is built-in. We may need: depends on !(MDIO_DEVICE=y && PHYLIB=m) similar to what MDIO_BITBANG already has. I will cook something later today, thanks! -- Florian ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-12 16:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <201706121044.hytIipdV%fengguang.wu@intel.com>
2017-06-12 16:09 ` mdio-thunder.c:undefined reference to `mdiobus_unregister' Randy Dunlap
2017-06-12 16:17 ` Florian Fainelli
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox