Skip to contentSkip to conversation

firmware: imx: Add stubs for !CONFIG_IMX_SCU case

PATCH Applied Anson Huang 5 participants 37 messages Mar 9, 2020 – Mar 17, 2020

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/7 firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Add stubs for those i.MX SCU APIs to make those modules depending on IMX_SCU can pass build when COMPILE_TEST is enabled.

---
Changes since V2:
- return error for stubs.

---
 include/linux/firmware/imx/ipc.h | 11 +++++++++++
 include/linux/firmware/imx/sci.h | 19 +++++++++++++++++++
 2 files changed, 30 insertions(+)
include/linux/firmware/imx/ipc.h +11 -0
index 8910574..9e3d808 100644
@@ -34,6 +34,7 @@ struct imx_sc_rpc_msg {
 	uint8_t func;
 };
 
+#ifdef CONFIG_IMX_SCU
 /*
  * This is an function to send an RPC message over an IPC channel.
  * It is called by client-side SCFW API function shims.
@@ -55,4 +56,14 @@ int imx_scu_call_rpc(struct imx_sc_ipc *ipc, void *msg, bool have_resp);
  * @return Returns an error code (0 = success, failed if < 0)
  */
 int imx_scu_get_handle(struct imx_sc_ipc **ipc);
+#else
+static inline int imx_scu_call_rpc(struct imx_sc_ipc *ipc, void *msg, bool have_resp)
+{
+	return -ENOENT;
+}
+static inline int imx_scu_get_handle(struct imx_sc_ipc **ipc)
+{
+	return -ENOENT;
+}
+#endif
 #endif /* _SC_IPC_H */
include/linux/firmware/imx/sci.h +19 -0
index 17ba4e4..022129b 100644
@@ -16,8 +16,27 @@
 #include <linux/firmware/imx/svc/misc.h>
 #include <linux/firmware/imx/svc/pm.h>
 
+#ifdef CONFIG_IMX_SCU
 int imx_scu_enable_general_irq_channel(struct device *dev);
 int imx_scu_irq_register_notifier(struct notifier_block *nb);
 int imx_scu_irq_unregister_notifier(struct notifier_block *nb);
 int imx_scu_irq_group_enable(u8 group, u32 mask, u8 enable);
+#else
+static inline int imx_scu_enable_general_irq_channel(struct device *dev)
+{
+	return -ENOENT;
+}
+static inline int imx_scu_irq_register_notifier(struct notifier_block *nb)
+{
+	return -ENOENT;
+}
+static inline int imx_scu_irq_unregister_notifier(struct notifier_block *nb)
+{
+	return -ENOENT;
+}
+static inline int imx_scu_irq_group_enable(u8 group, u32 mask, u8 enable)
+{
+	return -ENOENT;
+}
+#endif
 #endif /* _SC_SCI_H */
Signature · 1 line
2.7.4
#1 lore raw

PATCH v3 2/7 firmware: imx: add COMPILE_TEST support

Add COMPILE_TEST support to i.MX SCU drivers for better compile testing coverage.

---
No change.

---
 drivers/firmware/imx/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/firmware/imx/Kconfig +2 -2
index 1d2e5b8..116707a 100644
@@ -12,7 +12,7 @@ config IMX_DSP
 
 config IMX_SCU
 	bool "IMX SCU Protocol driver"
-	depends on IMX_MBOX
+	depends on IMX_MBOX || COMPILE_TEST
 	help
 	  The System Controller Firmware (SCFW) is a low-level system function
 	  which runs on a dedicated Cortex-M core to provide power, clock, and
@@ -24,6 +24,6 @@ config IMX_SCU
 
 config IMX_SCU_PD
 	bool "IMX SCU Power Domain driver"
-	depends on IMX_SCU
+	depends on IMX_SCU || COMPILE_TEST
 	help
 	  The System Controller Firmware (SCFW) based power domain driver.
Signature · 1 line
2.7.4
Applied
#2 lore raw

Re: [PATCH V3 2/7] firmware: imx: add COMPILE_TEST support

Quoted 4 lines · Anson Huang

Add COMPILE_TEST support to i.MX SCU drivers for better compile testing coverage.

Applied this one, thanks.

#3 lore raw

Re: [PATCH V3 2/7] firmware: imx: add COMPILE_TEST support

In reply to Anson Huang
Quoted 24 lines · Anson Huang

Add COMPILE_TEST support to i.MX SCU drivers for better compile testing coverage.

---
No change.

---
 drivers/firmware/imx/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/firmware/imx/Kconfig +1 -1
index 1d2e5b8..116707a 100644
@@ -12,7 +12,7 @@ config IMX_DSP
 
 config IMX_SCU
 	bool "IMX SCU Protocol driver"
-	depends on IMX_MBOX
+	depends on IMX_MBOX || COMPILE_TEST
 	help
 	  The System Controller Firmware (SCFW) is a low-level system function
 	  which runs on a dedicated Cortex-M core to provide power, clock, and

drivers/firmware/imx/Kconfig config IMX_SCU · line 27

Quoted 5 lines
drivers/firmware/imx/Kconfig +1 -1
@@ -24,6 +24,6 @@ config IMX_SCU
 
 config IMX_SCU_PD
 	bool "IMX SCU Power Domain driver"
-	depends on IMX_SCU
+	depends on IMX_SCU || COMPILE_TEST

Just reminded by Peng, as we go without adding stubs for !IMX_SCU, any driver depending on IMX_SCU shouldn't have COMPILE_TEST. I fixed it up by dropping COMPILE_TEST from IMX_SCU_PD.

Shawn

Quoted 5 lines
drivers/firmware/imx/Kconfig +0 -0
 	help
 	  The System Controller Firmware (SCFW) based power domain driver.
Signature · 1 line
2.7.4
#4 lore raw

PATCH v3 3/7 rtc: add COMPILE_TEST support for i.MX SC RTC

In reply to Anson Huang

Add COMPILE_TEST support to i.MX SC RTC driver for better compile testing coverage.

---
No change.

---
 drivers/rtc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/Kconfig +1 -1
index acaf6f98..a86768f 100644
@@ -1772,7 +1772,7 @@ config RTC_DRV_SNVS
 	   will be called "rtc-snvs".
 
 config RTC_DRV_IMX_SC
