iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.19 7/7] iommu: mtk: fix module autoloading
       [not found] <20240422232040.1616527-1-sashal@kernel.org>
@ 2024-04-22 23:20 ` Sasha Levin
  2024-04-23 11:39   ` Pavel Machek
  0 siblings, 1 reply; 3+ messages in thread
From: Sasha Levin @ 2024-04-22 23:20 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Krzysztof Kozlowski, Joerg Roedel, Sasha Levin, yong.wu, joro,
	will, matthias.bgg, angelogioacchino.delregno, iommu,
	linux-mediatek, linux-arm-kernel

From: Krzysztof Kozlowski <krzk@kernel.org>

[ Upstream commit 7537e31df80cb58c27f3b6fef702534ea87a5957 ]

Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
based on the alias from of_device_id table.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240410164109.233308-1-krzk@kernel.org
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/iommu/mtk_iommu.c    | 1 +
 drivers/iommu/mtk_iommu_v1.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index 7304ad88f1263..93a47302d6cfc 100644
--- a/drivers/iommu/mtk_iommu.c
+++ b/drivers/iommu/mtk_iommu.c
@@ -761,6 +761,7 @@ static const struct of_device_id mtk_iommu_of_ids[] = {
 	{ .compatible = "mediatek,mt8173-m4u", .data = (void *)M4U_MT8173},
 	{}
 };
+MODULE_DEVICE_TABLE(of, mtk_iommu_of_ids);
 
 static struct platform_driver mtk_iommu_driver = {
 	.probe	= mtk_iommu_probe,
diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c
index 94b16cacb80fc..709a2ab1d4cf7 100644
--- a/drivers/iommu/mtk_iommu_v1.c
+++ b/drivers/iommu/mtk_iommu_v1.c
@@ -541,6 +541,7 @@ static const struct of_device_id mtk_iommu_of_ids[] = {
 	{ .compatible = "mediatek,mt2701-m4u", },
 	{}
 };
+MODULE_DEVICE_TABLE(of, mtk_iommu_v1_of_ids);
 
 static const struct component_master_ops mtk_iommu_com_ops = {
 	.bind		= mtk_iommu_bind,
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH AUTOSEL 4.19 7/7] iommu: mtk: fix module autoloading
  2024-04-22 23:20 ` [PATCH AUTOSEL 4.19 7/7] iommu: mtk: fix module autoloading Sasha Levin
@ 2024-04-23 11:39   ` Pavel Machek
  2024-05-09 12:46     ` Sasha Levin
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2024-04-23 11:39 UTC (permalink / raw)
  To: Sasha Levin
  Cc: linux-kernel, stable, Krzysztof Kozlowski, Joerg Roedel, yong.wu,
	joro, will, matthias.bgg, angelogioacchino.delregno, iommu,
	linux-mediatek, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 378 bytes --]

Hi!

> [ Upstream commit 7537e31df80cb58c27f3b6fef702534ea87a5957 ]
> 
> Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
> based on the alias from of_device_id table.

This patch is queued for 4.19 and 5.15, but not 5.10. I believe that's
wrong.

Best regards,
								Pavel
-- 
People of Russia, stop Putin before his war on Ukraine escalates.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH AUTOSEL 4.19 7/7] iommu: mtk: fix module autoloading
  2024-04-23 11:39   ` Pavel Machek
@ 2024-05-09 12:46     ` Sasha Levin
  0 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2024-05-09 12:46 UTC (permalink / raw)
  To: Pavel Machek
  Cc: linux-kernel, stable, Krzysztof Kozlowski, Joerg Roedel, yong.wu,
	joro, will, matthias.bgg, angelogioacchino.delregno, iommu,
	linux-mediatek, linux-arm-kernel

On Tue, Apr 23, 2024 at 01:39:03PM +0200, Pavel Machek wrote:
>Hi!
>
>> [ Upstream commit 7537e31df80cb58c27f3b6fef702534ea87a5957 ]
>>
>> Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
>> based on the alias from of_device_id table.
>
>This patch is queued for 4.19 and 5.15, but not 5.10. I believe that's
>wrong.

Heh, this is funny. It fails to build on 5.10:

drivers/iommu/mtk_iommu.c:872:1: warning: data definition has no type or storage class
   872 | MODULE_DEVICE_TABLE(of, mtk_iommu_of_ids);
       | ^~~~~~~~~~~~~~~~~~~
drivers/iommu/mtk_iommu.c:872:1: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Werror=implicit-int]
drivers/iommu/mtk_iommu.c:872:1: warning: parameter names (without types) in function declaration
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:286: drivers/iommu/mtk_iommu.o] Error 1

But not on any of the older trees.

-- 
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-09 12:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20240422232040.1616527-1-sashal@kernel.org>
2024-04-22 23:20 ` [PATCH AUTOSEL 4.19 7/7] iommu: mtk: fix module autoloading Sasha Levin
2024-04-23 11:39   ` Pavel Machek
2024-05-09 12:46     ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).