u-boot/drivers/core
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
..
acpi.c acpi: Add fill_madt to acpi_ops 2024-10-27 17:24:13 -06:00
device-remove.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
device.c dm: core: migrate debug() messages to use dm_warn 2024-07-03 07:36:33 +01:00
devres.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
dump.c dm: core: Show device sequence instead in dm_dump_tree() 2024-08-27 14:30:02 -06:00
fdtaddr.c dm: core: fdtaddr: Avoid multiple calls to fdt_parent_offset() 2024-08-27 14:32:49 -06:00
Kconfig tpl: Support numbered aliases in device tree 2024-10-03 11:52:16 -06:00
lists.c dm: core: Enhance comments on bind_drivers_pass() 2024-07-04 09:25:20 -06:00
Makefile global: Rename SPL_TPL_ to PHASE_ 2024-10-11 11:44:48 -06:00
of_access.c dm: core: downgrade some dm_warn messages to log_debug() 2024-10-29 12:09:18 -06:00
of_addr.c dm: core: downgrade some dm_warn messages to log_debug() 2024-10-29 12:09:18 -06:00
of_extra.c dm: core: downgrade some dm_warn messages to log_debug() 2024-10-29 12:09:18 -06:00
ofnode.c dm: core: downgrade some dm_warn messages to log_debug() 2024-10-29 12:09:18 -06:00
read.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
read_extra.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
regmap.c dm: core: regmap: Avoid multiple calls to ofnode_get_parent() 2024-08-27 14:32:49 -06:00
root.c dm: Add dm_remove_devices_active() for ordered device removal 2024-11-24 15:41:28 -06:00
simple-bus.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
simple-pm-bus.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
syscon-uclass.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
tag.c dm: core: Add a command to show driver model statistics 2022-06-28 03:09:52 +01:00
uclass.c dm: core: Add a function to see if a device exists 2024-11-03 21:27:12 -06:00
util.c dm: use list_count_nodes() for counting list nodes 2024-07-31 09:54:53 +02:00