-	depends on IMX_SCU
+	depends on IMX_SCU || COMPILE_TEST
 	depends on HAVE_ARM_SMCCC
 	tristate "NXP i.MX System Controller RTC support"
 	help
Signature · 1 line
2.7.4
#5 lore raw

PATCH v3 4/7 input: keyboard: add COMPILE_TEST support for KEYBOARD_IMX_SC_KEY

In reply to Anson Huang

Add COMPILE_TEST support to i.MX SC keyboard driver for better compile testing coverage.

---
No change.

---
 drivers/input/keyboard/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/keyboard/Kconfig +1 -1
index 9709137..87e0be8 100644
@@ -467,7 +467,7 @@ config KEYBOARD_IMX
 
 config KEYBOARD_IMX_SC_KEY
 	tristate "IMX SCU Key Driver"
-	depends on IMX_SCU
+	depends on IMX_SCU || COMPILE_TEST
 	help
 	  This is the system controller key driver for NXP i.MX SoCs with
 	  system controller inside.
Signature · 1 line
2.7.4
#6 lore raw

PATCH v3 5/7 input: keyboard: imx_sc_key: Fix build warning for !CONFIG_IMX_SCU case

In reply to Anson Huang

Fix below build warning when COMPILE_TEST is enabled while IMX_SCU is not:

drivers/input/keyboard/imx_sc_key.c: In function ‘imx_sc_check_for_events’:
drivers/input/keyboard/imx_sc_key.c:87:27: warning: ‘msg.state’ is used uninitialized in this function [-Wuninitialized]

state = (bool)(msg.state & 0xff);
                             ^

AR drivers/input/keyboard/built-in.a

---
No change.

---
 drivers/input/keyboard/imx_sc_key.c | 1 +
 1 file changed, 1 insertion(+)
drivers/input/keyboard/imx_sc_key.c +1 -0
index 2672fd4..1b55348 100644
@@ -69,6 +69,7 @@ static void imx_sc_check_for_events(struct work_struct *work)
 	hdr->func = IMX_SC_MISC_FUNC_GET_BUTTON_STATUS;
 	hdr->size = 1;
 
