public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC] net: stmmac: Make DWMAC_ROCKCHIP and DWMAC_STM32 depend on PM_SLEEP
@ 2025-08-18 19:11 Paul E. McKenney
  2025-08-18 19:26 ` Russell King (Oracle)
  0 siblings, 1 reply; 3+ messages in thread
From: Paul E. McKenney @ 2025-08-18 19:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Vladimir Oltean,
	Choong Yong Liang, Russell King, netdev, linux-stm32,
	linux-arm-kernel

Hello!

This might be more of a bug report than a patch, but here goes...

Running rcuscale or refscale performance tests on datacenter ARM systems
gives the following build errors with CONFIG_HIBERNATION=n:

ERROR: modpost: "stmmac_simple_pm_ops" [drivers/net/ethernet/stmicro/stmmac/dwmac-rk.ko] undefined!
ERROR: modpost: "stmmac_simple_pm_ops" [drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.ko] undefined!

The problem is that these two drivers unconditionally reference
stmmac_simple_pm_ops, which is not exported to modules in kernels built
without CONFIG_PM_SLEEP, which depends on CONFIG_HIBERNATION.

Therefore, update drivers/net/ethernet/stmicro/stmmac/Kconfig so that
CONFIG_DWMAC_ROCKCHIP and CONFIG_DWMAC_STM32 depend on CONFIG_PM_SLEEP,
thus preventing the dependence on a symbol when it is not exported.
With this change, rcuscale and refscale build and run happily on the
ARM system that I have access to.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: Choong Yong Liang <yong.liang.choong@linux.intel.com>
Cc: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Cc: <netdev@vger.kernel.org>
Cc: <linux-stm32@st-md-mailman.stormreply.com>
Cc: <linux-arm-kernel@lists.infradead.org>

diff --git a/drivers/net/ethernet/stmicro/stmmac/Kconfig b/drivers/net/ethernet/stmicro/stmmac/Kconfig
index 67fa879b1e521e..150f662953a24b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/Kconfig
+++ b/drivers/net/ethernet/stmicro/stmmac/Kconfig
@@ -146,7 +146,7 @@ config DWMAC_RENESAS_GBETH
 config DWMAC_ROCKCHIP
 	tristate "Rockchip dwmac support"
 	default ARCH_ROCKCHIP
-	depends on OF && (ARCH_ROCKCHIP || COMPILE_TEST)
+	depends on OF && (ARCH_ROCKCHIP || COMPILE_TEST) && PM_SLEEP
 	select MFD_SYSCON
 	help
 	  Support for Ethernet controller on Rockchip RK3288 SoC.
@@ -231,7 +231,7 @@ config DWMAC_STI
 config DWMAC_STM32
 	tristate "STM32 DWMAC support"
 	default ARCH_STM32
-	depends on OF && HAS_IOMEM && (ARCH_STM32 || COMPILE_TEST)
+	depends on OF && HAS_IOMEM && (ARCH_STM32 || COMPILE_TEST) && PM_SLEEP
 	select MFD_SYSCON
 	help
 	  Support for ethernet controller on STM32 SOCs.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-18 20:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-18 19:11 [PATCH RFC] net: stmmac: Make DWMAC_ROCKCHIP and DWMAC_STM32 depend on PM_SLEEP Paul E. McKenney
2025-08-18 19:26 ` Russell King (Oracle)
2025-08-18 20:10   ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox