Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions drivers/iommu/apple-dart.c
Original file line number Diff line number Diff line change
Expand Up @@ -4302,6 +4302,19 @@ static int apple_dart_probe(struct platform_device *pdev)
goto err_clk_disable;
}

/*
* v2.2 moved the exception bitmap to 0x4000 and the per-stream
* exception records to 0x8000. A node whose reg stops short of them
* would fault on the first exception read during reset.
*/
if (dart->hw->type == DART_T8110 && dart->version >= 0x0202 &&
resource_size(res) < DART_T8110_ERR_SID(dart->num_streams)) {
ret = dev_err_probe(dev, -EINVAL,
"MMIO region %pR too small for v2.2 exception records (need %#x); fix the DT reg\n",
res, DART_T8110_ERR_SID(dart->num_streams));
goto err_clk_disable;
}

ret = apple_dart_read_remaps(dart);
if (ret)
goto err_clk_disable;
Expand Down