Skip to contentSkip to conversation

Fix COMPILE_TEST dependencies for CPM uart, TSA and QMC

PATCH Superseded Herve Codina 2 participants 6 messages May 22, 2023 – May 23, 2023

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Fix COMPILE_TEST dependencies for CPM uart, TSA and QMC

This series fixes issues raised by the kernel test robot
https://lore.kernel.org/oe-kbuild-all/[email protected]/

In COMPILE_TEST configurations, TSA and QMC need CONFIG_CPM to be set in order to compile and CPM uart needs CONFIG_CPM2.

Best regards,
Hervé

Herve Codina (2):
soc: fsl: cpm1: Fix TSA and QMC dependencies in case of COMPILE_TEST
serial: cpm_uart: Fix a COMPILE_TEST dependency

 drivers/soc/fsl/qe/Kconfig | 4 ++--
 drivers/tty/serial/Kconfig | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.40.1
#1 lore raw

PATCH 1/2 soc: fsl: cpm1: Fix TSA and QMC dependencies in case of COMPILE_TEST

In order to compile tsa.c and qmc.c, CONFIG_CPM must be set.

Without this dependency, the linker fails with some missing symbols for COMPILE_TEST configurations that need QMC without enabling CPM.

---
 drivers/soc/fsl/qe/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/soc/fsl/qe/Kconfig +2 -2
index 7268c2fbcbc1..e0d096607fef 100644
@@ -36,7 +36,7 @@ config UCC
 config CPM_TSA
 	tristate "CPM TSA support"
 	depends on OF && HAS_IOMEM
-	depends on CPM1 || COMPILE_TEST
+	depends on CPM1 || (CPM && COMPILE_TEST)
 	help
 	  Freescale CPM Time Slot Assigner (TSA)
 	  controller.
@@ -47,7 +47,7 @@ config CPM_TSA
 config CPM_QMC
 	tristate "CPM QMC support"
 	depends on OF && HAS_IOMEM
-	depends on CPM1 || (FSL_SOC && COMPILE_TEST)
+	depends on CPM1 || (FSL_SOC && CPM && COMPILE_TEST)
 	depends on CPM_TSA
 	help
 	  Freescale CPM QUICC Multichannel Controller
Signature · 1 line
2.40.1
#2 lore raw

PATCH 2/2 serial: cpm_uart: Fix a COMPILE_TEST dependency

In reply to Herve Codina

In a COMPILE_TEST configuration, the cpm_uart driver uses symbols from the cpm_uart_cpm2.c file. This file is compiled only when CONFIG_CPM2 is set.

Without this dependency, the linker fails with some missing symbols for COMPILE_TEST configuration that needs SERIAL_CPM without enabling CPM2.

Fixes e3e7b13bffae ("serial: allow COMPILE_TEST for some drivers")
---
 drivers/tty/serial/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/Kconfig +1 -1
index 625358f44419..68a9d9db9144 100644
@@ -769,7 +769,7 @@ config SERIAL_PMACZILOG_CONSOLE
 
 config SERIAL_CPM
 	tristate "CPM SCC/SMC serial port support"
-	depends on CPM2 || CPM1 || (PPC32 && COMPILE_TEST)
+	depends on CPM2 || CPM1 || (PPC32 && CPM2 && COMPILE_TEST)
 	select SERIAL_CORE
 	help
 	  This driver supports the SCC and SMC serial ports on Motorola 
Signature · 1 line
2.40.1
maintainer
#3 lore raw

Re: [PATCH 2/2] serial: cpm_uart: Fix a COMPILE_TEST dependency

Quoted 20 lines · Herve Codina

In a COMPILE_TEST configuration, the cpm_uart driver uses symbols from the cpm_uart_cpm2.c file. This file is compiled only when CONFIG_CPM2 is set.

Without this dependency, the linker fails with some missing symbols for COMPILE_TEST configuration that needs SERIAL_CPM without enabling CPM2.