+	msg.state = 0;
 	error = imx_scu_call_rpc(priv->key_ipc_handle, &msg, true);
 	if (error) {
 		dev_err(&input->dev, "read imx sc key failed, error %d\n", error);
Signature · 1 line
2.7.4
#7 lore raw

PATCH v3 6/7 watchdog: add COMPILE_TEST support for IMX_SC_WDT

In reply to Anson Huang

Add COMPILE_TEST support to i.MX SC watchdog driver for better compile testing coverage.

---
No change.

---
 drivers/watchdog/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/Kconfig +1 -1
index cec868f..c5cc567 100644
@@ -711,7 +711,7 @@ config IMX2_WDT
 config IMX_SC_WDT
 	tristate "IMX SC Watchdog"
 	depends on HAVE_ARM_SMCCC
-	depends on IMX_SCU
+	depends on IMX_SCU || COMPILE_TEST
 	select WATCHDOG_CORE
 	help
 	  This is the driver for the system controller watchdog
Signature · 1 line
2.7.4
#8 lore raw

PATCH v3 7/7 thermal: add COMPILE_TEST support for IMX_SC_THERMAL

In reply to Anson Huang

Add COMPILE_TEST support to i.MX SC thermal driver for better compile testing coverage.

---
No change.

---
 drivers/thermal/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/Kconfig +1 -1
index 9f388ed..6235949 100644
@@ -253,7 +253,7 @@ config IMX_THERMAL
 
 config IMX_SC_THERMAL
 	tristate "Temperature sensor driver for NXP i.MX SoCs with System Controller"
-	depends on IMX_SCU
+	depends on IMX_SCU || COMPILE_TEST
 	depends on OF
 	help
 	  Support for Temperature Monitor (TEMPMON) found on NXP i.MX SoCs with
Signature · 1 line
2.7.4
#9 lore raw
In reply to Anson Huang
Quoted 7 lines · Anson Huang

Add stubs for those i.MX SCU APIs to make those modules depending on IMX_SCU can pass build when COMPILE_TEST is enabled.

---
Changes since V2:
- return error for stubs.

I'm not sure why you are sending v3 with the stubs as we determined that 2/7 is enough to compile all the drivers with COMPILE_TEST.

Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#10 lore raw

Hi, Alexandre

Quoted 7 lines

Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 3 lines · Anson Huang

Add stubs for those i.MX SCU APIs to make those modules depending on IMX_SCU can pass build when COMPILE_TEST is enabled.

Quoted 7 lines
Quoted 4 lines

---
Changes since V2:
- return error for stubs.

I'm not sure why you are sending v3 with the stubs as we determined that 2/7 is enough to compile all the drivers with COMPILE_TEST.

It is just because I am NOT sure which approach maintainer prefer, the V3 is to address the comment of V2. If everyone agree that 2/7 is enough, then I think IMX_SCU maintainer can just pick up V1 patch series, sorry for the confusion.

Thanks,
Anson

maintainer
#11 lore raw
In reply to Alexandre Belloni
Quoted 4 lines · Alexandre Belloni
Quoted 3 lines · Anson Huang

Add stubs for those i.MX SCU APIs to make those modules depending on IMX_SCU can pass build when COMPILE_TEST is enabled.

Quoted 9 lines
Quoted 4 lines

---
Changes since V2:
- return error for stubs.

I'm not sure why you are sending v3 with the stubs as we determined that 2/7 is enough to compile all the drivers with COMPILE_TEST.

2/7 alone is not sufficient. With only 2/7, one can explicitly configure IMX_SCU=n, COMPILE_TEST=y, and get lots of compile failures. Granted, one should not do that, but 0day does (I don't know if that is the result of RANDCONFIG), and I am not looking forward having to deal with the fallout.

Guenter

#12 lore raw
Quoted 20 lines

Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 4 lines · Alexandre Belloni
Quoted 3 lines · Anson Huang

Add stubs for those i.MX SCU APIs to make those modules depending on IMX_SCU can pass build when COMPILE_TEST is enabled.

Quoted 10 lines
Quoted 4 lines

---
Changes since V2:
- return error for stubs.

I'm not sure why you are sending v3 with the stubs as we determined that
2/7 is enough to compile all the drivers with COMPILE_TEST.

Quoted 4 lines

2/7 alone is not sufficient. With only 2/7, one can explicitly configure IMX_SCU=n, COMPILE_TEST=y, and get lots of compile failures. Granted, one should not do that, but 0day does (I don't know if that is the result of RANDCONFIG), and I am not looking forward having to deal with the fallout.

So the V3 patch series looks better, adding stubs can cover various corner cases.

Anson

#13 lore raw
In reply to Guenter Roeck
Quoted 14 lines · Guenter Roeck
Quoted 4 lines · Alexandre Belloni
Quoted 3 lines · Anson Huang

Add stubs for those i.MX SCU APIs to make those modules depending on IMX_SCU can pass build when COMPILE_TEST is enabled.

Quoted 9 lines
Quoted 4 lines

---
Changes since V2:
- return error for stubs.

I'm not sure why you are sending v3 with the stubs as we determined that 2/7 is enough to compile all the drivers with COMPILE_TEST.

Quoted 6 lines

2/7 alone is not sufficient. With only 2/7, one can explicitly configure IMX_SCU=n, COMPILE_TEST=y, and get lots of compile failures. Granted, one should not do that, but 0day does (I don't know if that is the result of RANDCONFIG), and I am not looking forward having to deal with the fallout.

How would that be possible if the drivers all depend on IMX_SCU?

Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
maintainer
#14 lore raw
Quoted 15 lines · Alexandre Belloni
Quoted 14 lines · Guenter Roeck
Quoted 13 lines · Alexandre Belloni
Quoted 7 lines · Anson Huang

Add stubs for those i.MX SCU APIs to make those modules depending on IMX_SCU can pass build when COMPILE_TEST is enabled.

---
Changes since V2:
- return error for stubs.

I'm not sure why you are sending v3 with the stubs as we determined that 2/7 is enough to compile all the drivers with COMPILE_TEST.

Quoted 9 lines
Quoted 6 lines

2/7 alone is not sufficient. With only 2/7, one can explicitly configure IMX_SCU=n, COMPILE_TEST=y, and get lots of compile failures. Granted, one should not do that, but 0day does (I don't know if that is the result of RANDCONFIG), and I am not looking forward having to deal with the fallout.

How would that be possible if the drivers all depend on IMX_SCU?

That dependency is being changed to IMX_SCU || COMPILE_TEST as part of the series.

Guenter

#15 lore raw
Quoted 23 lines · Guenter Roeck
Quoted 22 lines · Alexandre Belloni
Quoted 20 lines · Guenter Roeck
Quoted 4 lines · Alexandre Belloni
Quoted 3 lines · Anson Huang

Add stubs for those i.MX SCU APIs to make those modules depending on IMX_SCU can pass build when COMPILE_TEST is enabled.

Quoted 9 lines
Quoted 4 lines

---
Changes since V2:
- return error for stubs.

I'm not sure why you are sending v3 with the stubs as we determined that 2/7 is enough to compile all the drivers with COMPILE_TEST.

2/7 alone is not sufficient. With only 2/7, one can explicitly configure IMX_SCU=n, COMPILE_TEST=y, and get lots of compile failures. Granted, one should not do that, but 0day does (I don't know if that is the result of RANDCONFIG), and I am not looking forward having to deal with the fallout.

Quoted 5 lines
Quoted 2 lines

How would that be possible if the drivers all depend on IMX_SCU?

That dependency is being changed to IMX_SCU || COMPILE_TEST as part of the series.

Yes, my point is that those patches should not be applied at all, only 2/7.

Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
maintainer
#16 lore raw
Quoted 24 lines · Alexandre Belloni
Quoted 23 lines · Guenter Roeck
Quoted 22 lines · Alexandre Belloni
Quoted 20 lines · Guenter Roeck
Quoted 4 lines · Alexandre Belloni
Quoted 3 lines · Anson Huang

Add stubs for those i.MX SCU APIs to make those modules depending on IMX_SCU can pass build when COMPILE_TEST is enabled.

Quoted 9 lines
Quoted 4 lines

---
Changes since V2:
- return error for stubs.

I'm not sure why you are sending v3 with the stubs as we determined that 2/7 is enough to compile all the drivers with COMPILE_TEST.

2/7 alone is not sufficient. With only 2/7, one can explicitly configure IMX_SCU=n, COMPILE_TEST=y, and get lots of compile failures. Granted, one should not do that, but 0day does (I don't know if that is the result of RANDCONFIG), and I am not looking forward having to deal with the fallout.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

How would that be possible if the drivers all depend on IMX_SCU?

That dependency is being changed to IMX_SCU || COMPILE_TEST as part of the series.

Yes, my point is that those patches should not be applied at all, only 2/7.

Ah, now I get it. Sorry, I missed that part. You are correct, that would be sufficient, and I would very much prefer that approach.

Thanks,
Guenter

#17 lore raw
In reply to Anson Huang
Quoted 1 line

Subject: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

I have one patch pending reviewing.
https://patchwork.kernel.org/patch/11395247/

Thanks,
Peng.

Quoted 76 lines

Add stubs for those i.MX SCU APIs to make those modules depending on IMX_SCU can pass build when COMPILE_TEST is enabled.

---
Changes since V2:
- return error for stubs.

---
 include/linux/firmware/imx/ipc.h | 11 +++++++++++
include/linux/firmware/imx/sci.h | 19 +++++++++++++++++++
 2 files changed, 30 insertions(+)
include/linux/firmware/imx/ipc.h +10 -0
index 8910574..9e3d808 100644
@@ -34,6 +34,7 @@ struct imx_sc_rpc_msg {
 	uint8_t func;
 };
 
+#ifdef CONFIG_IMX_SCU
 /*
  * This is an function to send an RPC message over an IPC channel.
  * It is called by client-side SCFW API function shims.
@@ -55,4 +56,14 @@ int imx_scu_call_rpc(struct imx_sc_ipc *ipc, void *msg,
 bool have_resp);
  * @return Returns an error code (0 = success, failed if < 0)
  */
 int imx_scu_get_handle(struct imx_sc_ipc **ipc);
+#else
+static inline int imx_scu_call_rpc(struct imx_sc_ipc *ipc, void *msg,
+bool have_resp) {
+	return -ENOENT;
+}
+static inline int imx_scu_get_handle(struct imx_sc_ipc **ipc) {
+	return -ENOENT;
+}
+#endif
 #endif /* _SC_IPC_H */
include/linux/firmware/imx/sci.h +0 -0
index 17ba4e4..022129b 100644
@@ -16,8 +16,27 @@
 #include <linux/firmware/imx/svc/misc.h>  #include

<linux/firmware/imx/svc/pm.h>

+#ifdef CONFIG_IMX_SCU
int imx_scu_enable_general_irq_channel(struct device *dev); int
imx_scu_irq_register_notifier(struct notifier_block *nb); int imx_scu_irq_unregister_notifier(struct notifier_block *nb); int imx_scu_irq_group_enable(u8 group, u32 mask, u8 enable);

include/linux/firmware/imx/sci.h +18 -1
+#else
+static inline int imx_scu_enable_general_irq_channel(struct device
+*dev) {
+	return -ENOENT;
+}
+static inline int imx_scu_irq_register_notifier(struct notifier_block
+*nb) {
+	return -ENOENT;
+}
+static inline int imx_scu_irq_unregister_notifier(struct notifier_block
+*nb) {
+	return -ENOENT;
+}
+static inline int imx_scu_irq_group_enable(u8 group, u32 mask, u8
+enable) {
+	return -ENOENT;
+}
+#endif
 #endif /* _SC_SCI_H */
--

2.7.4

#18 lore raw
Quoted 9 lines

Subject: RE: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 2 lines

Subject: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

I have one patch pending reviewing.
https://patchwork.kernel.org/patch/11395247/

OK, if your patch is picked up, then 1/7 is unnecessary for this patch series, but the rest are still needed.

Anson

Quoted 81 lines

Thanks,
Peng.

Quoted 77 lines

Add stubs for those i.MX SCU APIs to make those modules depending on IMX_SCU can pass build when COMPILE_TEST is enabled.

---
Changes since V2:
- return error for stubs.

---
 include/linux/firmware/imx/ipc.h | 11 +++++++++++
include/linux/firmware/imx/sci.h | 19 +++++++++++++++++++
 2 files changed, 30 insertions(+)
include/linux/firmware/imx/ipc.h +10 -0
index 8910574..9e3d808 100644
@@ -34,6 +34,7 @@ struct imx_sc_rpc_msg {
 	uint8_t func;
 };
 
+#ifdef CONFIG_IMX_SCU
 /*
  * This is an function to send an RPC message over an IPC channel.
  * It is called by client-side SCFW API function shims.
@@ -55,4 +56,14 @@ int imx_scu_call_rpc(struct imx_sc_ipc *ipc, void
 *msg, bool have_resp);
  * @return Returns an error code (0 = success, failed if < 0)
  */
 int imx_scu_get_handle(struct imx_sc_ipc **ipc);
+#else
+static inline int imx_scu_call_rpc(struct imx_sc_ipc *ipc, void *msg,
+bool have_resp) {
+	return -ENOENT;
+}
+static inline int imx_scu_get_handle(struct imx_sc_ipc **ipc) {
+	return -ENOENT;
+}
+#endif
 #endif /* _SC_IPC_H */
include/linux/firmware/imx/sci.h +0 -0
index 17ba4e4..022129b 100644
@@ -16,8 +16,27 @@
 #include <linux/firmware/imx/svc/misc.h>  #include

<linux/firmware/imx/svc/pm.h>

+#ifdef CONFIG_IMX_SCU
int imx_scu_enable_general_irq_channel(struct device *dev); int
imx_scu_irq_register_notifier(struct notifier_block *nb); int imx_scu_irq_unregister_notifier(struct notifier_block *nb); int imx_scu_irq_group_enable(u8 group, u32 mask, u8 enable);

include/linux/firmware/imx/sci.h +19 -1
+#else
+static inline int imx_scu_enable_general_irq_channel(struct device
+*dev) {
+	return -ENOENT;
+}
+static inline int imx_scu_irq_register_notifier(struct notifier_block
+*nb) {
+	return -ENOENT;
+}
+static inline int imx_scu_irq_unregister_notifier(struct
+notifier_block
+*nb) {
+	return -ENOENT;
+}
+static inline int imx_scu_irq_group_enable(u8 group, u32 mask, u8
+enable) {
+	return -ENOENT;
+}
+#endif
 #endif /* _SC_SCI_H */
--

2.7.4

#20 lore raw

Hi Shawn,

Quoted 16 lines

Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 6 lines · Peng Fan
Quoted 2 lines

Subject: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

I have one patch pending reviewing.
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatc

hwork.kernel.org%2Fpatch%2F11395247%2F&amp;data=02%7C01%7Cpeng.f an%40n

Quoted 1 line

xp.com%7C995815002e2b490791e008d7c9445133%7C686ea1d3bc2b4c6fa9 2cd99c5c

Quoted 1 line
Quoted 6 lines

301635%7C0%7C0%7C637199167574579419&amp;sdata=RM4Mtwl8LZ3ft9 3uL3FQPcHT

Quoted 1 line

9lPHSqBOgugozkcLvag%3D&amp;reserved=0

I dropped that patch from my queue and picked patch #2 from this series as the favor.

I think dropping that patch might cause Linux-next build fail as previously showed, because IMX_SCU_SOC depends on COMPILE_TEST. If you drop that patch, also need to drop COMPILE_TEST from IMX_SCU_SOC.

ld: drivers/soc/imx/soc-imx-scu.o: in function `.imx_scu_soc_probe':
soc-imx-scu.c:(.text.imx_scu_soc_probe+0x44): undefined reference to
`.imx_scu_get_handle'
ld: soc-imx-scu.c:(.text.imx_scu_soc_probe+0x134): undefined reference to `.imx_scu_call_rpc'
ld: soc-imx-scu.c:(.text.imx_scu_soc_probe+0x20c): undefined reference to `.imx_scu_call_rpc'

Caused by commit

68c189e3a93c ("soc: imx: increase build coverage for imx8m soc
driver")

What do you prefer? I personally think dummy functions would be good.

Thanks,
Peng.

Quoted 2 lines

Shawn

#21 lore raw
Quoted 37 lines · Peng Fan

Hi Shawn,

Quoted 16 lines

Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 6 lines · Peng Fan
Quoted 2 lines

Subject: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

I have one patch pending reviewing.
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatc

hwork.kernel.org%2Fpatch%2F11395247%2F&amp;data=02%7C01%7Cpeng.f an%40n

Quoted 1 line

xp.com%7C995815002e2b490791e008d7c9445133%7C686ea1d3bc2b4c6fa9 2cd99c5c

Quoted 1 line
Quoted 6 lines

301635%7C0%7C0%7C637199167574579419&amp;sdata=RM4Mtwl8LZ3ft9 3uL3FQPcHT

Quoted 1 line

9lPHSqBOgugozkcLvag%3D&amp;reserved=0

I dropped that patch from my queue and picked patch #2 from this series as the favor.

I think dropping that patch might cause Linux-next build fail as previously showed, because IMX_SCU_SOC depends on COMPILE_TEST. If you drop that patch, also need to drop COMPILE_TEST from IMX_SCU_SOC.

ld: drivers/soc/imx/soc-imx-scu.o: in function `.imx_scu_soc_probe':
soc-imx-scu.c:(.text.imx_scu_soc_probe+0x44): undefined reference to
`.imx_scu_get_handle'
ld: soc-imx-scu.c:(.text.imx_scu_soc_probe+0x134): undefined reference to `.imx_scu_call_rpc'
ld: soc-imx-scu.c:(.text.imx_scu_soc_probe+0x20c): undefined reference to `.imx_scu_call_rpc'

Quoted 6 lines

Caused by commit

68c189e3a93c ("soc: imx: increase build coverage for imx8m soc
driver")

What do you prefer? I personally think dummy functions would be good.

I would rather drop COMPILE_TEST from IMX_SCU_SOC. Could you send a patch for that shortly?

Shawn

#22 lore raw
Quoted 48 lines

Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 14 lines · Peng Fan

Hi Shawn,

Quoted 12 lines

Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 7 lines · Peng Fan
Quoted 2 lines

Subject: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

I have one patch pending reviewing.
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2F
patc

hwork.kernel.org%2Fpatch%2F11395247%2F&amp;data=02%7C01%7Cpeng.f

Quoted 3 lines
Quoted 3 lines

an%40n

Quoted 1 line

xp.com%7C995815002e2b490791e008d7c9445133%7C686ea1d3bc2b4c6fa9

Quoted 3 lines
Quoted 3 lines

2cd99c5c

Quoted 1 line

301635%7C0%7C0%7C637199167574579419&amp;sdata=RM4Mtwl8LZ3ft9

Quoted 8 lines
Quoted 5 lines

3uL3FQPcHT

Quoted 1 line

9lPHSqBOgugozkcLvag%3D&amp;reserved=0

I dropped that patch from my queue and picked patch #2 from this series as the favor.

I think dropping that patch might cause Linux-next build fail as previously showed, because IMX_SCU_SOC depends on COMPILE_TEST. If

you

Quoted 12 lines

drop that patch, also need to drop COMPILE_TEST from IMX_SCU_SOC.

ld: drivers/soc/imx/soc-imx-scu.o: in function `.imx_scu_soc_probe':
soc-imx-scu.c:(.text.imx_scu_soc_probe+0x44): undefined reference to
`.imx_scu_get_handle'
ld: soc-imx-scu.c:(.text.imx_scu_soc_probe+0x134): undefined
reference to `.imx_scu_call_rpc'
ld: soc-imx-scu.c:(.text.imx_scu_soc_probe+0x20c): undefined
reference to `.imx_scu_call_rpc'

Caused by commit

Quoted 7 lines
Quoted 4 lines

68c189e3a93c ("soc: imx: increase build coverage for imx8m soc
driver")

What do you prefer? I personally think dummy functions would be good.

I would rather drop COMPILE_TEST from IMX_SCU_SOC. Could you send a patch for that shortly?

Just sent out. One more thing, I think all drivers depends on IMX_SCU should not have COMPILE_TEST if we plan not to add dummy functions. I see you picked up Anson's patch in imx/drivers branch, please check more.

Thanks,
Peng.

Quoted 2 lines

Shawn

#23 lore raw
Quoted 3 lines · Peng Fan

Just sent out. One more thing, I think all drivers depends on IMX_SCU should not have COMPILE_TEST if we plan not to add dummy functions. I see you picked up Anson's patch in imx/drivers branch, please check more.

Ha, yes. COMPILE_TEST should be dropped for IMX_SCU_PD in Anson's patch. Thanks for reminding.

Shawn

#24 lore raw

Hi, Shawn

Quoted 10 lines

Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 3 lines · Peng Fan

Just sent out. One more thing, I think all drivers depends on IMX_SCU should not have COMPILE_TEST if we plan not to add dummy functions. I see you picked up Anson's patch in imx/drivers branch, please check more.

Ha, yes. COMPILE_TEST should be dropped for IMX_SCU_PD in Anson's patch. Thanks for reminding.

I still NOT quite understand why we won't support COMPILE_TEST for SCU drivers, with whose stubs, the build should be OK, if there is any build error, we should try to fix it, NOT just remove the COMPILE_TEST support, any special reason?

Thanks,
Anson

#25 lore raw
Quoted 10 lines · Anson Huang

Hi, Shawn

Quoted 8 lines

Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 3 lines · Peng Fan

Just sent out. One more thing, I think all drivers depends on IMX_SCU should not have COMPILE_TEST if we plan not to add dummy functions. I see you picked up Anson's patch in imx/drivers branch, please check more.

Quoted 7 lines
Quoted 2 lines

Ha, yes. COMPILE_TEST should be dropped for IMX_SCU_PD in Anson's patch. Thanks for reminding.

I still NOT quite understand why we won't support COMPILE_TEST for SCU drivers, with whose stubs, the build should be OK, if there is any build error, we should try to fix it, NOT just remove the COMPILE_TEST support, any special reason?

COMPILE_TEST is supported as long as IMX_SCU is selected like is it for any driver depending on any bus.

Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#26 lore raw
Quoted 21 lines

Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 9 lines · Anson Huang

Hi, Shawn

Quoted 7 lines

Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 3 lines · Peng Fan

Just sent out. One more thing, I think all drivers depends on IMX_SCU should not have COMPILE_TEST if we plan not to add dummy functions. I see you picked up Anson's patch in imx/drivers branch,

please check more.

Quoted 2 lines
Quoted 2 lines

Ha, yes. COMPILE_TEST should be dropped for IMX_SCU_PD in Anson's

patch.

Quoted 2 lines
Quoted 1 line

Thanks for reminding.

Quoted 8 lines
Quoted 3 lines

I still NOT quite understand why we won't support COMPILE_TEST for SCU drivers, with whose stubs, the build should be OK, if there is any build error, we should try to fix it, NOT just remove the COMPILE_TEST

support, any special reason?

Quoted 1 line

COMPILE_TEST is supported as long as IMX_SCU is selected like is it for any driver depending on any bus.

But without having " || COMPILE_TEST " in kconfig, COMPILE_TEST will NOT be supported, I think as long as we have stubs for those SCU APIs, all drivers depending on IMX_SCU can support COMPILE_TEST independently.

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

#27 lore raw
Quoted 27 lines · Anson Huang
Quoted 27 lines

Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 9 lines · Anson Huang

Hi, Shawn

Quoted 7 lines

Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 3 lines · Peng Fan

Just sent out. One more thing, I think all drivers depends on IMX_SCU should not have COMPILE_TEST if we plan not to add dummy functions. I see you picked up Anson's patch in imx/drivers branch,

please check more.

Quoted 2 lines
Quoted 2 lines

Ha, yes. COMPILE_TEST should be dropped for IMX_SCU_PD in Anson's

patch.

Quoted 5 lines
Quoted 1 line

Thanks for reminding.

I still NOT quite understand why we won't support COMPILE_TEST for SCU drivers, with whose stubs, the build should be OK, if there is any build error, we should try to fix it, NOT just remove the COMPILE_TEST

support, any special reason?

Quoted 1 line
Quoted 7 lines
Quoted 2 lines

COMPILE_TEST is supported as long as IMX_SCU is selected like is it for any driver depending on any bus.

But without having " || COMPILE_TEST " in kconfig, COMPILE_TEST will NOT be supported, I think as long as we have stubs for those SCU APIs, all drivers depending on IMX_SCU can support COMPILE_TEST independently.

Why do you absolutely need to compile them independently? From a code coverage point of view, having:

COMPILE_TEST=y
CONFIG_IMX_SCU=y

is enough to select and compile the remaining drivers.

Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#28 lore raw

Hi, Alexandre

Quoted 44 lines

Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 30 lines · Anson Huang
Quoted 30 lines

Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 10 lines · Anson Huang

Hi, Shawn

Quoted 8 lines

Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 4 lines · Peng Fan

Just sent out. One more thing, I think all drivers depends on IMX_SCU should not have COMPILE_TEST if we plan not to add dummy functions. I see you picked up Anson's patch in imx/drivers branch,

please check more.

Quoted 3 lines
Quoted 3 lines

Ha, yes. COMPILE_TEST should be dropped for IMX_SCU_PD in Anson's

patch.

Quoted 6 lines
Quoted 1 line

Thanks for reminding.

I still NOT quite understand why we won't support COMPILE_TEST for SCU drivers, with whose stubs, the build should be OK, if there is any build error, we should try to fix it, NOT just remove the COMPILE_TEST

support, any special reason?

Quoted 1 line
Quoted 6 lines
Quoted 2 lines

COMPILE_TEST is supported as long as IMX_SCU is selected like is it for any driver depending on any bus.

But without having " || COMPILE_TEST " in kconfig, COMPILE_TEST will NOT be supported, I think as long as we have stubs for those SCU APIs, all drivers depending on IMX_SCU can support COMPILE_TEST

independently.

Quoted 1 line
Quoted 7 lines

Why do you absolutely need to compile them independently? From a code coverage point of view, having:

COMPILE_TEST=y
CONFIG_IMX_SCU=y

is enough to select and compile the remaining drivers.

What I meant is for below case, like using other arch config which does NOT have CONFIG_IMX_SCU selected, ONLY with COMPILE_TEST selected, adding stubs for IMX_SCU APIs can fix such scenario.

COMPILE_TEST=y
CONFIG_IMX_SCU=n

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

#29 lore raw
Quoted 6 lines · Anson Huang
Quoted 6 lines

Why do you absolutely need to compile them independently? From a code coverage point of view, having:

COMPILE_TEST=y
CONFIG_IMX_SCU=y

Quoted 9 lines
Quoted 1 line

is enough to select and compile the remaining drivers.

What I meant is for below case, like using other arch config which does NOT have CONFIG_IMX_SCU selected, ONLY with COMPILE_TEST selected, adding stubs for IMX_SCU APIs can fix such scenario.

COMPILE_TEST=y
CONFIG_IMX_SCU=n

Why is that an issue? If they don't have IMX_SCU selected, then the other SCU driver are not selected either, having stubs doesn't change that you will have to select at least one option. Please explain what is the issue that is not solved here.

Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#30 lore raw

Hi, Alexandre

Quoted 33 lines

-----Original Message-----
From: Alexandre Belloni <[email protected]>
Sent: Monday, March 16, 2020 5:16 PM
To: Anson Huang <[email protected]>
Cc: Shawn Guo <[email protected]>; Peng Fan <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; wim@linux- watchdog.org; [email protected]; Daniel Baluta <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Leonard Crestez <[email protected]>; Aisheng Dong <[email protected]>; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]; dl-linux-imx <[email protected]>
Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 12 lines · Anson Huang
Quoted 7 lines

Why do you absolutely need to compile them independently? From a code coverage point of view, having:

COMPILE_TEST=y
CONFIG_IMX_SCU=y

is enough to select and compile the remaining drivers.

What I meant is for below case, like using other arch config which does NOT have CONFIG_IMX_SCU selected, ONLY with COMPILE_TEST selected, adding stubs for IMX_SCU APIs can fix such scenario.

Quoted 8 lines
Quoted 3 lines

COMPILE_TEST=y
CONFIG_IMX_SCU=n

Why is that an issue? If they don't have IMX_SCU selected, then the other SCU driver are not selected either, having stubs doesn't change that you will have to select at least one option. Please explain what is the issue that is not solved here.

OK, what I thought is even without IMX_SCU selected, other SCU drivers still can be selected for build test after adding "COMPILE_TEST" to the kconfig, like below, if without IMX_SCU API stubs, the "COMPILE_TEST" can NOT be added to SCU drivers to enable build test, so I think the IMX_SCU API stubs should be added?

config KEYBOARD_IMX_SC_KEY
tristate "IMX SCU Key Driver"
depends on IMX_SCU || COMPILE_TEST

thanks,
Anson

#31 lore raw
Quoted 10 lines · Anson Huang
Quoted 4 lines

Why is that an issue? If they don't have IMX_SCU selected, then the other SCU driver are not selected either, having stubs doesn't change that you will have to select at least one option. Please explain what is the issue that is not solved here.

OK, what I thought is even without IMX_SCU selected, other SCU drivers still can be selected for build test after adding "COMPILE_TEST" to the kconfig, like below, if without IMX_SCU API stubs, the "COMPILE_TEST" can NOT be added to SCU drivers to enable build test, so I think the IMX_SCU API stubs should be added?

No they shouldn't because there is not point adding COMPILE_TEST to the SCU drivers. We don't add COMPILE_TEST to all the drivers and add stubs to all the subsystems. E.g there is no point trying to compile an I2C driver if the I2C core is not enabled.

Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#32 lore raw
Quoted 15 lines

Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 9 lines · Anson Huang
Quoted 4 lines

Why is that an issue? If they don't have IMX_SCU selected, then the other SCU driver are not selected either, having stubs doesn't change that you will have to select at least one option. Please explain what is the issue that is not solved here.

OK, what I thought is even without IMX_SCU selected, other SCU drivers still can be selected for build test after adding "COMPILE_TEST" to the kconfig, like below, if without IMX_SCU API stubs, the "COMPILE_TEST" can NOT be added to SCU drivers to enable build test, so I

Quoted 7 lines

think the IMX_SCU API stubs should be added?

Quoted 1 line

No they shouldn't because there is not point adding COMPILE_TEST to the SCU drivers. We don't add COMPILE_TEST to all the drivers and add stubs to all the subsystems. E.g there is no point trying to compile an I2C driver if the I2C core is not enabled.

OK, make sense.

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

#33 lore raw
In reply to Anson Huang
Quoted 49 lines

Subject: RE: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Hi, Alexandre

Quoted 7 lines

-----Original Message-----
From: Alexandre Belloni <[email protected]>
Sent: Monday, March 16, 2020 5:16 PM
To: Anson Huang <[email protected]>
Cc: Shawn Guo <[email protected]>; Peng Fan <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected];

[email protected];

Quoted 27 lines

[email protected]; [email protected]; wim@linux- watchdog.org; [email protected]; Daniel Baluta <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected];
[email protected]; [email protected]; [email protected]; [email protected]; Leonard Crestez <[email protected]>; Aisheng Dong <[email protected]>; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]; dl-linux-imx <[email protected]>
Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 12 lines · Anson Huang
Quoted 7 lines

Why do you absolutely need to compile them independently? From a code coverage point of view, having:

COMPILE_TEST=y
CONFIG_IMX_SCU=y

is enough to select and compile the remaining drivers.

What I meant is for below case, like using other arch config which does NOT have CONFIG_IMX_SCU selected, ONLY with COMPILE_TEST selected, adding stubs for IMX_SCU APIs can fix such scenario.

Quoted 8 lines
Quoted 3 lines

COMPILE_TEST=y
CONFIG_IMX_SCU=n

Why is that an issue? If they don't have IMX_SCU selected, then the other SCU driver are not selected either, having stubs doesn't change that you will have to select at least one option. Please explain what is the issue that is not solved here.

Quoted 5 lines

OK, what I thought is even without IMX_SCU selected, other SCU drivers still can be selected for build test after adding "COMPILE_TEST" to the kconfig, like below, if without IMX_SCU API stubs, the "COMPILE_TEST" can NOT be added to SCU drivers to enable build test, so I think the IMX_SCU API stubs should be added?

Forgot to mention, without stub api, for drivers with
" #include <linux/firmware/imx/sci.h> " will met compile error without +#ifdef CONFIG_IMX_SCU
+#endif

So we have to use ifdef CONFIG_IMX_SCU to guard the include.

Regards,
Peng.

Quoted 7 lines

config KEYBOARD_IMX_SC_KEY
tristate "IMX SCU Key Driver"
depends on IMX_SCU || COMPILE_TEST

thanks,
Anson

#34 lore raw
Quoted 65 lines

Subject: RE: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 49 lines

Subject: RE: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Hi, Alexandre

Quoted 7 lines

-----Original Message-----
From: Alexandre Belloni <[email protected]>
Sent: Monday, March 16, 2020 5:16 PM
To: Anson Huang <[email protected]>
Cc: Shawn Guo <[email protected]>; Peng Fan <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected];

[email protected];

Quoted 27 lines

[email protected]; [email protected]; wim@linux- watchdog.org; [email protected]; Daniel Baluta <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected];
[email protected]; [email protected]; [email protected]; [email protected]; Leonard Crestez <[email protected]>; Aisheng Dong <[email protected]>; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]; dl-linux-imx <[email protected]>
Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 12 lines · Anson Huang
Quoted 7 lines

Why do you absolutely need to compile them independently? From a code coverage point of view, having:

COMPILE_TEST=y
CONFIG_IMX_SCU=y

is enough to select and compile the remaining drivers.

What I meant is for below case, like using other arch config which does NOT have CONFIG_IMX_SCU selected, ONLY with COMPILE_TEST selected, adding stubs for IMX_SCU APIs can fix such scenario.

Quoted 8 lines
Quoted 3 lines

COMPILE_TEST=y
CONFIG_IMX_SCU=n

Why is that an issue? If they don't have IMX_SCU selected, then the other SCU driver are not selected either, having stubs doesn't change that you will have to select at least one option. Please explain what is the issue that is not solved here.

Quoted 5 lines

OK, what I thought is even without IMX_SCU selected, other SCU drivers still can be selected for build test after adding "COMPILE_TEST" to the kconfig, like below, if without IMX_SCU API stubs, the "COMPILE_TEST" can NOT be added to SCU drivers to enable build test, so I think the IMX_SCU API stubs should be added?

Forgot to mention, without stub api, for drivers with " #include <linux/firmware/imx/sci.h> " will met compile error without

(quoted diff) +2 -0
+#ifdef CONFIG_IMX_SCU
+#endif
Quoted 1 line

So we have to use ifdef CONFIG_IMX_SCU to guard the include.

The idea here is that all modules depending on IMX_SCU should NOT be enabled without IMX_SCU enabled. So it should be fine.

Anson

maintainer
#35 lore raw
In reply to Peng Fan
Quoted 60 lines · Peng Fan
Quoted 49 lines

Subject: RE: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Hi, Alexandre

Quoted 7 lines

-----Original Message-----
From: Alexandre Belloni <[email protected]>
Sent: Monday, March 16, 2020 5:16 PM
To: Anson Huang <[email protected]>
Cc: Shawn Guo <[email protected]>; Peng Fan <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected];

[email protected];

Quoted 27 lines

[email protected]; [email protected]; wim@linux- watchdog.org; [email protected]; Daniel Baluta <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected];
[email protected]; [email protected]; [email protected]; [email protected]; Leonard Crestez <[email protected]>; Aisheng Dong <[email protected]>; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]; dl-linux-imx <[email protected]>
Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 12 lines · Anson Huang
Quoted 7 lines

