]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Merge patch series "Fix device removal order for Apple dart iommu"
authorTom Rini <trini@konsulko.com>
Sun, 24 Nov 2024 21:41:32 +0000 (15:41 -0600)
committerTom Rini <trini@konsulko.com>
Sun, 24 Nov 2024 21:41:32 +0000 (15:41 -0600)
Janne Grunau <j@jannau.net> says:

Starting with v2024.10 dev_iommu_dma_unmap calls during device removal
trigger a NULL pointer dereference in the Apple dart iommu driver. The
iommu device is removed before its user. The sparsely used DM_FLAG_VITAL
flag is intended to describe this dependency. Add it to the driver.

Adding this flag is unfortunately not enough since the boot routines
except the arm one simply remove all drivers. Add and use a new function
which calls
    dm_remove_devioce_flags(DM_REMOVE_ACTIVE_ALL | DM_REMOVE_NON_VITAL);
    dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL);
to ensure this order dependency is head consistently.

Link: https://lore.kernel.org/r/20241123-iommu_apple_dart_ordering-v2-0-cc2ade6dde97@jannau.net

Trivial merge