firmware: imx: Add stubs for !CONFIG_IMX_SCU case
Subsystems (6)
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
@@ -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
@@ -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
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
@@ -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
Shawn Guo
AppliedRe: [PATCH V3 2/7] firmware: imx: add COMPILE_TEST support
Quoted 4 lines · Anson Huang
Add
COMPILE_TESTsupport to i.MX SCU drivers for better compile testing coverage.Signed-off-by Anson Huang <[email protected]>
Applied this one, thanks.
Re: [PATCH V3 2/7] firmware: imx: add COMPILE_TEST support
In reply to Anson HuangQuoted 24 lines · Anson Huang
Add
COMPILE_TESTsupport to i.MX SCU drivers for better compile testing coverage.Signed-off-by Anson Huang <[email protected]>---
No change.--- drivers/firmware/imx/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/firmware/imx/Kconfig +1
-1@@ -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
-0help The System Controller Firmware (SCFW) based power domain driver.Signature · 1 line
2.7.4
PATCH v3 3/7 rtc: add COMPILE_TEST support for i.MX SC RTC
In reply to Anson HuangAdd 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
@@ -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
PATCH v3 4/7 input: keyboard: add COMPILE_TEST support for KEYBOARD_IMX_SC_KEY
In reply to Anson HuangAdd 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
@@ -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
PATCH v3 5/7 input: keyboard: imx_sc_key: Fix build warning for !CONFIG_IMX_SCU case
In reply to Anson HuangFix 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
@@ -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
PATCH v3 6/7 watchdog: add COMPILE_TEST support for IMX_SC_WDT
In reply to Anson HuangAdd 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
@@ -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
PATCH v3 7/7 thermal: add COMPILE_TEST support for IMX_SC_THERMAL
In reply to Anson HuangAdd 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
@@ -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
Alexandre Belloni
maintainerQuoted 7 lines · Anson Huang
Add stubs for those i.MX SCU APIs to make those modules depending on
IMX_SCUcan pass build whenCOMPILE_TESTis enabled.Signed-off-by Anson Huang <[email protected]>---
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
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_SCUcan pass build whenCOMPILE_TESTis enabled.
Quoted 7 lines
Quoted 4 lines
Signed-off-by Anson Huang <[email protected]>---
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
Guenter Roeck
maintainerQuoted 4 lines · Alexandre Belloni
Quoted 3 lines · Anson Huang
Add stubs for those i.MX SCU APIs to make those modules depending on
IMX_SCUcan pass build whenCOMPILE_TESTis enabled.
Quoted 9 lines
Quoted 4 lines
Signed-off-by Anson Huang <[email protected]>---
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
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_SCUcan pass build whenCOMPILE_TESTis enabled.Quoted 10 lines
Quoted 4 lines
Signed-off-by Anson Huang <[email protected]>---
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 withCOMPILE_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
Alexandre Belloni
maintainerQuoted 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_SCUcan pass build whenCOMPILE_TESTis enabled.Quoted 9 lines
Quoted 4 lines
Signed-off-by Anson Huang <[email protected]>---
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
Guenter Roeck
maintainerQuoted 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_SCUcan pass build whenCOMPILE_TESTis enabled.Signed-off-by Anson Huang <[email protected]>---
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
Alexandre Belloni
maintainerQuoted 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_SCUcan pass build whenCOMPILE_TESTis enabled.Quoted 9 lines
Quoted 4 lines
Signed-off-by Anson Huang <[email protected]>---
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_TESTas 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
Guenter Roeck
maintainerQuoted 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_SCUcan pass build whenCOMPILE_TESTis enabled.Quoted 9 lines
Quoted 4 lines
Signed-off-by Anson Huang <[email protected]>---
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_TESTas 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
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_SCUcan pass build whenCOMPILE_TESTis enabled.Signed-off-by Anson Huang <[email protected]>---
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@@ -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@@ -16,8 +16,27 @@ #include <linux/firmware/imx/svc/misc.h> #include<
linux/firmware/imx/svc/pm.h>+#ifdef
CONFIG_IMX_SCU
intimx_scu_enable_general_irq_channel(struct device *dev); intimx_scu_irq_register_notifier(struct notifier_block *nb); intimx_scu_irq_unregister_notifier(struct notifier_block *nb); intimx_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
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_SCUcan pass build whenCOMPILE_TESTis enabled.Signed-off-by Anson Huang <[email protected]>---
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@@ -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@@ -16,8 +16,27 @@ #include <linux/firmware/imx/svc/misc.h> #include<
linux/firmware/imx/svc/pm.h>+#ifdef
CONFIG_IMX_SCU
intimx_scu_enable_general_irq_channel(struct device *dev); intimx_scu_irq_register_notifier(struct notifier_block *nb); intimx_scu_irq_unregister_notifier(struct notifier_block *nb); intimx_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
Quoted 4 lines · Peng Fan
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/
I dropped that patch from my queue and picked patch #2 from this series as the favor.
Shawn
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%2Fpatchwork.kernel.org%2Fpatch%2F11395247%2F&data=02%7C01%7Cpeng.f an%40n
Quoted 1 line
xp.com%7C995815002e2b490791e008d7c9445133%7C686ea1d3bc2b4c6fa9
2cd99c5cQuoted 1 line
Quoted 6 lines
301635%7C0%7C0%7C637199167574579419&sdata=RM4Mtwl8LZ3ft9 3uL3FQPcHT
Quoted 1 line
9lPHSqBOgugozkcLvag%3D&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
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%2Fpatchwork.kernel.org%2Fpatch%2F11395247%2F&data=02%7C01%7Cpeng.f an%40n
Quoted 1 line
xp.com%7C995815002e2b490791e008d7c9445133%7C686ea1d3bc2b4c6fa9
2cd99c5cQuoted 1 line
Quoted 6 lines
301635%7C0%7C0%7C637199167574579419&sdata=RM4Mtwl8LZ3ft9 3uL3FQPcHT
Quoted 1 line
9lPHSqBOgugozkcLvag%3D&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_SOCdepends onCOMPILE_TEST. If you drop that patch, also need to dropCOMPILE_TESTfromIMX_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
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
patchwork.kernel.org%2Fpatch%2F11395247%2F&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
2cd99c5cQuoted 1 line
301635%7C0%7C0%7C637199167574579419&sdata=RM4Mtwl8LZ3ft9
Quoted 8 lines
Quoted 5 lines
3uL3FQPcHT
Quoted 1 line
9lPHSqBOgugozkcLvag%3D&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_SOCdepends onCOMPILE_TEST. Ifyou
Quoted 12 lines
drop that patch, also need to drop
COMPILE_TESTfromIMX_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_TESTfromIMX_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
Quoted 3 lines · Peng Fan
Just sent out. One more thing, I think all drivers depends on
IMX_SCUshould not haveCOMPILE_TESTif 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
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_SCUshould not haveCOMPILE_TESTif 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_TESTshould be dropped forIMX_SCU_PDin 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
Alexandre Belloni
maintainerQuoted 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_SCUshould not haveCOMPILE_TESTif 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_TESTshould be dropped forIMX_SCU_PDin Anson's patch. Thanks for reminding.I still NOT quite understand why we won't support
COMPILE_TESTfor 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 theCOMPILE_TESTsupport, 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
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_SCUshould not haveCOMPILE_TESTif 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_TESTshould be dropped forIMX_SCU_PDin Anson'spatch.
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_TESTfor 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 theCOMPILE_TESTsupport, any special reason?
Quoted 1 line
COMPILE_TESTis supported as long asIMX_SCUis 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
Alexandre Belloni
maintainerQuoted 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_SCUshould not haveCOMPILE_TESTif 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_TESTshould be dropped forIMX_SCU_PDin Anson'spatch.
Quoted 5 lines
Quoted 1 line
Thanks for reminding.
I still NOT quite understand why we won't support
COMPILE_TESTfor 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 theCOMPILE_TESTsupport, any special reason?
Quoted 1 line
Quoted 7 lines
Quoted 2 lines
COMPILE_TESTis supported as long asIMX_SCUis selected like is it for any driver depending on any bus.But without having " ||
COMPILE_TEST" in kconfig,COMPILE_TESTwill NOT be supported, I think as long as we have stubs for those SCU APIs, all drivers depending onIMX_SCUcan supportCOMPILE_TESTindependently.
Why do you absolutely need to compile them independently? From a code coverage point of view, having:
COMPILE_TEST=yCONFIG_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
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_SCUshould not haveCOMPILE_TESTif 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_TESTshould be dropped forIMX_SCU_PDin Anson'spatch.
Quoted 6 lines
Quoted 1 line
Thanks for reminding.
I still NOT quite understand why we won't support
COMPILE_TESTfor 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 theCOMPILE_TESTsupport, any special reason?
Quoted 1 line
Quoted 6 lines
Quoted 2 lines
COMPILE_TESTis supported as long asIMX_SCUis selected like is it for any driver depending on any bus.But without having " ||
COMPILE_TEST" in kconfig,COMPILE_TESTwill NOT be supported, I think as long as we have stubs for those SCU APIs, all drivers depending onIMX_SCUcan supportCOMPILE_TESTindependently.
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=yis 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=yCONFIG_IMX_SCU=n
Anson
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Alexandre Belloni
maintainerQuoted 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_SCUselected, ONLY withCOMPILE_TESTselected, adding stubs forIMX_SCUAPIs 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
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 caseQuoted 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=yis 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_SCUselected, ONLY withCOMPILE_TESTselected, adding stubs forIMX_SCUAPIs can fix such scenario.
Quoted 8 lines
Quoted 3 lines
COMPILE_TEST=y
CONFIG_IMX_SCU=nWhy is that an issue? If they don't have
IMX_SCUselected, 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
Alexandre Belloni
maintainerQuoted 10 lines · Anson Huang
Quoted 4 lines
Why is that an issue? If they don't have
IMX_SCUselected, 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_SCUselected, other SCU drivers still can be selected for build test after adding "COMPILE_TEST" to the kconfig, like below, if withoutIMX_SCUAPI stubs, the "COMPILE_TEST" can NOT be added to SCU drivers to enable build test, so I think theIMX_SCUAPI 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
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_SCUselected, 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_SCUselected, other SCU drivers still can be selected for build test after adding "COMPILE_TEST" to the kconfig, like below, if withoutIMX_SCUAPI stubs, the "COMPILE_TEST" can NOT be added to SCU drivers to enable build test, so I
Quoted 7 lines
think the
IMX_SCUAPI stubs should be added?Quoted 1 line
No they shouldn't because there is not point adding
COMPILE_TESTto the SCU drivers. We don't addCOMPILE_TESTto 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
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];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 caseQuoted 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=yis 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_SCUselected, ONLY withCOMPILE_TESTselected, adding stubs forIMX_SCUAPIs can fix such scenario.Quoted 8 lines
Quoted 3 lines
COMPILE_TEST=y
CONFIG_IMX_SCU=nWhy is that an issue? If they don't have
IMX_SCUselected, 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_SCUselected, other SCU drivers still can be selected for build test after adding "COMPILE_TEST" to the kconfig, like below, if withoutIMX_SCUAPI stubs, the "COMPILE_TEST" can NOT be added to SCU drivers to enable build test, so I think theIMX_SCUAPI 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 onIMX_SCU||COMPILE_TESTthanks,
Anson
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];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 caseQuoted 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=yis 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_SCUselected, ONLY withCOMPILE_TESTselected, adding stubs forIMX_SCUAPIs can fix such scenario.Quoted 8 lines
Quoted 3 lines
COMPILE_TEST=y
CONFIG_IMX_SCU=nWhy is that an issue? If they don't have
IMX_SCUselected, 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_SCUselected, other SCU drivers still can be selected for build test after adding "COMPILE_TEST" to the kconfig, like below, if withoutIMX_SCUAPI stubs, the "COMPILE_TEST" can NOT be added to SCU drivers to enable build test, so I think theIMX_SCUAPI 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_SCUto 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
Guenter Roeck
maintainerQuoted 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];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 caseQuoted 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=yis 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_SCUselected, ONLY withCOMPILE_TESTselected, adding stubs forIMX_SCUAPIs can fix such scenario.Quoted 8 lines
Quoted 3 lines
COMPILE_TEST=y
CONFIG_IMX_SCU=nWhy is that an issue? If they don't have
IMX_SCUselected, 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_SCUselected, other SCU drivers still can be selected for build test after adding "COMPILE_TEST" to the kconfig, like below, if withoutIMX_SCUAPI stubs, the "COMPILE_TEST" can NOT be added to SCU drivers to enable build test, so I think theIMX_SCUAPI 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_SCUto 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
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 FanQuoted 50 lines
Quoted 39 lines
Quoted 2 lines
[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 caseQuoted 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=yis 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_SCUselected, ONLY withCOMPILE_TESTselected, adding stubs forIMX_SCUAPIs can fix such scenario.Quoted 8 lines
Quoted 3 lines
COMPILE_TEST=y
CONFIG_IMX_SCU=nWhy is that an issue? If they don't have
IMX_SCUselected, 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_SCUselected, other SCU drivers still can be selected for build test after adding "COMPILE_TEST" to the kconfig, like below, if withoutIMX_SCUAPI stubs, the "COMPILE_TEST" can NOT be added to SCU drivers to enable build test, so I think theIMX_SCUAPI 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_SCUto guard the include.Add "depends on
IMX_SCU" to theKconfigentry for those drivers, and/or drop "COMPILE_TEST" from theirKconfigentry.Really,
COMPILE_TESTis 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