* [PATCH] mux: mmio: Fix missing CONFIG_REGMAP_MMIO
@ 2025-05-15 14:05 Krzysztof Kozlowski
2025-05-15 14:14 ` Krzysztof Kozlowski
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-15 14:05 UTC (permalink / raw)
To: Peter Rosin, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Krzysztof Kozlowski, Andrew Davis,
linux-kernel, netdev
Cc: kernel test robot, Greg Kroah-Hartman, Samuel Holland,
Arnd Bergmann
MMIO mux uses now regmap_init_mmio(), so one way or another
CONFIG_REGMAP_MMIO should be enabled, because there are no stubs for
!REGMAP_MMIO case:
ERROR: modpost: "__regmap_init_mmio_clk" [drivers/mux/mux-mmio.ko] undefined!
REGMAP_MMIO should be, because it is a non-visible symbol, but this
causes a circular dependency:
error: recursive dependency detected!
symbol IRQ_DOMAIN is selected by REGMAP
symbol REGMAP default is visible depending on REGMAP_MMIO
symbol REGMAP_MMIO is selected by MUX_MMIO
symbol MUX_MMIO depends on MULTIPLEXER
symbol MULTIPLEXER is selected by MDIO_BUS_MUX_MULTIPLEXER
symbol MDIO_BUS_MUX_MULTIPLEXER depends on MDIO_DEVICE
symbol MDIO_DEVICE is selected by PHYLIB
symbol PHYLIB is selected by ARC_EMAC_CORE
symbol ARC_EMAC_CORE is selected by EMAC_ROCKCHIP
symbol EMAC_ROCKCHIP depends on OF_IRQ
symbol OF_IRQ depends on IRQ_DOMAIN
... which we can break by changing dependency in EMAC_ROCKCHIP from
OF_IRQ to OF.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505150312.dYbBqUhG-lkp@intel.com/
Fixes: 61de83fd8256 ("mux: mmio: Do not use syscon helper to build regmap")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Samuel Holland <samuel@sholland.org>
Cc: Arnd Bergmann <arnd@arndb.de>
---
drivers/mux/Kconfig | 1 +
drivers/net/ethernet/arc/Kconfig | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mux/Kconfig b/drivers/mux/Kconfig
index 80f015cf6e54..c68132e38138 100644
--- a/drivers/mux/Kconfig
+++ b/drivers/mux/Kconfig
@@ -48,6 +48,7 @@ config MUX_GPIO
config MUX_MMIO
tristate "MMIO/Regmap register bitfield-controlled Multiplexer"
depends on OF
+ select REGMAP_MMIO
help
MMIO/Regmap register bitfield-controlled Multiplexer controller.
diff --git a/drivers/net/ethernet/arc/Kconfig b/drivers/net/ethernet/arc/Kconfig
index 0d400a7d8d91..8ccedece5339 100644
--- a/drivers/net/ethernet/arc/Kconfig
+++ b/drivers/net/ethernet/arc/Kconfig
@@ -26,7 +26,7 @@ config ARC_EMAC_CORE
config EMAC_ROCKCHIP
tristate "Rockchip EMAC support"
select ARC_EMAC_CORE
- depends on OF_IRQ && REGULATOR
+ depends on OF && REGULATOR
depends on ARCH_ROCKCHIP || COMPILE_TEST
help
Support for Rockchip RK3036/RK3066/RK3188 EMAC ethernet controllers.
--
2.45.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] mux: mmio: Fix missing CONFIG_REGMAP_MMIO
2025-05-15 14:05 [PATCH] mux: mmio: Fix missing CONFIG_REGMAP_MMIO Krzysztof Kozlowski
@ 2025-05-15 14:14 ` Krzysztof Kozlowski
2025-05-16 0:46 ` Jakub Kicinski
2025-05-15 15:30 ` Arnd Bergmann
2025-05-16 8:16 ` Krzysztof Kozlowski
2 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-15 14:14 UTC (permalink / raw)
To: Peter Rosin, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Andrew Davis, linux-kernel, netdev
Cc: kernel test robot, Greg Kroah-Hartman, Samuel Holland,
Arnd Bergmann
On 15/05/2025 16:05, Krzysztof Kozlowski wrote:
> MMIO mux uses now regmap_init_mmio(), so one way or another
> CONFIG_REGMAP_MMIO should be enabled, because there are no stubs for
> !REGMAP_MMIO case:
>
> ERROR: modpost: "__regmap_init_mmio_clk" [drivers/mux/mux-mmio.ko] undefined!
>
> REGMAP_MMIO should be, because it is a non-visible symbol, but this
> causes a circular dependency:
>
> error: recursive dependency detected!
> symbol IRQ_DOMAIN is selected by REGMAP
> symbol REGMAP default is visible depending on REGMAP_MMIO
> symbol REGMAP_MMIO is selected by MUX_MMIO
> symbol MUX_MMIO depends on MULTIPLEXER
> symbol MULTIPLEXER is selected by MDIO_BUS_MUX_MULTIPLEXER
> symbol MDIO_BUS_MUX_MULTIPLEXER depends on MDIO_DEVICE
> symbol MDIO_DEVICE is selected by PHYLIB
> symbol PHYLIB is selected by ARC_EMAC_CORE
> symbol ARC_EMAC_CORE is selected by EMAC_ROCKCHIP
> symbol EMAC_ROCKCHIP depends on OF_IRQ
> symbol OF_IRQ depends on IRQ_DOMAIN
>
> ... which we can break by changing dependency in EMAC_ROCKCHIP from
> OF_IRQ to OF.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202505150312.dYbBqUhG-lkp@intel.com/
> Fixes: 61de83fd8256 ("mux: mmio: Do not use syscon helper to build regmap")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Samuel Holland <samuel@sholland.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
Note for netdev folks:
If this looks correct approach, please kindly ack because:
1. The MUX Kconfig part is a fix for a patch in my tree going through
Greg's.
2. Above exposes circular dependency, thus should be fixed in the same
commit.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] mux: mmio: Fix missing CONFIG_REGMAP_MMIO
2025-05-15 14:05 [PATCH] mux: mmio: Fix missing CONFIG_REGMAP_MMIO Krzysztof Kozlowski
2025-05-15 14:14 ` Krzysztof Kozlowski
@ 2025-05-15 15:30 ` Arnd Bergmann
2025-05-16 8:16 ` Krzysztof Kozlowski
2 siblings, 0 replies; 9+ messages in thread
From: Arnd Bergmann @ 2025-05-15 15:30 UTC (permalink / raw)
To: Krzysztof Kozlowski, Peter Rosin, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Davis,
linux-kernel, Netdev
Cc: kernel test robot, Greg Kroah-Hartman, Samuel Holland
On Thu, May 15, 2025, at 16:05, Krzysztof Kozlowski wrote:
> MMIO mux uses now regmap_init_mmio(), so one way or another
> CONFIG_REGMAP_MMIO should be enabled, because there are no stubs for
> !REGMAP_MMIO case:
>
> ERROR: modpost: "__regmap_init_mmio_clk" [drivers/mux/mux-mmio.ko] undefined!
>
> REGMAP_MMIO should be, because it is a non-visible symbol, but this
> causes a circular dependency:
>
> error: recursive dependency detected!
> symbol IRQ_DOMAIN is selected by REGMAP
> symbol REGMAP default is visible depending on REGMAP_MMIO
> symbol REGMAP_MMIO is selected by MUX_MMIO
> symbol MUX_MMIO depends on MULTIPLEXER
> symbol MULTIPLEXER is selected by MDIO_BUS_MUX_MULTIPLEXER
> symbol MDIO_BUS_MUX_MULTIPLEXER depends on MDIO_DEVICE
> symbol MDIO_DEVICE is selected by PHYLIB
> symbol PHYLIB is selected by ARC_EMAC_CORE
> symbol ARC_EMAC_CORE is selected by EMAC_ROCKCHIP
> symbol EMAC_ROCKCHIP depends on OF_IRQ
> symbol OF_IRQ depends on IRQ_DOMAIN
>
> ... which we can break by changing dependency in EMAC_ROCKCHIP from
> OF_IRQ to OF.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes:
> https://lore.kernel.org/oe-kbuild-all/202505150312.dYbBqUhG-lkp@intel.com/
> Fixes: 61de83fd8256 ("mux: mmio: Do not use syscon helper to build
> regmap")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Samuel Holland <samuel@sholland.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
> ---
I'm unable to test this on my randconfig setup, but the patch
looks sensible to me.
Acked-by: Arnd Bergmann <arnd@arndb.de>
In the dependency loop above, I think the PHYLIB bit should also
be changed, but that is an independent problem.
I see that OF_IRQ still depends on !SPARC, which may be another
source for problems, so it's possible that anything that tries
to use OF_IRQ causes a build failure on sparc as well.
Arnd
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] mux: mmio: Fix missing CONFIG_REGMAP_MMIO
2025-05-15 14:14 ` Krzysztof Kozlowski
@ 2025-05-16 0:46 ` Jakub Kicinski
0 siblings, 0 replies; 9+ messages in thread
From: Jakub Kicinski @ 2025-05-16 0:46 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Peter Rosin, Andrew Lunn, David S. Miller, Eric Dumazet,
Paolo Abeni, Andrew Davis, linux-kernel, netdev,
kernel test robot, Greg Kroah-Hartman, Samuel Holland,
Arnd Bergmann, Heiner Kallweit
On Thu, 15 May 2025 16:14:40 +0200 Krzysztof Kozlowski wrote:
> If this looks correct approach, please kindly ack because:
> 1. The MUX Kconfig part is a fix for a patch in my tree going through
> Greg's.
> 2. Above exposes circular dependency, thus should be fixed in the same
> commit.
Acked-by: Jakub Kicinski <kuba@kernel.org>
CC: Hainer who has been trying to improve the MDIO symbols lately
https://lore.kernel.org/all/20250515140555.325601-2-krzysztof.kozlowski@linaro.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] mux: mmio: Fix missing CONFIG_REGMAP_MMIO
2025-05-15 14:05 [PATCH] mux: mmio: Fix missing CONFIG_REGMAP_MMIO Krzysztof Kozlowski
2025-05-15 14:14 ` Krzysztof Kozlowski
2025-05-15 15:30 ` Arnd Bergmann
@ 2025-05-16 8:16 ` Krzysztof Kozlowski
2025-05-16 8:26 ` Krzysztof Kozlowski
2 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-16 8:16 UTC (permalink / raw)
To: Peter Rosin, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Andrew Davis, linux-kernel, netdev,
Krzysztof Kozlowski
Cc: kernel test robot, Greg Kroah-Hartman, Samuel Holland,
Arnd Bergmann
On Thu, 15 May 2025 16:05:56 +0200, Krzysztof Kozlowski wrote:
> MMIO mux uses now regmap_init_mmio(), so one way or another
> CONFIG_REGMAP_MMIO should be enabled, because there are no stubs for
> !REGMAP_MMIO case:
>
> ERROR: modpost: "__regmap_init_mmio_clk" [drivers/mux/mux-mmio.ko] undefined!
>
> REGMAP_MMIO should be, because it is a non-visible symbol, but this
> causes a circular dependency:
>
> [...]
Applied, thanks!
[1/1] mux: mmio: Fix missing CONFIG_REGMAP_MMIO
https://git.kernel.org/krzk/linux/c/39bff565b40d26cc51f6e85b3b224c86a563367e
Best regards,
--
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] mux: mmio: Fix missing CONFIG_REGMAP_MMIO
2025-05-16 8:16 ` Krzysztof Kozlowski
@ 2025-05-16 8:26 ` Krzysztof Kozlowski
2025-05-16 8:58 ` Krzysztof Kozlowski
0 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-16 8:26 UTC (permalink / raw)
To: Peter Rosin, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Andrew Davis, linux-kernel, netdev
Cc: kernel test robot, Greg Kroah-Hartman, Samuel Holland,
Arnd Bergmann
On 16/05/2025 10:16, Krzysztof Kozlowski wrote:
>
> On Thu, 15 May 2025 16:05:56 +0200, Krzysztof Kozlowski wrote:
>> MMIO mux uses now regmap_init_mmio(), so one way or another
>> CONFIG_REGMAP_MMIO should be enabled, because there are no stubs for
>> !REGMAP_MMIO case:
>>
>> ERROR: modpost: "__regmap_init_mmio_clk" [drivers/mux/mux-mmio.ko] undefined!
>>
>> REGMAP_MMIO should be, because it is a non-visible symbol, but this
>> causes a circular dependency:
>>
>> [...]
>
> Applied, thanks!
>
> [1/1] mux: mmio: Fix missing CONFIG_REGMAP_MMIO
> https://git.kernel.org/krzk/linux/c/39bff565b40d26cc51f6e85b3b224c86a563367e
>
And dropped. More recursive dependencies are detected, so my fix here is
incomplete.
error: recursive dependency detected!
symbol REGMAP default is visible depending on REGMAP_MMIO
symbol REGMAP_MMIO is selected by MUX_MMIO
symbol MUX_MMIO depends on MULTIPLEXER
symbol MULTIPLEXER is selected by MDIO_BUS_MUX_MULTIPLEXER
symbol MDIO_BUS_MUX_MULTIPLEXER depends on MDIO_BUS
symbol MDIO_BUS is selected by REGMAP
https://krzk.eu/#/builders/43/builds/4855
That's a mess, I need work on this a bit more.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] mux: mmio: Fix missing CONFIG_REGMAP_MMIO
2025-05-16 8:26 ` Krzysztof Kozlowski
@ 2025-05-16 8:58 ` Krzysztof Kozlowski
2025-05-16 14:30 ` Andrew Davis
2025-05-16 15:55 ` Jakub Kicinski
0 siblings, 2 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-16 8:58 UTC (permalink / raw)
To: Peter Rosin, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Andrew Davis, linux-kernel, netdev,
Heiner Kallweit
Cc: kernel test robot, Greg Kroah-Hartman, Samuel Holland,
Arnd Bergmann
On 16/05/2025 10:26, Krzysztof Kozlowski wrote:
> On 16/05/2025 10:16, Krzysztof Kozlowski wrote:
>>
>> On Thu, 15 May 2025 16:05:56 +0200, Krzysztof Kozlowski wrote:
>>> MMIO mux uses now regmap_init_mmio(), so one way or another
>>> CONFIG_REGMAP_MMIO should be enabled, because there are no stubs for
>>> !REGMAP_MMIO case:
>>>
>>> ERROR: modpost: "__regmap_init_mmio_clk" [drivers/mux/mux-mmio.ko] undefined!
>>>
>>> REGMAP_MMIO should be, because it is a non-visible symbol, but this
>>> causes a circular dependency:
>>>
>>> [...]
>>
>> Applied, thanks!
>>
>> [1/1] mux: mmio: Fix missing CONFIG_REGMAP_MMIO
>> https://git.kernel.org/krzk/linux/c/39bff565b40d26cc51f6e85b3b224c86a563367e
>>
> And dropped. More recursive dependencies are detected, so my fix here is
> incomplete.
>
> error: recursive dependency detected!
> symbol REGMAP default is visible depending on REGMAP_MMIO
> symbol REGMAP_MMIO is selected by MUX_MMIO
> symbol MUX_MMIO depends on MULTIPLEXER
> symbol MULTIPLEXER is selected by MDIO_BUS_MUX_MULTIPLEXER
> symbol MDIO_BUS_MUX_MULTIPLEXER depends on MDIO_BUS
> symbol MDIO_BUS is selected by REGMAP
>
> https://krzk.eu/#/builders/43/builds/4855
>
> That's a mess, I need work on this a bit more.
My branch fails with above error because I do not have Heiner's commit
a3e1c0ad8357 ("net: phy: factor out provider part from mdio_bus.c").
Will it reach current RC (rc7) at some point? I could merge the tag to
my next branch to solve it.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] mux: mmio: Fix missing CONFIG_REGMAP_MMIO
2025-05-16 8:58 ` Krzysztof Kozlowski
@ 2025-05-16 14:30 ` Andrew Davis
2025-05-16 15:55 ` Jakub Kicinski
1 sibling, 0 replies; 9+ messages in thread
From: Andrew Davis @ 2025-05-16 14:30 UTC (permalink / raw)
To: Krzysztof Kozlowski, Peter Rosin, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, linux-kernel, netdev,
Heiner Kallweit
Cc: kernel test robot, Greg Kroah-Hartman, Samuel Holland,
Arnd Bergmann
On 5/16/25 3:58 AM, Krzysztof Kozlowski wrote:
> On 16/05/2025 10:26, Krzysztof Kozlowski wrote:
>> On 16/05/2025 10:16, Krzysztof Kozlowski wrote:
>>>
>>> On Thu, 15 May 2025 16:05:56 +0200, Krzysztof Kozlowski wrote:
>>>> MMIO mux uses now regmap_init_mmio(), so one way or another
>>>> CONFIG_REGMAP_MMIO should be enabled, because there are no stubs for
>>>> !REGMAP_MMIO case:
>>>>
>>>> ERROR: modpost: "__regmap_init_mmio_clk" [drivers/mux/mux-mmio.ko] undefined!
>>>>
>>>> REGMAP_MMIO should be, because it is a non-visible symbol, but this
>>>> causes a circular dependency:
>>>>
>>>> [...]
>>>
>>> Applied, thanks!
>>>
>>> [1/1] mux: mmio: Fix missing CONFIG_REGMAP_MMIO
>>> https://git.kernel.org/krzk/linux/c/39bff565b40d26cc51f6e85b3b224c86a563367e
>>>
>> And dropped. More recursive dependencies are detected, so my fix here is
>> incomplete.
>>
>> error: recursive dependency detected!
>> symbol REGMAP default is visible depending on REGMAP_MMIO
>> symbol REGMAP_MMIO is selected by MUX_MMIO
>> symbol MUX_MMIO depends on MULTIPLEXER
>> symbol MULTIPLEXER is selected by MDIO_BUS_MUX_MULTIPLEXER
>> symbol MDIO_BUS_MUX_MULTIPLEXER depends on MDIO_BUS
>> symbol MDIO_BUS is selected by REGMAP
>>
>> https://krzk.eu/#/builders/43/builds/4855
>>
>> That's a mess, I need work on this a bit more.
>
>
> My branch fails with above error because I do not have Heiner's commit
> a3e1c0ad8357 ("net: phy: factor out provider part from mdio_bus.c").
> Will it reach current RC (rc7) at some point? I could merge the tag to
> my next branch to solve it.
>
>
I took a shot at breaking this recursive dependency at the REGMAP config[0].
That should allow REGMAP_MMIO to be selected by MUX_MMIO without touching
stuff here in netdev.
Kconfig is a huge mess at this point, the golden rule of "select should be
used with care" is completely ignored, there are now more uses of select
in Linux Kconfig than the normal "depends on"! Might be time to add that
SAT solver..
Andrew
[0] https://www.spinics.net/lists/kernel/msg5687922.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] mux: mmio: Fix missing CONFIG_REGMAP_MMIO
2025-05-16 8:58 ` Krzysztof Kozlowski
2025-05-16 14:30 ` Andrew Davis
@ 2025-05-16 15:55 ` Jakub Kicinski
1 sibling, 0 replies; 9+ messages in thread
From: Jakub Kicinski @ 2025-05-16 15:55 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Peter Rosin, Andrew Lunn, David S. Miller, Eric Dumazet,
Paolo Abeni, Andrew Davis, linux-kernel, netdev, Heiner Kallweit,
kernel test robot, Greg Kroah-Hartman, Samuel Holland,
Arnd Bergmann
On Fri, 16 May 2025 10:58:38 +0200 Krzysztof Kozlowski wrote:
> My branch fails with above error because I do not have Heiner's commit
> a3e1c0ad8357 ("net: phy: factor out provider part from mdio_bus.c").
> Will it reach current RC (rc7) at some point?
No :( We merged it to net-next, so it will have to wait until the merge
window. Worst case you can double apply that change? Maybe git will be
clever enough to auto-resolve. Obviously only if absolutely necessary..
We could also try to sequence our PRs to Linus so that your changes
are rebased after net-next merge. We send our PR in the first day or
two of the MW.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-05-16 15:55 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-15 14:05 [PATCH] mux: mmio: Fix missing CONFIG_REGMAP_MMIO Krzysztof Kozlowski
2025-05-15 14:14 ` Krzysztof Kozlowski
2025-05-16 0:46 ` Jakub Kicinski
2025-05-15 15:30 ` Arnd Bergmann
2025-05-16 8:16 ` Krzysztof Kozlowski
2025-05-16 8:26 ` Krzysztof Kozlowski
2025-05-16 8:58 ` Krzysztof Kozlowski
2025-05-16 14:30 ` Andrew Davis
2025-05-16 15:55 ` Jakub Kicinski
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).