Why do you absolutely need to compile them independently? From a code coverage point of view, having:

COMPILE_TEST=y
CONFIG_IMX_SCU=y

is enough to select and compile the remaining drivers.

What I meant is for below case, like using other arch config which does NOT have CONFIG_IMX_SCU selected, ONLY with COMPILE_TEST selected, adding stubs for IMX_SCU APIs can fix such scenario.

Quoted 8 lines
Quoted 3 lines

COMPILE_TEST=y
CONFIG_IMX_SCU=n

Why is that an issue? If they don't have IMX_SCU selected, then the other SCU driver are not selected either, having stubs doesn't change that you will have to select at least one option. Please explain what is the issue that is not solved here.

Quoted 5 lines

OK, what I thought is even without IMX_SCU selected, other SCU drivers still can be selected for build test after adding "COMPILE_TEST" to the kconfig, like below, if without IMX_SCU API stubs, the "COMPILE_TEST" can NOT be added to SCU drivers to enable build test, so I think the IMX_SCU API stubs should be added?

Forgot to mention, without stub api, for drivers with
" #include <linux/firmware/imx/sci.h> " will met compile error without

(quoted diff) +2 -0
+#ifdef CONFIG_IMX_SCU
+#endif
Quoted 2 lines

So we have to use ifdef CONFIG_IMX_SCU to guard the include.

