This repository was archived by the owner on Nov 8, 2023. It is now read-only.
Commit e7985f4
of: property: Fix fw_devlink handling of interrupt-map
Commit d976c6f ("of: property: Add fw_devlink support for
interrupt-map property") tried to do what it says on the tin,
but failed on a couple of points:
- it confuses bytes and cells. Not a huge deal, except when it
comes to pointer arithmetic
- it doesn't really handle anything but interrupt-maps that have
their parent #address-cells set to 0
The combinations of the two leads to some serious fun on my M1
box, with plenty of WARN-ON() firing all over the shop, and
amusing values being generated for interrupt specifiers.
Having 2 versions of parsing code for "interrupt-map" was a bad
idea. Now that the common parsing parts have been refactored
into of_irq_parse_imap_parent(), rework the code here to use it
instead and fix the pointer arithmetic.
Note that the dependency will be a bit different than the original code
when the interrupt-map points to another interrupt-map. In this case,
the original code would resolve to the final interrupt controller. Now
the dependency is the parent interrupt-map (which itself should have a
dependency to the parent). It is possible that a node with an
interrupt-map has no driver.
Fixes: d976c6f ("of: property: Add fw_devlink support for interrupt-map property")
Signed-off-by: Marc Zyngier <maz@kernel.org>
Co-developed-by: Rob Herring (Arm) <robh@kernel.org>
Cc: Saravana Kannan <saravanak@google.com>
Tested-by: Marc Zyngier <maz@kernel.org>
Tested-by: Anup Patel <apatel@ventanamicro.com>
Link: https://lore.kernel.org/r/20240529-dt-interrupt-map-fix-v2-2-ef86dc5bcd2a@kernel.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>1 parent 935df1b commit e7985f4
1 file changed
+10
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1306 | 1306 | | |
1307 | 1307 | | |
1308 | 1308 | | |
1309 | | - | |
| 1309 | + | |
1310 | 1310 | | |
1311 | 1311 | | |
1312 | | - | |
| 1312 | + | |
1313 | 1313 | | |
1314 | 1314 | | |
1315 | 1315 | | |
| |||
1322 | 1322 | | |
1323 | 1323 | | |
1324 | 1324 | | |
1325 | | - | |
| 1325 | + | |
| 1326 | + | |
1326 | 1327 | | |
1327 | | - | |
1328 | 1328 | | |
1329 | | - | |
1330 | | - | |
1331 | | - | |
| 1329 | + | |
1332 | 1330 | | |
1333 | | - | |
1334 | | - | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
| 1331 | + | |
| 1332 | + | |
1338 | 1333 | | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
| 1334 | + | |
| 1335 | + | |
1344 | 1336 | | |
1345 | 1337 | | |
1346 | | - | |
| 1338 | + | |
1347 | 1339 | | |
1348 | 1340 | | |
1349 | 1341 | | |
1350 | | - | |
1351 | | - | |
1352 | 1342 | | |
1353 | 1343 | | |
1354 | 1344 | | |
| |||
0 commit comments