Revert "ssb: Prevent build of PCI host features in module"
PATCH 1/2 Revert "ssb: Prevent build of PCI host features in module"
From: Rafał Miłecki <[email protected]>
This reverts commit 882164a4a928bcaa53280940436ca476e6b1db8e.
Above commit added "SSB = y" dependency to the wrong symbol SSB_DRIVER_PCICORE_POSSIBLE and prevented SSB_DRIVER_PCICORE from being selected when needed. PCI core driver for core running in clienthost mode is important for bus initialization. It's perfectly valid scenario to have ssb built as module and use it with buses on PCI cards.
This fixes regression that affected all *module* users with PCI cards.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1572349
--- drivers/ssb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ssb/Kconfig +1 -1
@@ -117,7 +117,7 @@ config SSB_SERIAL config SSB_DRIVER_PCICORE_POSSIBLE bool - depends on SSB_PCIHOST && SSB = y + depends on SSB_PCIHOST default y config SSB_DRIVER_PCICORE
Signature · 1 line
2.13.6
PATCH 2/2 ssb: make SSB_PCICORE_HOSTMODE depend on SSB = y
From: Rafał Miłecki <[email protected]>
SSB_PCICORE_HOSTMODE protects MIPS specific code that calls not exported symbols pcibios_enable_device and register_pci_controller. This code is supposed to be compiled only with ssb builtin.
This fixes:
ERROR: "pcibios_enable_device" [drivers/ssb/ssb.ko] undefined!
ERROR: "register_pci_controller" [drivers/ssb/ssb.ko] undefined! make[1]: *** [scripts/Makefile.modpost:92: __modpost] Error 1
--- drivers/ssb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ssb/Kconfig +1 -1
@@ -131,7 +131,7 @@ config SSB_DRIVER_PCICORE config SSB_PCICORE_HOSTMODE bool "Hostmode support for SSB PCI core" - depends on SSB_DRIVER_PCICORE && SSB_DRIVER_MIPS + depends on SSB_DRIVER_PCICORE && SSB_DRIVER_MIPS && SSB = y help PCIcore hostmode operation (external PCI bus).
Signature · 1 line
2.13.6
Michael Büsch
maintainerRe: [PATCH 4.17 2/2] ssb: make SSB_PCICORE_HOSTMODE depend on SSB = y
Quoted 21 lines · On Thu, 10 May 2018 13:14:01 +0200 Rafał Miłecki <[email protected]> wrote:
From: Rafał Miłecki <[email protected]>
SSB_PCICORE_HOSTMODEprotects MIPS specific code that calls not exported symbolspcibios_enable_deviceandregister_pci_controller. This code is supposed to be compiled only with ssb builtin.This fixes:
ERROR: "pcibios_enable_device" [drivers/ssb/ssb.ko] undefined!
ERROR: "register_pci_controller" [drivers/ssb/ssb.ko] undefined! make[1]: *** [scripts/Makefile.modpost:92:__modpost] Error 1Signed-off-by Rafał Miłecki <[email protected]>--- drivers/ssb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/ssb/Kconfig +0
-0
drivers/ssb/Kconfig config SSB_DRIVER_PCICORE · line 137
Quoted 8 lines
drivers/ssb/Kconfig +1
-1@@ -131,7 +131,7 @@ config SSB_DRIVER_PCICORE config SSB_PCICORE_HOSTMODE bool "Hostmode support for SSB PCI core" - depends on SSB_DRIVER_PCICORE && SSB_DRIVER_MIPS + depends on SSB_DRIVER_PCICORE && SSB_DRIVER_MIPS && SSB = y help PCIcore hostmode operation (external PCI bus).
I think we also need to depend on PCI_DRIVERS_LEGACY. See the other patch that floats around.
Signature · 1 line
Michael
Re: [PATCH 4.17 2/2] ssb: make SSB_PCICORE_HOSTMODE depend on SSB = y
Quoted 25 lines · On 10 May 2018 at 13:17, Michael B=C3=BCsch <[email protected]> wrote:
Quoted 22 lines · On Thu, 10 May 2018 13:14:01 +0200 Rafa=C5=82 Mi=C5=82ecki <[email protected]>…
From: Rafa=C5=82 Mi=C5=82ecki <[email protected]>
SSB_PCICORE_HOSTMODEprotects MIPS specific code that calls not exported symbolspcibios_enable_deviceandregister_pci_controller. This code is supposed to be compiled only with ssb builtin.This fixes:
ERROR: "pcibios_enable_device" [drivers/ssb/ssb.ko] undefined!
ERROR: "register_pci_controller" [drivers/ssb/ssb.ko] undefined! make[1]: *** [scripts/Makefile.modpost:92:__modpost] Error 1Signed-off-by Rafa=C5=82 Mi=C5=82ecki <[email protected]>--- drivers/ssb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/ssb/Kconfig +0
-0@@ -131,7 +131,7 @@ config SSB_DRIVER_PCICORE
Quoted 11 lines
drivers/ssb/Kconfig config SSB_DRIVER_PCICORE · line 137
Quoted 7 lines
drivers/ssb/Kconfig +1
-1config SSB_PCICORE_HOSTMODE bool "Hostmode support for SSB PCI core" - depends on SSB_DRIVER_PCICORE && SSB_DRIVER_MIPS + depends on SSB_DRIVER_PCICORE && SSB_DRIVER_MIPS && SSB =3D y help PCIcore hostmode operation (external PCI bus).I think we also need to depend on
PCI_DRIVERS_LEGACY. See the other patch that floats around.
I believe it's already handled by SSB_PCIHOST_POSSIBLE's dependency on PCI_DRIVERS_LEGACY.
--=20
Rafa=C5=82
Michael Büsch
maintainerRe: [PATCH 4.17 2/2] ssb: make SSB_PCICORE_HOSTMODE depend on SSB = y
Quoted 38 lines · On Thu, 10 May 2018 13:20:01 +0200 Rafał Miłecki <[email protected]> wrote:
Quoted 25 lines · Michael Büsch
Quoted 22 lines · On Thu, 10 May 2018 13:14:01 +0200 Rafał Miłecki <[email protected]> wrote:
From: Rafał Miłecki <[email protected]>
SSB_PCICORE_HOSTMODEprotects MIPS specific code that calls not exported symbolspcibios_enable_deviceandregister_pci_controller. This code is supposed to be compiled only with ssb builtin.This fixes:
ERROR: "pcibios_enable_device" [drivers/ssb/ssb.ko] undefined!
ERROR: "register_pci_controller" [drivers/ssb/ssb.ko] undefined! make[1]: *** [scripts/Makefile.modpost:92:__modpost] Error 1Signed-off-by Rafał Miłecki <[email protected]>--- drivers/ssb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/ssb/Kconfig +0
-0@@ -131,7 +131,7 @@ config SSB_DRIVER_PCICOREQuoted 11 lines
drivers/ssb/Kconfig config SSB_DRIVER_PCICORE · line 137
Quoted 7 lines
drivers/ssb/Kconfig +1
-1config SSB_PCICORE_HOSTMODE bool "Hostmode support for SSB PCI core" - depends on SSB_DRIVER_PCICORE && SSB_DRIVER_MIPS + depends on SSB_DRIVER_PCICORE && SSB_DRIVER_MIPS && SSB = y help PCIcore hostmode operation (external PCI bus).I think we also need to depend on
PCI_DRIVERS_LEGACY. See the other patch that floats around.
Quoted 2 lines
I believe it's already handled by SSB_PCIHOST_POSSIBLE's dependency on
PCI_DRIVERS_LEGACY.
That dependency seems to be wrong there.
Was it added among some other "let's just unbreak some random build" change as well?
SSB_PCIHOST enables support for SSB on top of PCI. (Which is 99% of it uses). I don't see how this uses the legacy API.
SSB_PCICORE_HOSTMODE enables PCI on top of SSB. Which is a MIPS corner case. This uses the legacy MIPS API to register a PCI bus.
Signature · 1 line
Michael
Re: [PATCH 4.17 2/2] ssb: make SSB_PCICORE_HOSTMODE depend on SSB = y
Hi,
Quoted 41 lines · Michael Büsch
Quoted 38 lines · On Thu, 10 May 2018 13:20:01 +0200 Rafał Miłecki <[email protected]> wrote:
Quoted 36 lines · Michael Büsch
Quoted 21 lines · On Thu, 10 May 2018 13:14:01 +0200 Rafał Miłecki <[email protected]> wrote:
From: Rafał Miłecki <[email protected]>
SSB_PCICORE_HOSTMODEprotects MIPS specific code that calls not exported symbolspcibios_enable_deviceandregister_pci_controller. This code is supposed to be compiled only with ssb builtin.This fixes:
ERROR: "pcibios_enable_device" [drivers/ssb/ssb.ko] undefined!
ERROR: "register_pci_controller" [drivers/ssb/ssb.ko] undefined! make[1]: *** [scripts/Makefile.modpost:92:__modpost] Error 1Signed-off-by Rafał Miłecki <[email protected]>--- drivers/ssb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/ssb/Kconfig +0
-0drivers/ssb/Kconfig config SSB_DRIVER_PCICORE · line 137
Quoted 8 lines
drivers/ssb/Kconfig +1
-1@@ -131,7 +131,7 @@ config SSB_DRIVER_PCICORE config SSB_PCICORE_HOSTMODE bool "Hostmode support for SSB PCI core" - depends on SSB_DRIVER_PCICORE && SSB_DRIVER_MIPS + depends on SSB_DRIVER_PCICORE && SSB_DRIVER_MIPS && SSB = y help PCIcore hostmode operation (external PCI bus).I think we also need to depend on
PCI_DRIVERS_LEGACY. See the other patch that floats around.
Quoted 7 lines
Quoted 2 lines
I believe it's already handled by SSB_PCIHOST_POSSIBLE's dependency on
PCI_DRIVERS_LEGACY.That dependency seems to be wrong there.
Was it added among some other "let's just unbreak some random build" change as well?
Yeah - that was commit 58eae1416b80 ("ssb: Disable PCI host for PCI_DRIVERS_GENERIC").
Quoted 7 lines
SSB_PCIHOSTenables support for SSB on top of PCI. (Which is 99% of it uses). I don't see how this uses the legacy API.
SSB_PCICORE_HOSTMODEenables PCI on top of SSB. Which is a MIPS corner case. This uses the legacy MIPS API to register a PCI bus.
Yeah the dependency would seem to be in the wrong place and should be on SSB_PCICORE_HOSTMODE, in the same way as the bcma driver - commits 664eadd6f44b ("bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets") & 79ca239a68f8 ("bcma: Prevent build of PCI host features in module").
Thanks,
Matt
Re: [PATCH 4.17 2/2] ssb: make SSB_PCICORE_HOSTMODE depend on SSB = y
In reply to Michael BüschQuoted 10 lines · On 10 May 2018 at 13:26, Michael B=C3=BCsch <[email protected]> wrote:
Quoted 7 lines · On Thu, 10 May 2018 13:20:01 +0200 Rafa=C5=82 Mi=C5=82ecki <[email protected]>…
Quoted 6 lines · On 10 May 2018 at 13:17, Michael B=C3=BCsch <[email protected]> wrote:
Quoted 3 lines · On Thu, 10 May 2018 13:14:01 +0200 Rafa=C5=82 Mi=C5=82ecki <[email protected]>…
From: Rafa=C5=82 Mi=C5=82ecki <[email protected]>
SSB_PCICORE_HOSTMODEprotects MIPS specific code that calls not expor=
ted
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
symbols
pcibios_enable_deviceandregister_pci_controller. This code =
is
Quoted 30 lines
Quoted 30 lines
Quoted 29 lines
Quoted 17 lines
supposed to be compiled only with ssb builtin.
This fixes:
ERROR: "pcibios_enable_device" [drivers/ssb/ssb.ko] undefined!
ERROR: "register_pci_controller" [drivers/ssb/ssb.ko] undefined! make[1]: *** [scripts/Makefile.modpost:92:__modpost] Error 1Signed-off-by Rafa=C5=82 Mi=C5=82ecki <[email protected]>--- drivers/ssb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/ssb/Kconfig +0
-0drivers/ssb/Kconfig config SSB_DRIVER_PCICORE · line 137
Quoted 8 lines
drivers/ssb/Kconfig +1
-1@@ -131,7 +131,7 @@ config SSB_DRIVER_PCICORE config SSB_PCICORE_HOSTMODE bool "Hostmode support for SSB PCI core" - depends on SSB_DRIVER_PCICORE && SSB_DRIVER_MIPS + depends on SSB_DRIVER_PCICORE && SSB_DRIVER_MIPS && SSB =3D y help PCIcore hostmode operation (external PCI bus).I think we also need to depend on
PCI_DRIVERS_LEGACY. See the other patch that floats around.
Quoted 7 lines
Quoted 2 lines
I believe it's already handled by SSB_PCIHOST_POSSIBLE's dependency on
PCI_DRIVERS_LEGACY.That dependency seems to be wrong there.
Was it added among some other "let's just unbreak some random build" change as well?
I guess so.
Quoted 5 lines
SSB_PCIHOSTenables support for SSB on top of PCI. (Which is 99% of it uses). I don't see how this uses the legacy API.
SSB_PCICORE_HOSTMODEenables PCI on top of SSB. Which is a MIPS corner case. This uses the legacy MIPS API to register a PCI bus.
I agree current dependency on PCI_DRIVERS_LEGACY doesn't make sense. It doesn't break thing though, thanks to the || !MIPS. I'm going to fix that up in separated patch.
--=20
Rafa=C5=82
Re: [PATCH 4.17 2/2] ssb: make SSB_PCICORE_HOSTMODE depend on SSB = y
In reply to Rafał MiłeckiQuoted 6 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
SSB_PCICORE_HOSTMODEprotects MIPS specific code that calls not exported symbolspcibios_enable_deviceandregister_pci_controller. This code is supposed to be compiled only with ssb builtin.
Quoted 6 lines
This fixes:
ERROR: "pcibios_enable_device" [drivers/ssb/ssb.ko] undefined!
ERROR: "register_pci_controller" [drivers/ssb/ssb.ko] undefined! make[1]: *** [scripts/Makefile.modpost:92:__modpost] Error 1Signed-off-by Rafał Miłecki <[email protected]>
This patch needs a "Reported-by: Matt Redfearn <[email protected]>".
Applying both patches leads to a correct configuration for PCI. I cannot test on my present hardware, but the patches seem to be correct.
@Kalle: Please drop my patch from yesterday. This solution is much better.
Larry
Quoted 18 lines
--- drivers/ssb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/ssb/Kconfig +1
-1@@ -131,7 +131,7 @@ config SSB_DRIVER_PCICORE config SSB_PCICORE_HOSTMODE bool "Hostmode support for SSB PCI core" - depends on SSB_DRIVER_PCICORE && SSB_DRIVER_MIPS + depends on SSB_DRIVER_PCICORE && SSB_DRIVER_MIPS && SSB = y help PCIcore hostmode operation (external PCI bus).
Re: [PATCH 4.17 2/2] ssb: make SSB_PCICORE_HOSTMODE depend on SSB = y
Quoted 16 lines · Larry Finger
Quoted 6 lines · On 05/10/2018 06:14 AM, Rafa=C5=82 Mi=C5=82ecki wrote:
From: Rafa=C5=82 Mi=C5=82ecki <[email protected]>
SSB_PCICORE_HOSTMODEprotects MIPS specific code that calls not exported symbolspcibios_enable_deviceandregister_pci_controller. This code is supposed to be compiled only with ssb builtin.Quoted 6 lines
This fixes:
ERROR: "pcibios_enable_device" [drivers/ssb/ssb.ko] undefined!
ERROR: "register_pci_controller" [drivers/ssb/ssb.ko] undefined! make[1]: *** [scripts/Makefile.modpost:92:__modpost] Error 1Signed-off-by Rafa=C5=82 Mi=C5=82ecki <[email protected]>This patch needs a "Reported-by: Matt Redfearn <[email protected]>".
Quoted 7 lines
Applying both patches leads to a correct configuration for PCI. I cannot test on my present hardware, but the patches seem to be correct.
Reviewed-by Larry Finger <[email protected]>@Kalle: Please drop my patch from yesterday. This solution is much better.
Dropped, thanks for letting me know.
--=20
Kalle Valo