Janne Grunau dabaa4ae32 dm: Add dm_remove_devices_active() for ordered device removal
This replaces dm_remove_devices_flags() calls in all boot
implementations to ensure non vital devices are consistently removed
first. All boot implementation except arch/arm/lib/bootm.c currently
just call dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL). This can result
in crashes when dependencies between devices exists. The driver model's
design document describes DM_FLAG_VITAL as "indicates that the device is
'vital' to the operation of other devices". Device removal at boot
should follow this.

Instead of adding dm_remove_devices_flags() with (DM_REMOVE_ACTIVE_ALL |
DM_REMOVE_NON_VITAL) everywhere add dm_remove_devices_active() which
does this.

Fixes a NULL pointer deref in the apple dart IOMMU driver during EFI
boot. The xhci-pci (driver which depends on the IOMMU to work) removes
its mapping on removal. This explodes when the IOMMU device was removed
first.

dm_remove_devices_flags() is kept since it is used for testing of
device_remove() calls in dm.

Signed-off-by: Janne Grunau <j@jannau.net>
2024-11-24 15:41:28 -06:00
..
2024-10-17 03:12:47 +02:00
2023-08-25 13:54:33 -04:00
2023-08-08 10:22:03 -04:00
2024-07-29 15:01:04 -06:00
2023-12-21 08:54:37 -05:00
2024-10-24 11:20:58 -06:00
2024-07-29 15:01:04 -06:00
2024-08-26 14:05:38 -06:00
2024-02-13 15:38:49 -05:00
2024-07-29 15:01:04 -06:00
2024-08-02 15:16:51 -03:00
2024-10-23 06:52:38 +02:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-06-14 12:59:07 -06:00
2024-08-26 14:05:38 -06:00
2024-07-29 15:01:04 -06:00
2023-05-02 14:23:34 -04:00
2024-09-24 13:41:20 -06:00
2024-10-30 21:44:38 +01:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2023-11-07 14:50:51 -05:00
2024-07-29 15:01:04 -06:00
2024-08-26 14:05:38 -06:00
2024-08-13 06:23:15 +02:00
2023-04-27 13:51:06 -04:00
2023-12-21 11:59:49 -05:00
2024-10-10 16:02:20 -06:00
2024-11-03 21:27:12 -06:00
2024-07-29 15:01:04 -06:00
2023-12-21 08:54:37 -05:00
2024-11-04 16:41:38 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-10-24 11:21:48 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2023-12-21 08:54:37 -05:00
2024-10-16 11:11:56 -06:00
2024-09-30 17:48:12 -06:00
2024-07-29 15:01:04 -06:00
2024-09-12 17:35:37 +02:00
2023-12-21 08:54:37 -05:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2023-10-09 15:24:31 -04:00
2024-07-29 15:01:04 -06:00
2024-06-30 13:58:31 +02:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-10-22 19:51:23 +02:00
2024-05-22 08:55:29 -06:00
2024-07-29 15:01:04 -06:00