Add "depends on IMX_SCU" to the Kconfig entry for those drivers, and/or drop "COMPILE_TEST" from their Kconfig entry.

Really, COMPILE_TEST is abused here. I start to understand those who advocate that it should be removed. This is an excellent case in point.

Guenter

#36 lore raw
Quoted 66 lines

Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 10 lines · Peng Fan
Quoted 10 lines

Subject: RE: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Hi, Alexandre

Quoted 5 lines

-----Original Message-----
From: Alexandre Belloni <[email protected]>
Sent: Monday, March 16, 2020 5:16 PM
To: Anson Huang <[email protected]>
Cc: Shawn Guo <[email protected]>; Peng Fan

<[email protected]>;

Quoted 50 lines
Quoted 39 lines
Quoted 2 lines

[email protected]; [email protected]; [email protected]; [email protected]; [email protected];

[email protected];

Quoted 27 lines

[email protected]; [email protected]; wim@linux- watchdog.org; [email protected]; Daniel Baluta <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected];
[email protected]; [email protected]; [email protected]; [email protected]; Leonard Crestez <[email protected]>; Aisheng Dong <[email protected]>; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]; dl-linux-imx <[email protected]>
Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case

Quoted 12 lines · Anson Huang
Quoted 7 lines

Why do you absolutely need to compile them independently? From a code coverage point of view, having:

