Support MTK_SMI modular
Subsystems (3)
Yong Wu
maintainerThis patchset mainly support MTK_SMI could be modular. No other function add. The MTK_IOMMU config will be another patchset.
rebase on v5.11-rc1.
Yong Wu (3):
memory: mtk-smi: Use platform_register_drivers
memory: mtk-smi: Add module_exit and module_license
memory: mtk-smi: Switch MTK_SMI to tristate
drivers/memory/Kconfig | 2 +- drivers/memory/mtk-smi.c | 33 +++++++++++++++------------------ include/soc/mediatek/smi.h | 2 +- 3 files changed, 17 insertions(+), 20 deletions(-)
Signature · 7 lines
2.18.0 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Yong Wu
maintainerPATCH 1/3 memory: mtk-smi: Use platform_register_drivers
In this file, we have 2 drivers, smi-common and smi-larb. Use platform_register_drivers.
--- drivers/memory/mtk-smi.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-)
drivers/memory/mtk-smi.c +6 -19
@@ -587,26 +587,13 @@ static struct platform_driver mtk_smi_common_driver = { } }; +static struct platform_driver *const smidrivers[] = { + &mtk_smi_common_driver, + &mtk_smi_larb_driver, +}; +static int __init mtk_smi_init (void ) { -int ret; - - ret =platform_driver_register (&mtk_smi_common_driver); -if (ret !=0 ) { -pr_err ("Failed to register SMI driver\n" ); -return ret; - } - - ret =platform_driver_register (&mtk_smi_larb_driver); -if (ret !=0 ) { -pr_err ("Failed to register SMI-LARB driver\n" ); - goto err_unreg_smi; - } -return ret; - -err_unreg_smi: -platform_driver_unregister (&mtk_smi_common_driver); -return ret; +return platform_register_drivers (smidrivers,ARRAY_SIZE (smidrivers)); } -module_init (mtk_smi_init);
Signature · 6 lines
2.18.0 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 1/3] memory: mtk-smi: Use platform_register_drivers
Quoted 7 lines · Yong Wu
In this file, we have 2 drivers, smi-common and smi-larb. Use
platform_register_drivers.Signed-off-by Yong Wu <[email protected]>--- drivers/memory/mtk-smi.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-)
Thanks, applied.
Best regards,
Krzysztof
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Yong Wu
maintainerPATCH 2/3 memory: mtk-smi: Add module_exit and module_license
In reply to Yong WuThe config MTK_SMI always depends on MTK_IOMMU which is built-in currently. Thus we don't have module_exit before. This patch adds module_exit and module_license. It is a preparing patch for supporting MTK_SMI could been built as a module.
--- drivers/memory/mtk-smi.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/memory/mtk-smi.c +10 -0
@@ -597,3 +597,13 @@ static int __init mtk_smi_init(void)return platform_register_drivers (smidrivers,ARRAY_SIZE (smidrivers)); }module_init (mtk_smi_init); + +static void __exit mtk_smi_exit(void) +{ +platform_unregister_drivers (smidrivers,ARRAY_SIZE (smidrivers)); +} +module_exit (mtk_smi_exit); + +MODULE_DESCRIPTION ("MediaTek SMI driver" ); +MODULE_ALIAS ("platform:MediaTek-SMI" ); +MODULE_LICENSE ("GPL v2" );
Signature · 6 lines
2.18.0 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Krzysztof Kozlowski
maintainerRe: [PATCH 2/3] memory: mtk-smi: Add module_exit and module_license
Quoted 17 lines · Yong Wu
The config
MTK_SMIalways depends onMTK_IOMMUwhich is built-in currently. Thus we don't havemodule_exitbefore. This patch addsmodule_exitandmodule_license. It is a preparing patch for supportingMTK_SMIcould been built as a module.Signed-off-by Yong Wu <[email protected]>--- drivers/memory/mtk-smi.c | 10 ++++++++++ 1 file changed, 10 insertions(+)drivers/memory/mtk-smi.c +0
-0@@ -597,3 +597,13 @@ static int __init mtk_smi_init(void)return platform_register_drivers (smidrivers,ARRAY_SIZE (smidrivers)); }
drivers/memory/mtk-smi.c static int __init mtk_smi_init(void) · line 608
Quoted 10 lines
drivers/memory/mtk-smi.c +9
-0module_init (mtk_smi_init); + +static void __exit mtk_smi_exit(void) +{ +platform_unregister_drivers (smidrivers,ARRAY_SIZE (smidrivers)); +} +module_exit (mtk_smi_exit); + +MODULE_DESCRIPTION ("MediaTek SMI driver" ); +MODULE_ALIAS ("platform:MediaTek-SMI" );
Drivers do not use capital letters, so I have doubts whether this alias is correct.
Adding all these should be squashed with changing Kconfig into tristate. It does not have sense on its own.
Best regards,
Krzysztof
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Yong Wu
maintainerRe: [PATCH 2/3] memory: mtk-smi: Add module_exit and module_license
Quoted 23 lines · Krzysztof Kozlowski
Quoted 22 lines · Yong Wu
The config
MTK_SMIalways depends onMTK_IOMMUwhich is built-in currently. Thus we don't havemodule_exitbefore. This patch addsmodule_exitandmodule_license. It is a preparing patch for supportingMTK_SMIcould been built as a module.Signed-off-by Yong Wu <[email protected]>--- drivers/memory/mtk-smi.c | 10 ++++++++++ 1 file changed, 10 insertions(+)drivers/memory/mtk-smi.c +4
-0@@ -597,3 +597,13 @@ static int __init mtk_smi_init(void)return platform_register_drivers (smidrivers,ARRAY_SIZE (smidrivers)); }module_init (mtk_smi_init); + +static void __exit mtk_smi_exit(void) +{ +platform_unregister_drivers (smidrivers,ARRAY_SIZE (smidrivers));
Quoted 8 lines
drivers/memory/mtk-smi.c static int __init mtk_smi_init(void) · line 608
Quoted 5 lines
drivers/memory/mtk-smi.c +5
-0+} +module_exit (mtk_smi_exit); + +MODULE_DESCRIPTION ("MediaTek SMI driver" ); +MODULE_ALIAS ("platform:MediaTek-SMI" );Drivers do not use capital letters, so I have doubts whether this alias is correct.
I didn't care the upper/lower-case. I will change to lower case in next time.
MODULE_ALIAS("platform:MediaTek-smi")
Quoted 3 lines
Adding all these should be squashed with changing
Kconfiginto tristate. It does not have sense on its own.
Thanks very much for review.
Only confirm: Squash whole this patch or only squash the MODULE_x into the next patch?
Quoted 3 lines
Best regards,
Krzysztof
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Krzysztof Kozlowski
maintainerRe: [PATCH 2/3] memory: mtk-smi: Add module_exit and module_license
Quoted 33 lines · Yong Wu
Quoted 23 lines · Krzysztof Kozlowski
Quoted 22 lines · Yong Wu
The config
MTK_SMIalways depends onMTK_IOMMUwhich is built-in currently. Thus we don't havemodule_exitbefore. This patch addsmodule_exitandmodule_license. It is a preparing patch for supportingMTK_SMIcould been built as a module.Signed-off-by Yong Wu <[email protected]>--- drivers/memory/mtk-smi.c | 10 ++++++++++ 1 file changed, 10 insertions(+)drivers/memory/mtk-smi.c +4
-0@@ -597,3 +597,13 @@ static int __init mtk_smi_init(void)return platform_register_drivers (smidrivers,ARRAY_SIZE (smidrivers)); }module_init (mtk_smi_init); + +static void __exit mtk_smi_exit(void) +{ +platform_unregister_drivers (smidrivers,ARRAY_SIZE (smidrivers));Quoted 8 lines
drivers/memory/mtk-smi.c static int __init mtk_smi_init(void) · line 608
Quoted 5 lines
drivers/memory/mtk-smi.c +5
-0+} +module_exit (mtk_smi_exit); + +MODULE_DESCRIPTION ("MediaTek SMI driver" ); +MODULE_ALIAS ("platform:MediaTek-SMI" );Drivers do not use capital letters, so I have doubts whether this alias is correct.
Quoted 2 lines
I didn't care the upper/lower-case. I will change to lower case in next time.
Then why do you need the alias? The name does not match driver name, so what's the purpose of this alias/
Quoted 11 lines
MODULE_ALIAS("platform:MediaTek-smi")Quoted 3 lines
Adding all these should be squashed with changing
Kconfiginto tristate. It does not have sense on its own.Thanks very much for review.
Only confirm: Squash whole this patch or only squash the
MODULE_xinto the next patch?
This entire patch 2/3 should be with 3/3.
Best regards,
Krzysztof
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Yong Wu
maintainerRe: [PATCH 2/3] memory: mtk-smi: Add module_exit and module_license
Quoted 34 lines · Krzysztof Kozlowski
Quoted 33 lines · Yong Wu
Quoted 31 lines · Krzysztof Kozlowski
Quoted 17 lines · Yong Wu
The config
MTK_SMIalways depends onMTK_IOMMUwhich is built-in currently. Thus we don't havemodule_exitbefore. This patch addsmodule_exitandmodule_license. It is a preparing patch for supportingMTK_SMIcould been built as a module.Signed-off-by Yong Wu <[email protected]>--- drivers/memory/mtk-smi.c | 10 ++++++++++ 1 file changed, 10 insertions(+)drivers/memory/mtk-smi.c +0
-0@@ -597,3 +597,13 @@ static int __init mtk_smi_init(void)return platform_register_drivers (smidrivers,ARRAY_SIZE (smidrivers)); }drivers/memory/mtk-smi.c static int __init mtk_smi_init(void) · line 608
Quoted 10 lines
drivers/memory/mtk-smi.c +9
-0module_init (mtk_smi_init); + +static void __exit mtk_smi_exit(void) +{ +platform_unregister_drivers (smidrivers,ARRAY_SIZE (smidrivers)); +} +module_exit (mtk_smi_exit); + +MODULE_DESCRIPTION ("MediaTek SMI driver" ); +MODULE_ALIAS ("platform:MediaTek-SMI" );Drivers do not use capital letters, so I have doubts whether this alias is correct.
Quoted 5 lines
Quoted 2 lines
I didn't care the upper/lower-case. I will change to lower case in next time.
Then why do you need the alias? The name does not match driver name, so what's the purpose of this alias/
I think it is not so necessary for us. I will delete this line in next version.
Only curious what's alias is fit in our case? normally it should be the file name: mtk-smi?
Quoted 8 lines
Quoted 8 lines
MODULE_ALIAS("platform:MediaTek-smi")Quoted 3 lines
Adding all these should be squashed with changing
Kconfiginto tristate. It does not have sense on its own.
Quoted 6 lines
Quoted 4 lines
Thanks very much for review.
Only confirm: Squash whole this patch or only squash the
MODULE_xinto the next patch?This entire patch 2/3 should be with 3/3.
Thanks for the confirm.
Quoted 3 lines
Best regards,
Krzysztof
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Krzysztof Kozlowski
maintainerRe: [PATCH 2/3] memory: mtk-smi: Add module_exit and module_license
Quoted 38 lines · Yong Wu
Quoted 37 lines · Krzysztof Kozlowski
Quoted 35 lines · Yong Wu
Quoted 23 lines · Krzysztof Kozlowski
Quoted 22 lines · Yong Wu
The config
MTK_SMIalways depends onMTK_IOMMUwhich is built-in currently. Thus we don't havemodule_exitbefore. This patch addsmodule_exitandmodule_license. It is a preparing patch for supportingMTK_SMIcould been built as a module.Signed-off-by Yong Wu <[email protected]>--- drivers/memory/mtk-smi.c | 10 ++++++++++ 1 file changed, 10 insertions(+)drivers/memory/mtk-smi.c +4
-0@@ -597,3 +597,13 @@ static int __init mtk_smi_init(void)return platform_register_drivers (smidrivers,ARRAY_SIZE (smidrivers)); }module_init (mtk_smi_init); + +static void __exit mtk_smi_exit(void) +{ +platform_unregister_drivers (smidrivers,ARRAY_SIZE (smidrivers));Quoted 8 lines
drivers/memory/mtk-smi.c static int __init mtk_smi_init(void) · line 608
Quoted 5 lines
drivers/memory/mtk-smi.c +5
-0+} +module_exit (mtk_smi_exit); + +MODULE_DESCRIPTION ("MediaTek SMI driver" ); +MODULE_ALIAS ("platform:MediaTek-SMI" );Drivers do not use capital letters, so I have doubts whether this alias is correct.
I didn't care the upper/lower-case. I will change to lower case in next time.
Quoted 8 lines
Quoted 2 lines
Then why do you need the alias? The name does not match driver name, so what's the purpose of this alias/
I think it is not so necessary for us. I will delete this line in next version.
Only curious what's alias is fit in our case? normally it should be the file name: mtk-smi?
If autoloading of your module works, then remove it. The alias is necessary for some cases when a device table is missing (e.g. platform driver is matched via devicetree but not having the platform_device_id table) or matching is done via different method (e.g. driver is matched from MFD via devicetree compatible even though there is a platform_device_id table).
Best regards,
Krzysztof
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Yong Wu
maintainerRe: [PATCH 2/3] memory: mtk-smi: Add module_exit and module_license
Quoted 48 lines · Krzysztof Kozlowski
Quoted 38 lines · Yong Wu
Quoted 37 lines · Krzysztof Kozlowski
Quoted 35 lines · Yong Wu
Quoted 23 lines · Krzysztof Kozlowski
Quoted 22 lines · Yong Wu
The config
MTK_SMIalways depends onMTK_IOMMUwhich is built-in currently. Thus we don't havemodule_exitbefore. This patch addsmodule_exitandmodule_license. It is a preparing patch for supportingMTK_SMIcould been built as a module.Signed-off-by Yong Wu <[email protected]>--- drivers/memory/mtk-smi.c | 10 ++++++++++ 1 file changed, 10 insertions(+)drivers/memory/mtk-smi.c +4
-0@@ -597,3 +597,13 @@ static int __init mtk_smi_init(void)return platform_register_drivers (smidrivers,ARRAY_SIZE (smidrivers)); }module_init (mtk_smi_init); + +static void __exit mtk_smi_exit(void) +{ +platform_unregister_drivers (smidrivers,ARRAY_SIZE (smidrivers));Quoted 8 lines
drivers/memory/mtk-smi.c static int __init mtk_smi_init(void) · line 608
Quoted 5 lines
drivers/memory/mtk-smi.c +5
-0+} +module_exit (mtk_smi_exit); + +MODULE_DESCRIPTION ("MediaTek SMI driver" ); +MODULE_ALIAS ("platform:MediaTek-SMI" );Drivers do not use capital letters, so I have doubts whether this alias is correct.
I didn't care the upper/lower-case. I will change to lower case in next time.
Quoted 8 lines
Quoted 2 lines
Then why do you need the alias? The name does not match driver name, so what's the purpose of this alias/
I think it is not so necessary for us. I will delete this line in next version.
Only curious what's alias is fit in our case? normally it should be the file name: mtk-smi?
Quoted 6 lines
If autoloading of your module works, then remove it. The alias is necessary for some cases when a device table is missing (e.g. platform driver is matched via devicetree but not having the
platform_device_idtable) or matching is done via different method (e.g. driver is matched from MFD via devicetree compatible even though there is aplatform_device_idtable).
Thanks for explaination so detailly. v2 is sent just now.
Quoted 3 lines
Best regards,
Krzysztof
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Yong Wu
maintainerPATCH 3/3 memory: mtk-smi: Switch MTK_SMI to tristate
In reply to Yong WuThis patch switches MTK_SMI to tristate. Support it could be 'm'.
Meanwhile, Fix a build issue while MTK_SMI is built as module.
---
This patch has a little conflict with the mt8192 iommu patch which delete the MTK_LARB_NR_MAX in smi.h(It's still reviewing). This patch rebase on the clean v5.11-rc1.
--- drivers/memory/Kconfig | 2 +- include/soc/mediatek/smi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/memory/Kconfig +1 -1
@@ -173,7 +173,7 @@ config JZ4780_NEMC memory devices such as NAND and SRAM. config MTK_SMI - bool "Mediatek SoC Memory Controller driver" if COMPILE_TEST + tristate "Mediatek SoC Memory Controller driver" if COMPILE_TEST depends on ARCH_MEDIATEK || COMPILE_TEST help This driver is for the Memory Controller module in MediaTek SoCs,
include/soc/mediatek/smi.h +1 -1
@@ -9,7 +9,7 @@#include <linux/bitops.h> #include <linux/device.h> -#ifdef CONFIG_MTK_SMI +#if IS_ENABLED (CONFIG_MTK_SMI )#define MTK_LARB_NR_MAX 16
Signature · 6 lines
2.18.0 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Krzysztof Kozlowski
maintainerRe: [PATCH 3/3] memory: mtk-smi: Switch MTK_SMI to tristate
Quoted 3 lines · Yong Wu
This patch switches
MTK_SMIto tristate. Support it could be 'm'.Meanwhile, Fix a build issue while
MTK_SMIis built as module.
s/Fix/fix.
What error is being fixed here? How can I reproduce it? Aren't you just adjusting it to being buildable by module?
Best regards,
Krzysztof
Quoted 29 lines
Signed-off-by Yong Wu <[email protected]>---
This patch has a little conflict with the mt8192 iommu patch which delete theMTK_LARB_NR_MAXinsmi.h(It's still reviewing). This patch rebase on the clean v5.11-rc1.--- drivers/memory/Kconfig | 2 +- include/soc/mediatek/smi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/memory/Kconfig +1
-1@@ -173,7 +173,7 @@ config JZ4780_NEMC memory devices such as NAND and SRAM. config MTK_SMI - bool "Mediatek SoC Memory Controller driver" if COMPILE_TEST + tristate "Mediatek SoC Memory Controller driver" if COMPILE_TEST depends on ARCH_MEDIATEK || COMPILE_TEST help This driver is for the Memory Controller module in MediaTek SoCs,include/soc/mediatek/smi.h +0
-0
include/soc/mediatek/smi.h line 12
Quoted 5 lines
include/soc/mediatek/smi.h +1
-1@@ -9,7 +9,7 @@#include <linux/bitops.h> #include <linux/device.h> -#ifdef CONFIG_MTK_SMI +#if IS_ENABLED (CONFIG_MTK_SMI )
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Yong Wu
maintainerRe: [PATCH 3/3] memory: mtk-smi: Switch MTK_SMI to tristate
Quoted 9 lines · Krzysztof Kozlowski
Quoted 3 lines · Yong Wu
This patch switches
MTK_SMIto tristate. Support it could be 'm'.Meanwhile, Fix a build issue while
MTK_SMIis built as module.s/Fix/fix.
What error is being fixed here? How can I reproduce it? Aren't you just adjusting it to being buildable by module?
Sorry, I didn't copy the fail log here. This is the build log:
In file included from .../drivers/iommu/mtk_iommu.c:34:0:.../drivers/iommu/mtk_iommu.h:84:28: error: array type has incomplete element type 'struct mtk_smi_larb_iommu'
struct mtk_smi_larb_iommu larb_imu[MTK_LARB_NR_MAX];
Our iommu driver will use this structure. but it was contained by "#ifdef CONFIG_MTK_SMI". thus I change it to "#if IS_ENABLED(CONFIG_MTK_SMI)"
If reproducing it, we should change mtk-iommu to module_init[1]. and switch kconfig MTK_IOMMU to tristate, then change the CONFIG_MTK_IOMMU to m. we could get the fail log.
In this case, Should I squash this change into this patch? I though this is a preparing patch and the fail is caused by MTK_SMI. thus I squash that into this patch. or change it as a independent patch and send when I change MTK_IOMMU to tristate?
[1]
https://lore.kernel.org/linux-mediatek/[email protected]/
Quoted 37 lines
Best regards,
KrzysztofQuoted 32 lines
Signed-off-by Yong Wu <[email protected]>---
This patch has a little conflict with the mt8192 iommu patch which delete theMTK_LARB_NR_MAXinsmi.h(It's still reviewing). This patch rebase on the clean v5.11-rc1.--- drivers/memory/Kconfig | 2 +- include/soc/mediatek/smi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/memory/Kconfig +1
-1@@ -173,7 +173,7 @@ config JZ4780_NEMC memory devices such as NAND and SRAM. config MTK_SMI - bool "Mediatek SoC Memory Controller driver" if COMPILE_TEST + tristate "Mediatek SoC Memory Controller driver" if COMPILE_TEST depends on ARCH_MEDIATEK || COMPILE_TEST help This driver is for the Memory Controller module in MediaTek SoCs,include/soc/mediatek/smi.h +0
-0@@ -9,7 +9,7 @@#include <linux/bitops.h> #include <linux/device.h>
Quoted 2 lines
include/soc/mediatek/smi.h line 12
Quoted 2 lines
include/soc/mediatek/smi.h +1
-1-#ifdef CONFIG_MTK_SMI +#if IS_ENABLED (CONFIG_MTK_SMI )
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Krzysztof Kozlowski
maintainerRe: [PATCH 3/3] memory: mtk-smi: Switch MTK_SMI to tristate
Quoted 22 lines · Yong Wu
Quoted 9 lines · Krzysztof Kozlowski
Quoted 3 lines · Yong Wu
This patch switches
MTK_SMIto tristate. Support it could be 'm'.Meanwhile, Fix a build issue while
MTK_SMIis built as module.s/Fix/fix.
What error is being fixed here? How can I reproduce it? Aren't you just adjusting it to being buildable by module?
Sorry, I didn't copy the fail log here. This is the build log:
In file included from
.../drivers/iommu/mtk_iommu.c:34:0:.../drivers/iommu/mtk_iommu.h:84:28: error: array type has incomplete element type 'structmtk_smi_larb_iommu'
structmtk_smi_larb_iommularb_imu[MTK_LARB_NR_MAX];Our iommu driver will use this structure. but it was contained by "#ifdef
CONFIG_MTK_SMI". thus I change it to "#ifIS_ENABLED(CONFIG_MTK_SMI)"
Quoted 8 lines
If reproducing it, we should change mtk-iommu to module_init[1]. and switch kconfig
MTK_IOMMUto tristate, then change theCONFIG_MTK_IOMMUto m. we could get the fail log.In this case, Should I squash this change into this patch? I though this is a preparing patch and the fail is caused by
MTK_SMI. thus I squash that into this patch. or change it as a independent patch and send when I changeMTK_IOMMUto tristate?
If I understand correctly, there is no error before this patch. In such case just don't mention the error to fix, because it is simply part of making things modular.
Best regards,
Krzysztof
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Yong Wu
maintainerRe: [PATCH 3/3] memory: mtk-smi: Switch MTK_SMI to tristate
Quoted 27 lines · Krzysztof Kozlowski
Quoted 26 lines · Yong Wu
Quoted 9 lines · Krzysztof Kozlowski
Quoted 3 lines · Yong Wu
This patch switches
MTK_SMIto tristate. Support it could be 'm'.Meanwhile, Fix a build issue while
MTK_SMIis built as module.s/Fix/fix.
What error is being fixed here? How can I reproduce it? Aren't you just adjusting it to being buildable by module?
Sorry, I didn't copy the fail log here. This is the build log:
In file included from
.../drivers/iommu/mtk_iommu.c:34:0:.../drivers/iommu/mtk_iommu.h:84:28: error: array type has incomplete element type 'structmtk_smi_larb_iommu'
structmtk_smi_larb_iommularb_imu[MTK_LARB_NR_MAX];Our iommu driver will use this structure. but it was contained by "#ifdef
CONFIG_MTK_SMI". thus I change it to "#ifIS_ENABLED(CONFIG_MTK_SMI)"If reproducing it, we should change mtk-iommu to module_init[1]. and switch kconfig
MTK_IOMMUto tristate, then change theCONFIG_MTK_IOMMUto m. we could get the fail log.
Quoted 8 lines
Quoted 4 lines
In this case, Should I squash this change into this patch? I though this is a preparing patch and the fail is caused by
MTK_SMI. thus I squash that into this patch. or change it as a independent patch and send when I changeMTK_IOMMUto tristate?If I understand correctly, there is no error before this patch. In such case just don't mention the error to fix, because it is simply part of making things modular.
Yes. No error before this patch.
Appreciate for your help. I will remove this in the comment message in the next version.
Quoted 4 lines
Best regards,
Krzysztof
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu