* [PATCH v3 1/5] cdx: Enable compile testing
2025-05-02 6:20 [PATCH v3 0/5] cdx: Minor cleanups Krzysztof Kozlowski
@ 2025-05-02 6:20 ` Krzysztof Kozlowski
2025-05-02 6:20 ` [PATCH v3 2/5] cdx: controller: Simplify with dev_err_probe() Krzysztof Kozlowski
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-02 6:20 UTC (permalink / raw)
To: Nipun Gupta, Nikhil Agarwal; +Cc: linux-kernel, Krzysztof Kozlowski
There is no code limited to ARM64 or OF/Devicetree in the CDX bus
driver, so CDX_BUS can be compile tested on all platforms.
CDX_CONTROLLER on the other hand selects REMOTEPROC which depends on
HAS_DMA, so add that dependency for compile testing.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/cdx/Kconfig | 2 +-
drivers/cdx/controller/Kconfig | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/cdx/Kconfig b/drivers/cdx/Kconfig
index a08958485e316a1a3e00390d90c7a9eaa518d0e8..1f1e360507d7d5c33671c601534e82f2d4de0424 100644
--- a/drivers/cdx/Kconfig
+++ b/drivers/cdx/Kconfig
@@ -7,7 +7,7 @@
config CDX_BUS
bool "CDX Bus driver"
- depends on OF && ARM64
+ depends on OF && ARM64 || COMPILE_TEST
help
Driver to enable Composable DMA Transfer(CDX) Bus. CDX bus
exposes Fabric devices which uses composable DMA IP to the
diff --git a/drivers/cdx/controller/Kconfig b/drivers/cdx/controller/Kconfig
index f8e729761aeed03302d6c625b74f5e54bfd1bcbf..0641a4c21e660833efd9ac05e9431b58aa10ec03 100644
--- a/drivers/cdx/controller/Kconfig
+++ b/drivers/cdx/controller/Kconfig
@@ -9,6 +9,7 @@ if CDX_BUS
config CDX_CONTROLLER
tristate "CDX bus controller"
+ depends on HAS_DMA
select GENERIC_MSI_IRQ
select REMOTEPROC
select RPMSG
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v3 2/5] cdx: controller: Simplify with dev_err_probe()
2025-05-02 6:20 [PATCH v3 0/5] cdx: Minor cleanups Krzysztof Kozlowski
2025-05-02 6:20 ` [PATCH v3 1/5] cdx: Enable compile testing Krzysztof Kozlowski
@ 2025-05-02 6:20 ` Krzysztof Kozlowski
2025-05-02 6:20 ` [PATCH v3 3/5] cdx: controller: Drop useless probe success message Krzysztof Kozlowski
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-02 6:20 UTC (permalink / raw)
To: Nipun Gupta, Nikhil Agarwal; +Cc: linux-kernel, Krzysztof Kozlowski
Simplify printing probe failures and handling deferred probe with
dev_err_probe().
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/cdx/controller/cdx_controller.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/cdx/controller/cdx_controller.c b/drivers/cdx/controller/cdx_controller.c
index d623f9c7517a86c06082c0db348688e7f33b7be6..3df35833f0e0a994af0606eee0dc1dfc9c7c22f9 100644
--- a/drivers/cdx/controller/cdx_controller.c
+++ b/drivers/cdx/controller/cdx_controller.c
@@ -195,15 +195,13 @@ static int xlnx_cdx_probe(struct platform_device *pdev)
/* Create MSI domain */
cdx->msi_domain = cdx_msi_domain_init(&pdev->dev);
if (!cdx->msi_domain) {
- dev_err(&pdev->dev, "cdx_msi_domain_init() failed");
- ret = -ENODEV;
+ ret = dev_err_probe(&pdev->dev, -ENODEV, "cdx_msi_domain_init() failed");
goto cdx_msi_fail;
}
ret = cdx_setup_rpmsg(pdev);
if (ret) {
- if (ret != -EPROBE_DEFER)
- dev_err(&pdev->dev, "Failed to register CDX RPMsg transport\n");
+ dev_err_probe(&pdev->dev, ret, "Failed to register CDX RPMsg transport\n");
goto cdx_rpmsg_fail;
}
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v3 3/5] cdx: controller: Drop useless probe success message
2025-05-02 6:20 [PATCH v3 0/5] cdx: Minor cleanups Krzysztof Kozlowski
2025-05-02 6:20 ` [PATCH v3 1/5] cdx: Enable compile testing Krzysztof Kozlowski
2025-05-02 6:20 ` [PATCH v3 2/5] cdx: controller: Simplify with dev_err_probe() Krzysztof Kozlowski
@ 2025-05-02 6:20 ` Krzysztof Kozlowski
2025-05-02 6:20 ` [PATCH v3 4/5] cdx: controller: Do not open-code module_platform_driver() Krzysztof Kozlowski
` (2 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-02 6:20 UTC (permalink / raw)
To: Nipun Gupta, Nikhil Agarwal; +Cc: linux-kernel, Krzysztof Kozlowski
Drivers should be silent on probe success, unless they print some useful
information. Printing "hey I probed" is not useful and kernel already
gives mechanism to investigate that (e.g. sysfs, tracing, initcall
debug).
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/cdx/controller/cdx_controller.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/cdx/controller/cdx_controller.c b/drivers/cdx/controller/cdx_controller.c
index 3df35833f0e0a994af0606eee0dc1dfc9c7c22f9..fce90926d3378ae60166426cbf8e4a4fe014af86 100644
--- a/drivers/cdx/controller/cdx_controller.c
+++ b/drivers/cdx/controller/cdx_controller.c
@@ -205,7 +205,6 @@ static int xlnx_cdx_probe(struct platform_device *pdev)
goto cdx_rpmsg_fail;
}
- dev_info(&pdev->dev, "Successfully registered CDX controller with RPMsg as transport\n");
return 0;
cdx_rpmsg_fail:
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v3 4/5] cdx: controller: Do not open-code module_platform_driver()
2025-05-02 6:20 [PATCH v3 0/5] cdx: Minor cleanups Krzysztof Kozlowski
` (2 preceding siblings ...)
2025-05-02 6:20 ` [PATCH v3 3/5] cdx: controller: Drop useless probe success message Krzysztof Kozlowski
@ 2025-05-02 6:20 ` Krzysztof Kozlowski
2025-05-02 6:20 ` [PATCH v3 5/5] cdx: controller: Drop unneeded driver.pm NULL assignment Krzysztof Kozlowski
2025-05-06 10:59 ` [PATCH v3 0/5] cdx: Minor cleanups Agarwal, Nikhil
5 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-02 6:20 UTC (permalink / raw)
To: Nipun Gupta, Nikhil Agarwal; +Cc: linux-kernel, Krzysztof Kozlowski
Replace standard platform_driver_register() boilerplate with
module_platform_driver() to make code smaller.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/cdx/controller/cdx_controller.c | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/drivers/cdx/controller/cdx_controller.c b/drivers/cdx/controller/cdx_controller.c
index fce90926d3378ae60166426cbf8e4a4fe014af86..bfb5ac2d861f2708214ae28922a7c0cfdcdf5cc6 100644
--- a/drivers/cdx/controller/cdx_controller.c
+++ b/drivers/cdx/controller/cdx_controller.c
@@ -250,24 +250,7 @@ static struct platform_driver cdx_pdriver = {
.remove = xlnx_cdx_remove,
};
-static int __init cdx_controller_init(void)
-{
- int ret;
-
- ret = platform_driver_register(&cdx_pdriver);
- if (ret)
- pr_err("platform_driver_register() failed: %d\n", ret);
-
- return ret;
-}
-
-static void __exit cdx_controller_exit(void)
-{
- platform_driver_unregister(&cdx_pdriver);
-}
-
-module_init(cdx_controller_init);
-module_exit(cdx_controller_exit);
+module_platform_driver(cdx_pdriver);
MODULE_AUTHOR("AMD Inc.");
MODULE_DESCRIPTION("CDX controller for AMD devices");
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v3 5/5] cdx: controller: Drop unneeded driver.pm NULL assignment
2025-05-02 6:20 [PATCH v3 0/5] cdx: Minor cleanups Krzysztof Kozlowski
` (3 preceding siblings ...)
2025-05-02 6:20 ` [PATCH v3 4/5] cdx: controller: Do not open-code module_platform_driver() Krzysztof Kozlowski
@ 2025-05-02 6:20 ` Krzysztof Kozlowski
2025-05-06 10:59 ` [PATCH v3 0/5] cdx: Minor cleanups Agarwal, Nikhil
5 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-02 6:20 UTC (permalink / raw)
To: Nipun Gupta, Nikhil Agarwal; +Cc: linux-kernel, Krzysztof Kozlowski
Struct driver in platform_driver is zero-ed so there is no need to
assign its 'pm' member to NULL.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/cdx/controller/cdx_controller.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/cdx/controller/cdx_controller.c b/drivers/cdx/controller/cdx_controller.c
index bfb5ac2d861f2708214ae28922a7c0cfdcdf5cc6..fca83141e3e66e68e6916077833db2b7d816395f 100644
--- a/drivers/cdx/controller/cdx_controller.c
+++ b/drivers/cdx/controller/cdx_controller.c
@@ -243,7 +243,6 @@ MODULE_DEVICE_TABLE(of, cdx_match_table);
static struct platform_driver cdx_pdriver = {
.driver = {
.name = "cdx-controller",
- .pm = NULL,
.of_match_table = cdx_match_table,
},
.probe = xlnx_cdx_probe,
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread* RE: [PATCH v3 0/5] cdx: Minor cleanups
2025-05-02 6:20 [PATCH v3 0/5] cdx: Minor cleanups Krzysztof Kozlowski
` (4 preceding siblings ...)
2025-05-02 6:20 ` [PATCH v3 5/5] cdx: controller: Drop unneeded driver.pm NULL assignment Krzysztof Kozlowski
@ 2025-05-06 10:59 ` Agarwal, Nikhil
2025-05-22 18:30 ` Krzysztof Kozlowski
5 siblings, 1 reply; 10+ messages in thread
From: Agarwal, Nikhil @ 2025-05-06 10:59 UTC (permalink / raw)
To: Krzysztof Kozlowski, Gupta, Nipun, Greg KH; +Cc: linux-kernel@vger.kernel.org
> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: Friday, May 2, 2025 11:51 AM
> To: Gupta, Nipun <Nipun.Gupta@amd.com>; Agarwal, Nikhil
> <nikhil.agarwal@amd.com>
> Cc: linux-kernel@vger.kernel.org; Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org>
> Subject: [PATCH v3 0/5] cdx: Minor cleanups
>
> Changes in v3:
> - Drop maintainer's update, on Greg's request
> - Link to v2: https://lore.kernel.org/r/20250430-cdx-clean-v2-0-
> 7dbfda9364a9@linaro.org
>
> Changes in v2:
> - Patch #1: Add HAS_DMA dependency
> - Patch #5: New patch, split from previous
> - Link to v1: https://lore.kernel.org/r/20250425-cdx-clean-v1-0-
> ea2002dd400d@linaro.org
>
> Few simple cleanups for CDX drivers.
>
> Best regards,
> Krzysztof
>
> ---
> Krzysztof Kozlowski (5):
> cdx: Enable compile testing
> cdx: controller: Simplify with dev_err_probe()
> cdx: controller: Drop useless probe success message
> cdx: controller: Do not open-code module_platform_driver()
> cdx: controller: Drop unneeded driver.pm NULL assignment
>
For series
Acked-by: Nikhil Agarwal <nikhil.agarwal@amd.com>
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH v3 0/5] cdx: Minor cleanups
2025-05-06 10:59 ` [PATCH v3 0/5] cdx: Minor cleanups Agarwal, Nikhil
@ 2025-05-22 18:30 ` Krzysztof Kozlowski
2025-06-03 7:33 ` Agarwal, Nikhil
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-22 18:30 UTC (permalink / raw)
To: Agarwal, Nikhil, Gupta, Nipun, Greg KH; +Cc: linux-kernel@vger.kernel.org
On 06/05/2025 12:59, Agarwal, Nikhil wrote:
>> Changes in v3:
>> - Drop maintainer's update, on Greg's request
>> - Link to v2: https://lore.kernel.org/r/20250430-cdx-clean-v2-0-
>> 7dbfda9364a9@linaro.org
>>
>> Changes in v2:
>> - Patch #1: Add HAS_DMA dependency
>> - Patch #5: New patch, split from previous
>> - Link to v1: https://lore.kernel.org/r/20250425-cdx-clean-v1-0-
>> ea2002dd400d@linaro.org
>>
>> Few simple cleanups for CDX drivers.
>>
>> Best regards,
>> Krzysztof
>>
>> ---
>> Krzysztof Kozlowski (5):
>> cdx: Enable compile testing
>> cdx: controller: Simplify with dev_err_probe()
>> cdx: controller: Drop useless probe success message
>> cdx: controller: Do not open-code module_platform_driver()
>> cdx: controller: Drop unneeded driver.pm NULL assignment
>>
>
> For series
> Acked-by: Nikhil Agarwal <nikhil.agarwal@amd.com>
This was sent 20 days ago, got acked and still did not reach linux-next.
Are there any more comments? What is happening here with cdx and this
patchset?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH v3 0/5] cdx: Minor cleanups
2025-05-22 18:30 ` Krzysztof Kozlowski
@ 2025-06-03 7:33 ` Agarwal, Nikhil
2025-06-03 7:50 ` Greg KH
0 siblings, 1 reply; 10+ messages in thread
From: Agarwal, Nikhil @ 2025-06-03 7:33 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel@vger.kernel.org, Krzysztof Kozlowski, Gupta, Nipun
> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: Friday, May 23, 2025 12:01 AM
> To: Agarwal, Nikhil <nikhil.agarwal@amd.com>; Gupta, Nipun
> <Nipun.Gupta@amd.com>; Greg KH <gregkh@linuxfoundation.org>
> Cc: linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v3 0/5] cdx: Minor cleanups
>
> On 06/05/2025 12:59, Agarwal, Nikhil wrote:
> >> Changes in v3:
> >> - Drop maintainer's update, on Greg's request
> >> - Link to v2: https://lore.kernel.org/r/20250430-cdx-clean-v2-0-
> >> 7dbfda9364a9@linaro.org
> >>
> >> Changes in v2:
> >> - Patch #1: Add HAS_DMA dependency
> >> - Patch #5: New patch, split from previous
> >> - Link to v1: https://lore.kernel.org/r/20250425-cdx-clean-v1-0-
> >> ea2002dd400d@linaro.org
> >>
> >> Few simple cleanups for CDX drivers.
> >>
> >> Best regards,
> >> Krzysztof
> >>
> >> ---
> >> Krzysztof Kozlowski (5):
> >> cdx: Enable compile testing
> >> cdx: controller: Simplify with dev_err_probe()
> >> cdx: controller: Drop useless probe success message
> >> cdx: controller: Do not open-code module_platform_driver()
> >> cdx: controller: Drop unneeded driver.pm NULL assignment
> >>
> >
> > For series
> > Acked-by: Nikhil Agarwal <nikhil.agarwal@amd.com>
>
> This was sent 20 days ago, got acked and still did not reach linux-next.
> Are there any more comments? What is happening here with cdx and this patchset?
>
Greg, could you please apply this series on your next tree?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 0/5] cdx: Minor cleanups
2025-06-03 7:33 ` Agarwal, Nikhil
@ 2025-06-03 7:50 ` Greg KH
0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2025-06-03 7:50 UTC (permalink / raw)
To: Agarwal, Nikhil
Cc: linux-kernel@vger.kernel.org, Krzysztof Kozlowski, Gupta, Nipun
On Tue, Jun 03, 2025 at 07:33:31AM +0000, Agarwal, Nikhil wrote:
> > -----Original Message-----
> > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > Sent: Friday, May 23, 2025 12:01 AM
> > To: Agarwal, Nikhil <nikhil.agarwal@amd.com>; Gupta, Nipun
> > <Nipun.Gupta@amd.com>; Greg KH <gregkh@linuxfoundation.org>
> > Cc: linux-kernel@vger.kernel.org
> > Subject: Re: [PATCH v3 0/5] cdx: Minor cleanups
> >
> > On 06/05/2025 12:59, Agarwal, Nikhil wrote:
> > >> Changes in v3:
> > >> - Drop maintainer's update, on Greg's request
> > >> - Link to v2: https://lore.kernel.org/r/20250430-cdx-clean-v2-0-
> > >> 7dbfda9364a9@linaro.org
> > >>
> > >> Changes in v2:
> > >> - Patch #1: Add HAS_DMA dependency
> > >> - Patch #5: New patch, split from previous
> > >> - Link to v1: https://lore.kernel.org/r/20250425-cdx-clean-v1-0-
> > >> ea2002dd400d@linaro.org
> > >>
> > >> Few simple cleanups for CDX drivers.
> > >>
> > >> Best regards,
> > >> Krzysztof
> > >>
> > >> ---
> > >> Krzysztof Kozlowski (5):
> > >> cdx: Enable compile testing
> > >> cdx: controller: Simplify with dev_err_probe()
> > >> cdx: controller: Drop useless probe success message
> > >> cdx: controller: Do not open-code module_platform_driver()
> > >> cdx: controller: Drop unneeded driver.pm NULL assignment
> > >>
> > >
> > > For series
> > > Acked-by: Nikhil Agarwal <nikhil.agarwal@amd.com>
> >
> > This was sent 20 days ago, got acked and still did not reach linux-next.
> > Are there any more comments? What is happening here with cdx and this patchset?
> >
>
> Greg, could you please apply this series on your next tree?
>
After -rc1 is out.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 10+ messages in thread