Skip to contentSkip to conversation

ssb: relax SSB_EMBEDDED dependencies

RFC PATCH In review Randy Dunlap 2 participants 7 messages Oct 7, 2023 – Oct 12, 2023 Sonics silicon backplane driver (ssb)

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 ssb: relax SSB_EMBEDDED dependencies

This is a kconfig warning in a randconfig when CONFIG_PCI is not set:

WARNING: unmet direct dependencies detected for SSB_EMBEDDED
Depends on [n]: SSB [=y] && SSB_DRIVER_MIPS [=y] && SSB_PCICORE_HOSTMODE [=n] Selected by [y]:
- BCM47XX_SSB [=y] && BCM47XX [=y]

This is caused by arch/mips/bcm47xx/Kconfig's symbol BCM47XX_SSB selecting SSB_EMBEDDED when CONFIG_PCI is not set.

This warning can be prevented by having SSB_EMBEDDED not depend on SSB_PCICORE_HOSTMODE, although some parts of SSB use PCI.

---
Comments, thoughts?

I also tried changing arch/mips/bcm47xx/Kconfig's BCM47XX_SSB to
select SSB_EMBEDDED if PCI
but that results in build errors.

 drivers/ssb/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ssb/Kconfig +1 -1
diff -- a/drivers/ssb/Kconfig b/drivers/ssb/Kconfig
@@ -134,7 +134,7 @@ config SSB_SFLASH
 # Assumption: We are on embedded, if we compile the MIPS core.
 config SSB_EMBEDDED
 	bool
-	depends on SSB_DRIVER_MIPS && SSB_PCICORE_HOSTMODE
+	depends on SSB_DRIVER_MIPS
 	default y
 
 config SSB_DRIVER_EXTIF
maintainer
#1 lore raw

Hi Randy,

thanks for the patch.

Quoted 17 lines · On Sat, 7 Oct 2023 11:24:43 -0700 Randy Dunlap <[email protected]> wrote:

This is a kconfig warning in a randconfig when CONFIG_PCI is not set:

WARNING: unmet direct dependencies detected for SSB_EMBEDDED
Depends on [n]: SSB [=y] && SSB_DRIVER_MIPS [=y] &&
SSB_PCICORE_HOSTMODE [=n] Selected by [y]:
- BCM47XX_SSB [=y] && BCM47XX [=y]

This is caused by arch/mips/bcm47xx/Kconfig's symbol BCM47XX_SSB selecting SSB_EMBEDDED when CONFIG_PCI is not set.

This warning can be prevented by having SSB_EMBEDDED not depend on SSB_PCICORE_HOSTMODE, although some parts of SSB use PCI.

diff -- a/drivers/ssb/Kconfig b/drivers/ssb/Kconfig

drivers/ssb/Kconfig config SSB_SFLASH · line 140

Quoted 8 lines
drivers/ssb/Kconfig +1 -1
@@ -134,7 +134,7 @@ config SSB_SFLASH
 # Assumption: We are on embedded, if we compile the MIPS core.
 config SSB_EMBEDDED
 	bool
-	depends on SSB_DRIVER_MIPS && SSB_PCICORE_HOSTMODE
+	depends on SSB_DRIVER_MIPS
 	default y
 
 config SSB_DRIVER_EXTIF

Could we instead make SSB_EMBEDDED depend on SSB_PCICORE_HOSTMODE if PCI!=n. Wouldn't that also solve the problem?

I don't fully remember how all this ssb config stuff works, but to me adding a PCICORE->PCI dependency sounds safer against build regressions in some other configurations.

What do you think?

Signature · 2 lines
Michael Büsch
https://bues.ch/
#2 lore raw
Quoted 36 lines · Michael Büsch

Hi Randy,

thanks for the patch.

Quoted 17 lines · On Sat, 7 Oct 2023 11:24:43 -0700 Randy Dunlap <[email protected]> wrote:

This is a kconfig warning in a randconfig when CONFIG_PCI is not set:

WARNING: unmet direct dependencies detected for SSB_EMBEDDED
Depends on [n]: SSB [=y] && SSB_DRIVER_MIPS [=y] &&
SSB_PCICORE_HOSTMODE [=n] Selected by [y]:
- BCM47XX_SSB [=y] && BCM47XX [=y]

This is caused by arch/mips/bcm47xx/Kconfig's symbol BCM47XX_SSB selecting SSB_EMBEDDED when CONFIG_PCI is not set.

This warning can be prevented by having SSB_EMBEDDED not depend on SSB_PCICORE_HOSTMODE, although some parts of SSB use PCI.

diff -- a/drivers/ssb/Kconfig b/drivers/ssb/Kconfig

drivers/ssb/Kconfig config SSB_SFLASH · line 140

Quoted 8 lines
drivers/ssb/Kconfig +1 -1
@@ -134,7 +134,7 @@ config SSB_SFLASH
 # Assumption: We are on embedded, if we compile the MIPS core.
 config SSB_EMBEDDED
 	bool
-	depends on SSB_DRIVER_MIPS && SSB_PCICORE_HOSTMODE
+	depends on SSB_DRIVER_MIPS
 	default y
 
 config SSB_DRIVER_EXTIF

Could we instead make SSB_EMBEDDED depend on SSB_PCICORE_HOSTMODE if PCI!=n. Wouldn't that also solve the problem?

Quoted 5 lines

I don't fully remember how all this ssb config stuff works, but to me adding a PCICORE->PCI dependency sounds safer against build regressions in some other configurations.

What do you think?

I'll test it some and see how it works out.
Thanks.

Signature · 1 line
~Randy
#3 lore raw

Hi Michael,

Quoted 39 lines · Randy Dunlap
Quoted 36 lines · Michael Büsch

Hi Randy,

thanks for the patch.

Quoted 17 lines · On Sat, 7 Oct 2023 11:24:43 -0700 Randy Dunlap <[email protected]> wrote:

This is a kconfig warning in a randconfig when CONFIG_PCI is not set:

WARNING: unmet direct dependencies detected for SSB_EMBEDDED
Depends on [n]: SSB [=y] && SSB_DRIVER_MIPS [=y] &&
SSB_PCICORE_HOSTMODE [=n] Selected by [y]:
- BCM47XX_SSB [=y] && BCM47XX [=y]

This is caused by arch/mips/bcm47xx/Kconfig's symbol BCM47XX_SSB selecting SSB_EMBEDDED when CONFIG_PCI is not set.

This warning can be prevented by having SSB_EMBEDDED not depend on SSB_PCICORE_HOSTMODE, although some parts of SSB use PCI.

diff -- a/drivers/ssb/Kconfig b/drivers/ssb/Kconfig

drivers/ssb/Kconfig config SSB_SFLASH · line 140

Quoted 8 lines
drivers/ssb/Kconfig +1 -1
@@ -134,7 +134,7 @@ config SSB_SFLASH
 # Assumption: We are on embedded, if we compile the MIPS core.
 config SSB_EMBEDDED
 	bool
-	depends on SSB_DRIVER_MIPS && SSB_PCICORE_HOSTMODE
+	depends on SSB_DRIVER_MIPS
 	default y
 
 config SSB_DRIVER_EXTIF

Could we instead make SSB_EMBEDDED depend on SSB_PCICORE_HOSTMODE if PCI!=n. Wouldn't that also solve the problem?

Quoted 8 lines
Quoted 5 lines

I don't fully remember how all this ssb config stuff works, but to me adding a PCICORE->PCI dependency sounds safer against build regressions in some other configurations.

What do you think?

I'll test it some and see how it works out.
Thanks.

The following change seems to work and passes some testing. Is this what you had in mind?
Thanks.

---

---
 drivers/ssb/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ssb/Kconfig +1 -1
diff -- a/drivers/ssb/Kconfig b/drivers/ssb/Kconfig
@@ -134,7 +134,7 @@ config SSB_SFLASH
 # Assumption: We are on embedded, if we compile the MIPS core.
 config SSB_EMBEDDED
 	bool
-	depends on SSB_DRIVER_MIPS && SSB_PCICORE_HOSTMODE
+	depends on PCI=n || SSB_PCICORE_HOSTMODE
 	default y
 
 config SSB_DRIVER_EXTIF
maintainer
#4 lore raw

drivers/ssb/Kconfig config SSB_SFLASH · line 137

Quoted 2 lines · On Sun, 8 Oct 2023 23:12:49 -0700 Randy Dunlap <[email protected]> wrote:
drivers/ssb/Kconfig +1 -1
-	depends on SSB_DRIVER_MIPS && SSB_PCICORE_HOSTMODE
+	depends on PCI=n || SSB_PCICORE_HOSTMODE

I thought about something like this:

depends on (SSB_DRIVER_MIPS && PCI=n) || (SSB_DRIVER_MIPS && SSB_PCICORE_HOSTMODE)

Would that solve the warning?

Signature · 2 lines
Michael Büsch
https://bues.ch/
#5 lore raw

Hi Michael,

Quoted 11 lines · Michael Büsch

drivers/ssb/Kconfig config SSB_SFLASH · line 137

Quoted 2 lines · On Sun, 8 Oct 2023 23:12:49 -0700 Randy Dunlap <[email protected]> wrote:
drivers/ssb/Kconfig +1 -1
-	depends on SSB_DRIVER_MIPS && SSB_PCICORE_HOSTMODE
+	depends on PCI=n || SSB_PCICORE_HOSTMODE

I thought about something like this:

depends on (SSB_DRIVER_MIPS && PCI=n) || (SSB_DRIVER_MIPS && SSB_PCICORE_HOSTMODE)

Would that solve the warning?

Yes, that works as well, although I prefer to express it like this:

config SSB_EMBEDDED
bool
- depends on SSB_DRIVER_MIPS && SSB_PCICORE_HOSTMODE
+ depends on SSB_DRIVER_MIPS
+ depends on PCI=n || SSB_PCICORE_HOSTMODE
default y

although if you prefer the way that you have it above, I'm OK with that also.

Thanks for your help.

Signature · 1 line
~Randy
maintainer Acked-by
#6 lore raw
Quoted 10 lines · On Wed, 11 Oct 2023 20:44:49 -0700 Randy Dunlap <[email protected]> wrote:
Quoted 6 lines

I thought about something like this:

depends on (SSB_DRIVER_MIPS && PCI=n) || (SSB_DRIVER_MIPS && SSB_PCICORE_HOSTMODE)

Would that solve the warning?

Yes, that works as well, although I prefer to express it like this:

config SSB_EMBEDDED

drivers/ssb/Kconfig config SSB_SFLASH · line 138

Quoted 5 lines
drivers/ssb/Kconfig +2 -1
 	bool
-	depends on SSB_DRIVER_MIPS && SSB_PCICORE_HOSTMODE
+	depends on SSB_DRIVER_MIPS
+	depends on PCI=n || SSB_PCICORE_HOSTMODE
 	default y
Signature · 2 lines
Michael Büsch
https://bues.ch/