Skip to content

Commit 5c5c874

Browse files
digetxjoergroedel
authored andcommitted
iommu/ipmmu-vmsa: Don't register as BUS IOMMU if machine doesn't have IPMMU-VMSA
This fixes kernel crashing on NVIDIA Tegra if kernel is compiled in a multiplatform configuration and IPMMU-VMSA driver is enabled. Cc: <[email protected]> # v3.20+ Signed-off-by: Dmitry Osipenko <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent 15021d3 commit 5c5c874

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/iommu/ipmmu-vmsa.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,12 +1108,19 @@ static struct platform_driver ipmmu_driver = {
11081108

11091109
static int __init ipmmu_init(void)
11101110
{
1111+
struct device_node *np;
11111112
static bool setup_done;
11121113
int ret;
11131114

11141115
if (setup_done)
11151116
return 0;
11161117

1118+
np = of_find_matching_node(NULL, ipmmu_of_ids);
1119+
if (!np)
1120+
return 0;
1121+
1122+
of_node_put(np);
1123+
11171124
ret = platform_driver_register(&ipmmu_driver);
11181125
if (ret < 0)
11191126
return ret;

0 commit comments

Comments
 (0)