summaryrefslogtreecommitdiff
path: root/drivers/core/root.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-11-11 07:26:50 -0600
committerTom Rini <trini@konsulko.com>2024-11-11 09:11:55 -0600
commit48fd7e9699f8799690196c76869d59c1e5b2e9a6 (patch)
tree70d188c16901edbda6ac2e8eb10c08090e4588ef /drivers/core/root.c
parentfdcf06d58d94c40eb02a9c034af613cee08eb3f2 (diff)
parentf642f344348558e05902175e7517c7a12f2c5562 (diff)
Merge patch series "Fix IOVA allocation in Apple dart iommu after global LMB mem map changes"
Janne Grunau <j@jannau.net> says: The changes in "Make LMB memory map global and persistent" [1] break mapping DMA memory in the USB xHCI driver when using the apple_dart iommu present on Apple silicon systems. The IOVA space used by the u-boot driver (low 4GB) and physical memory do not overlap. The physical memory on this systems starts depending on the SoC either at 0x10_0000_0000 or 0x100_0000_0000. It make no sense to manage these distinct regions in a single LMB map. In addition every device has its own iommu and IO address space so sharing a single memory map between all iommu instances is not necessary. To fix this issue restore the used subset (add, alloc and free) of the previous pointer based LMB interface with "io_" as prefix. To ensure that low level lmb functions do not use the global LMB variable reorder lib/lmb.c so that the variable is not visible. Tested with patches from my "Fix device removal order for Apple dart iommu" series [2] to fix a separate issue. The cosmetic commit has two checkpatch warnings in existing code which I ignored. [1] https://lore.kernel.org/u-boot/20240826115940.3233167-1-sughosh.ganu@linaro.org/ [2] https://lore.kernel.org/u-boot/20241031-iommu_apple_dart_ordering-v1-0-8a6877946d6b@jannau.net/ Link: https://lore.kernel.org/r/20241111-io_lmb_apple_dart_iommu-v3-0-32c05da51d72@jannau.net Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/core/root.c')
0 files changed, 0 insertions, 0 deletions