]> git.karo-electronics.de Git - karo-tx-linux.git/commit
powerpc/mmu: Add real mode support for IOMMU preregistered memory
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Wed, 22 Mar 2017 04:21:47 +0000 (15:21 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 27 Mar 2017 04:25:48 +0000 (15:25 +1100)
commit6b5c19c55266f6efd10ffac0e9f9f2b7aa420a58
treef339cf0557fee4d263442469108303f796080ba7
parent97da3854c526d3a6ee05c849c96e48d21527606c
powerpc/mmu: Add real mode support for IOMMU preregistered memory

This makes mm_iommu_lookup() able to work in realmode by replacing
list_for_each_entry_rcu() (which can do debug stuff which can fail in
real mode) with list_for_each_entry_lockless().

This adds realmode version of mm_iommu_ua_to_hpa() which adds
explicit vmalloc'd-to-linear address conversion.
Unlike mm_iommu_ua_to_hpa(), mm_iommu_ua_to_hpa_rm() can fail.

This changes mm_iommu_preregistered() to receive @mm as in real mode
@current does not always have a correct pointer.

This adds realmode version of mm_iommu_lookup() which receives @mm
(for the same reason as for mm_iommu_preregistered()) and uses
lockless version of list_for_each_entry_rcu().

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/mmu_context.h
arch/powerpc/mm/mmu_context_iommu.c