1
0
Fork 0
mirror of https://github.com/u-boot/u-boot.git synced 2025-04-27 07:51:38 +00:00
u-boot/arch
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
..
arc dts: Deduplicate dtbs target 2024-10-14 19:32:04 -06:00
arm dm: Add dm_remove_devices_active() for ordered device removal 2024-11-24 15:41:28 -06:00
m68k m68k: asm/ptrace.h: include linux/types.h 2024-10-23 06:52:38 +02:00
microblaze dts: Deduplicate dtbs target 2024-10-14 19:32:04 -06:00
mips CONFIG_SYS_NONCACHED_MEMORY: Move prototypes to include/cpu_func.h for consistency 2024-10-29 16:17:18 -06:00
nios2 dts: Deduplicate dtbs target 2024-10-14 19:32:04 -06:00
powerpc dts: Deduplicate dtbs target 2024-10-14 19:32:04 -06:00
riscv dm: Add dm_remove_devices_active() for ordered device removal 2024-11-24 15:41:28 -06:00
sandbox test: efi: boot: Set up an image suitable for EFI testing 2024-11-09 10:01:47 +01:00
sh dts: Deduplicate dtbs target 2024-10-14 19:32:04 -06:00
x86 dm: Add dm_remove_devices_active() for ordered device removal 2024-11-24 15:41:28 -06:00
xtensa dts: Deduplicate dtbs target 2024-10-14 19:32:04 -06:00
.gitignore
Kconfig sandbox: virtio: Disable the sandbox virtio blk device 2024-11-09 10:01:47 +01:00
Kconfig.nxp
u-boot-elf.lds