watchdog: simatic: add PCI dependency
PATCH 1/1 watchdog: simatic: add PCI dependency
From: Arnd Bergmann <[email protected]>
The simatic-ipc driver no longer depends on PCI, but its watchdog portion still needs it, otherwise P2SB runs into a build failure:
WARNING: unmet direct dependencies detected for P2SB
Depends on [n]: PCI [=n] && X86 [=y]
Selected by [m]:
- SIEMENS_SIMATIC_IPC_WDT [=m] && WATCHDOG [=y] && SIEMENS_SIMATIC_IPC [=y]
drivers/platform/x86/p2sb.c:121:3: error: call to undeclared function 'pci_bus_write_config_dword'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
pci_bus_write_config_dword(bus, devfn_p2sb, P2SBC, 0);
Add back the minimum dependendency to make it build in random configurations again.
--- drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/Kconfig +1 -1
@@ -1680,7 +1680,7 @@ config NIC7018_WDT config SIEMENS_SIMATIC_IPC_WDT tristate "Siemens Simatic IPC Watchdog" - depends on SIEMENS_SIMATIC_IPC + depends on SIEMENS_SIMATIC_IPC && PCI default y select WATCHDOG_CORE select P2SB
Signature · 1 line
2.39.2
Hi,
Quoted 10 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The simatic-ipc driver no longer depends on PCI, but its watchdog portion still needs it, otherwise P2SB runs into a build failure:
WARNING: unmet direct dependencies detected for P2SB
Depends on [n]: PCI [=n] && X86 [=y]
Selected by [m]:
-SIEMENS_SIMATIC_IPC_WDT[=m] && WATCHDOG [=y] &&SIEMENS_SIMATIC_IPC[=y]
Quoted 8 lines
drivers/platform/x86/p2sb.c:121:3: error: call to undeclared function 'pci_bus_write_config_dword'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]pci_bus_write_config_dword(bus, devfn_p2sb, P2SBC, 0);Add back the minimum dependendency to make it build in random configurations again.
Fixes b72da71ce24b0 ("platform/x86: simatic-ipc: drop PCI runtime depends and header")Signed-off-by Arnd Bergmann <[email protected]>
Thanks, patch looks good to me:
Wachdog maintainers the commit causing the fixed issue is part of my platform-drivers-x86-simatic-ipc branch:
And more importantly that branch already contains a conflicting commit to the SIEMENS_SIMATIC_IPC_WDT Kconfig entry, which was merged through that branch with Guenter's ack.
So I'll also pick up this fix and merge it through that branch to avoid conflicts.
Regards,
Hans
Quoted 17 lines
--- drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/watchdog/Kconfig +1
-1@@ -1680,7 +1680,7 @@ config NIC7018_WDT config SIEMENS_SIMATIC_IPC_WDT tristate "Siemens Simatic IPC Watchdog" - depends on SIEMENS_SIMATIC_IPC + depends on SIEMENS_SIMATIC_IPC && PCI default y select WATCHDOG_CORE select P2SB
Hi,
Quoted 10 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The simatic-ipc driver no longer depends on PCI, but its watchdog portion still needs it, otherwise P2SB runs into a build failure:
WARNING: unmet direct dependencies detected for P2SB
Depends on [n]: PCI [=n] && X86 [=y]
Selected by [m]:
-SIEMENS_SIMATIC_IPC_WDT[=m] && WATCHDOG [=y] &&SIEMENS_SIMATIC_IPC[=y]
Quoted 8 lines
drivers/platform/x86/p2sb.c:121:3: error: call to undeclared function 'pci_bus_write_config_dword'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]pci_bus_write_config_dword(bus, devfn_p2sb, P2SBC, 0);Add back the minimum dependendency to make it build in random configurations again.
Fixes b72da71ce24b0 ("platform/x86: simatic-ipc: drop PCI runtime depends and header")Signed-off-by Arnd Bergmann <[email protected]>
Thank you for your patch, I've applied this patch to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while.
Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window.
Regards,
Hans
Quoted 17 lines
--- drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/watchdog/Kconfig +1
-1@@ -1680,7 +1680,7 @@ config NIC7018_WDT config SIEMENS_SIMATIC_IPC_WDT tristate "Siemens Simatic IPC Watchdog" - depends on SIEMENS_SIMATIC_IPC + depends on SIEMENS_SIMATIC_IPC && PCI default y select WATCHDOG_CORE select P2SB
Hi
Quoted 4 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The simatic-ipc driver no longer depends on PCI, but its watchdog portion still needs it, otherwise P2SB runs into a build failure:
If the simatic-ipc driver no longer depends on PCI, you can delete the dependency here:
https://elixir.bootlin.com/linux/v6.5-rc6/source/drivers/platform/x86/Kconfig#L1079
Quoted 23 lines
WARNING: unmet direct dependencies detected for P2SB
Depends on [n]: PCI [=n] && X86 [=y]
Selected by [m]:
-SIEMENS_SIMATIC_IPC_WDT[=m] && WATCHDOG [=y] &&SIEMENS_SIMATIC_IPC[=y]
drivers/platform/x86/p2sb.c:121:3: error: call to undeclared function 'pci_bus_write_config_dword'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]pci_bus_write_config_dword(bus, devfn_p2sb, P2SBC, 0);Add back the minimum dependendency to make it build in random configurations again.
Fixes b72da71ce24b0 ("platform/x86: simatic-ipc: drop PCI runtime depends and header")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/watchdog/Kconfig +0
-0
drivers/watchdog/Kconfig config NIC7018_WDT · line 1683
Quoted 5 lines
drivers/watchdog/Kconfig +1
-1@@ -1680,7 +1680,7 @@ config NIC7018_WDT config SIEMENS_SIMATIC_IPC_WDT tristate "Siemens Simatic IPC Watchdog" - depends on SIEMENS_SIMATIC_IPC + depends on SIEMENS_SIMATIC_IPC && PCI
The SIEMENS_SIMATIC_IPC_WDT does not depends on PCI directly, it should depends on P2SB, then P2SB depends on PCI
drivers/watchdog/Kconfig config NIC7018_WDT · line 1686
Quoted 3 lines
drivers/watchdog/Kconfig +0
-0default y select WATCHDOG_CORE select P2SB
You can replace the "select" to "depends on" instead.
--
Xing Tong
Quoted 9 lines · xingtong.wu
drivers/watchdog/Kconfig config NIC7018_WDT · line 1683
Quoted 5 lines
config
SIEMENS_SIMATIC_IPC_WDTdrivers/watchdog/Kconfig +1
-1tristate "Siemens Simatic IPC Watchdog" - depends on SIEMENS_SIMATIC_IPC + depends on SIEMENS_SIMATIC_IPC && PCIThe
SIEMENS_SIMATIC_IPC_WDTdoes not depends on PCI directly, it should depends on P2SB, then P2SB depends on PCI
Quoted 5 lines
drivers/watchdog/Kconfig config NIC7018_WDT · line 1686
Quoted 3 lines
drivers/watchdog/Kconfig +0
-0default y select WATCHDOG_CORE select P2SBYou can replace the "select" to "depends on" instead.
That would also work, but it's generally best not to mix 'depends on' and 'select' for the same symbol. Changing all three 'select P2SB' to 'depends on P2SB', or removing the prompt to turn P2SB itself into a hidden symbol is probably a good follow-up patch, but I'd keep that separate from the regression fix.
Arnd
Hi,
Quoted 15 lines · Arnd Bergmann
Quoted 13 lines · xingtong.wu
drivers/watchdog/Kconfig config NIC7018_WDT · line 1683
Quoted 5 lines
config
SIEMENS_SIMATIC_IPC_WDTdrivers/watchdog/Kconfig +1
-1tristate "Siemens Simatic IPC Watchdog" - depends on SIEMENS_SIMATIC_IPC + depends on SIEMENS_SIMATIC_IPC && PCIThe
SIEMENS_SIMATIC_IPC_WDTdoes not depends on PCI directly, it should depends on P2SB, then P2SB depends on PCIQuoted 3 lines
drivers/watchdog/Kconfig +0
-0default y select WATCHDOG_CORE select P2SB
Quoted 8 lines
Quoted 1 line
You can replace the "select" to "depends on" instead.
That would also work, but it's generally best not to mix 'depends on' and 'select' for the same symbol. Changing all three 'select P2SB' to 'depends on P2SB', or removing the prompt to turn P2SB itself into a hidden symbol is probably a good follow-up patch, but I'd keep that separate from the regression fix.
Right P2SB would benefit from being changed into a hidden symbol.
Andy, any comments on making P2SB a hidden symbol ?
Regards,
Hans
Quoted 3 lines
Arnd
Quoted 1 line · Hans de Goede
On 8/14/23 10:48, Arnd Bergmann wrote:
...
Quoted 2 lines
Right P2SB would benefit from being changed into a hidden symbol.
Yes, I dunno why it wasn't that way from day 1. Perhaps due to the original contribution done by somebody else...
Quoted 1 line
Andy, any comments on making P2SB a hidden symbol ?
I'm fine with that.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi,
Quoted 8 lines · Andy Shevchenko
Quoted 1 line · Hans de Goede
On 8/14/23 10:48, Arnd Bergmann wrote:
...
Quoted 2 lines
Right P2SB would benefit from being changed into a hidden symbol.
Quoted 6 lines
Yes, I dunno why it wasn't that way from day 1. Perhaps due to the original contribution done by somebody else...
Quoted 1 line
Andy, any comments on making P2SB a hidden symbol ?
I'm fine with that.
Ok, can you submit a patch for this please ?
Regards,
Hans
Quoted 3 lines · Hans de Goede
Quoted 2 lines · Andy Shevchenko
Quoted 1 line · Hans de Goede
On 8/14/23 10:48, Arnd Bergmann wrote:
...
Quoted 11 lines
Quoted 9 lines
Quoted 2 lines
Right P2SB would benefit from being changed into a hidden symbol.
Yes, I dunno why it wasn't that way from day 1. Perhaps due to the original contribution done by somebody else...
Quoted 1 line
Andy, any comments on making P2SB a hidden symbol ?
I'm fine with that.
Ok, can you submit a patch for this please ?
Just sent.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi Xing Tong,
Quoted 11 lines · xingtong.wu
Hi
Quoted 4 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The simatic-ipc driver no longer depends on PCI, but its watchdog portion still needs it, otherwise P2SB runs into a build failure:
If the simatic-ipc driver no longer depends on PCI, you can delete the dependency here:
https://elixir.bootlin.com/linux/v6.5-rc6/source/drivers/platform/x86/Kconfig#L1079
That has already been done, the latest code of the simatic-ipc support lives here:
and there that depends on has been dropped, which is actually what is causing the issue this patch addresses.
Quoted 23 lines
Quoted 23 lines
WARNING: unmet direct dependencies detected for P2SB
Depends on [n]: PCI [=n] && X86 [=y]
Selected by [m]:
-SIEMENS_SIMATIC_IPC_WDT[=m] && WATCHDOG [=y] &&SIEMENS_SIMATIC_IPC[=y]
drivers/platform/x86/p2sb.c:121:3: error: call to undeclared function 'pci_bus_write_config_dword'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]pci_bus_write_config_dword(bus, devfn_p2sb, P2SBC, 0);Add back the minimum dependendency to make it build in random configurations again.
Fixes b72da71ce24b0 ("platform/x86: simatic-ipc: drop PCI runtime depends and header")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/watchdog/Kconfig +0
-0@@ -1680,7 +1680,7 @@ config NIC7018_WDT
Quoted 7 lines
drivers/watchdog/Kconfig config NIC7018_WDT · line 1683
Quoted 4 lines
drivers/watchdog/Kconfig +1
-1config SIEMENS_SIMATIC_IPC_WDT tristate "Siemens Simatic IPC Watchdog" - depends on SIEMENS_SIMATIC_IPC + depends on SIEMENS_SIMATIC_IPC && PCIThe
SIEMENS_SIMATIC_IPC_WDTdoes not depends on PCI directly, it should depends on P2SB, then P2SB depends on PCI
P2SB is a helper library and as such it is selected by all code which needs it and when selecting the Kconfig entry doing the selecting Kconfig must either depend on or select all the Kconfig dependencies of the Kconfig entry it is selecting.
Quoted 6 lines
drivers/watchdog/Kconfig config NIC7018_WDT · line 1686
Quoted 4 lines
drivers/watchdog/Kconfig +0
-0default y select WATCHDOG_CORE select P2SBYou can replace the "select" to "depends on" instead.
No that would mean that we start mixing select and depends on for P2SB, where as currently all users use select.
Mixing select and depends on is know to cause dependency cycle issues and thus should be avoided.
Arnd's patch is correct as is (and I have merged it this morning).
Regards,
Hans
Quoted 10 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The simatic-ipc driver no longer depends on PCI, but its watchdog portion still needs it, otherwise P2SB runs into a build failure:
WARNING: unmet direct dependencies detected for P2SB
Depends on [n]: PCI [=n] && X86 [=y]
Selected by [m]:
-SIEMENS_SIMATIC_IPC_WDT[=m] && WATCHDOG [=y] &&SIEMENS_SIMATIC_IPC[=y]
Quoted 8 lines
drivers/platform/x86/p2sb.c:121:3: error: call to undeclared function 'pci_bus_write_config_dword'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]pci_bus_write_config_dword(bus, devfn_p2sb, P2SBC, 0);Add back the minimum dependendency to make it build in random configurations again.
Fixes b72da71ce24b0 ("platform/x86: simatic-ipc: drop PCI runtime depends and header")Signed-off-by Arnd Bergmann <[email protected]>
Quoted 20 lines
--- drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/watchdog/Kconfig +1
-1@@ -1680,7 +1680,7 @@ config NIC7018_WDT config SIEMENS_SIMATIC_IPC_WDT tristate "Siemens Simatic IPC Watchdog" - depends on SIEMENS_SIMATIC_IPC + depends on SIEMENS_SIMATIC_IPC && PCI default y select WATCHDOG_CORE select P2SBSignature · 1 line
2.39.2