COMPILE_TEST=y
CONFIG_IMX_SCU=y

is enough to select and compile the remaining drivers.

What I meant is for below case, like using other arch config which does NOT have CONFIG_IMX_SCU selected, ONLY with COMPILE_TEST selected, adding stubs for IMX_SCU APIs can fix such scenario.

Quoted 8 lines
Quoted 3 lines

COMPILE_TEST=y
CONFIG_IMX_SCU=n

Why is that an issue? If they don't have IMX_SCU selected, then the other SCU driver are not selected either, having stubs doesn't change that you will have to select at least one option. Please explain what is the issue that is not solved here.

Quoted 5 lines

OK, what I thought is even without IMX_SCU selected, other SCU drivers still can be selected for build test after adding "COMPILE_TEST" to the kconfig, like below, if without IMX_SCU API stubs, the "COMPILE_TEST" can NOT be added to SCU drivers to enable build test, so I think the IMX_SCU API stubs should be added?

Forgot to mention, without stub api, for drivers with " #include <linux/firmware/imx/sci.h> " will met compile error without

(quoted diff) +2 -0
+#ifdef CONFIG_IMX_SCU
+#endif
Quoted 7 lines
Quoted 2 lines

So we have to use ifdef CONFIG_IMX_SCU to guard the include.

Add "depends on IMX_SCU" to the Kconfig entry for those drivers, and/or drop "COMPILE_TEST" from their Kconfig entry.

Really, COMPILE_TEST is abused here. I start to understand those who advocate that it should be removed. This is an excellent case in point.

Yup, COMPILE_TEST should ONLY be added to those independent drivers, those drivers with dependency on "core" driver should NOT have it added. SCU drivers are similar.

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