Fixes e3e7b13bffae ("serial: allow COMPILE_TEST for some drivers")
---
  drivers/tty/serial/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/Kconfig +0 -0
index 625358f44419..68a9d9db9144 100644

drivers/tty/serial/Kconfig config SERIAL_PMACZILOG_CONSOLE · line 772

Quoted 5 lines
drivers/tty/serial/Kconfig +1 -1
@@ -769,7 +769,7 @@ config SERIAL_PMACZILOG_CONSOLE
 
  config SERIAL_CPM
  	tristate "CPM SCC/SMC serial port support"
-	depends on CPM2 || CPM1 || (PPC32 && COMPILE_TEST)
+	depends on CPM2 || CPM1 || (PPC32 && CPM2 && COMPILE_TEST)

Actually, does this makes sense? I mean, the last part after "||" is now superfluous and doesn't help anything, right?

Quoted 3 lines
drivers/tty/serial/Kconfig +0 -0
  	select SERIAL_CORE
  	help
  	  This driver supports the SCC and SMC serial ports on Motorola
Signature · 1 line
js
#4 lore raw

Re: [PATCH 2/2] serial: cpm_uart: Fix a COMPILE_TEST dependency

Quoted 22 lines · On Tue, 23 May 2023 09:52:00 +0200 Jiri Slaby <[email protected]> wrote:
Quoted 21 lines · Herve Codina

In a COMPILE_TEST configuration, the cpm_uart driver uses symbols from the cpm_uart_cpm2.c file. This file is compiled only when CONFIG_CPM2 is set.

Without this dependency, the linker fails with some missing symbols for COMPILE_TEST configuration that needs SERIAL_CPM without enabling CPM2.

Fixes e3e7b13bffae ("serial: allow COMPILE_TEST for some drivers")
---
  drivers/tty/serial/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/Kconfig +0 -0
index 625358f44419..68a9d9db9144 100644
@@ -769,7 +769,7 @@ config SERIAL_PMACZILOG_CONSOLE
 
Quoted 7 lines

drivers/tty/serial/Kconfig config SERIAL_PMACZILOG_CONSOLE · line 772

Quoted 4 lines
drivers/tty/serial/Kconfig +1 -1
  config SERIAL_CPM
  	tristate "CPM SCC/SMC serial port support"
-	depends on CPM2 || CPM1 || (PPC32 && COMPILE_TEST)
+	depends on CPM2 || CPM1 || (PPC32 && CPM2 && COMPILE_TEST)  

Actually, does this makes sense? I mean, the last part after "||" is now superfluous and doesn't help anything, right?

Indeed, I will remove all the (PPC32 && CPM2 && COMPILE_TEST) in the next iteration.
I will also remove the '#elif defined(CONFIG_COMPILE_TEST)' case in the cpm_uart.h file.

Best regards,
Hervé

Quoted 5 lines

drivers/tty/serial/Kconfig config SERIAL_PMACZILOG_CONSOLE · line 775

Quoted 4 lines
drivers/tty/serial/Kconfig +0 -0
  	select SERIAL_CORE
  	help
  	  This driver supports the SCC and SMC serial ports on Motorola  

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer
#5 lore raw
In reply to Herve Codina
Quoted 5 lines · Herve Codina

This series fixes issues raised by the kernel test robot
https://lore.kernel.org/oe-kbuild-all/[email protected]/

In COMPILE_TEST configurations, TSA and QMC need CONFIG_CPM to be set in order to compile and CPM uart needs CONFIG_CPM2.

Ah, perfect. Greg, please disregard my revert posted at:
https://lore.kernel.org/all/[email protected]/

and take these instead.

Thanks.

Quoted 11 lines

Best regards,
Hervé

Herve Codina (2):
soc: fsl: cpm1: Fix TSA and QMC dependencies in case of COMPILE_TEST
serial: cpm_uart: Fix a COMPILE_TEST dependency

  drivers/soc/fsl/qe/Kconfig | 4 ++--
  drivers/tty/serial/Kconfig | 2 +-
  2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 7 lines
js


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel